Commit Graph

146 Commits

Author SHA1 Message Date
Mike Blumenkrantz 553b8063a5 always unset pass_events on desktop editor when it is shown
fixes some cases where the editor could not be interacted with after
it was hidden during gadget placement
2018-03-02 11:13:49 -05:00
Mike Blumenkrantz c43113381c do not add gadget editor pointer site to editor del_list
the pointer site will never exist at the time when the editor is
destroyed
2018-03-02 11:13:42 -05:00
Mike Blumenkrantz b1eff9a96b block gadget site layouts on moving gadgets which are not on the pointer site
these will be recalculated correctly once the move operation terminates

fix T6623
2018-01-30 10:51:12 -05:00
Mike Blumenkrantz cafe1976fb clear visible gadget popups when triggering a gadget action 2018-01-30 10:50:59 -05:00
Mike Blumenkrantz ba11728905 consider gadget ctxpopups as normal popups for callback purposes 2018-01-30 10:50:52 -05:00
Mike Blumenkrantz acf6198252 sort gadgets alphabetically in gadget editor 2018-01-30 10:50:42 -05:00
Mike Blumenkrantz 4d76f409f8 block gadget configuration unconditionally while desklock is active 2017-10-03 13:52:44 -04:00
Mike Blumenkrantz 031b0bdc60 deduplicate global gadget handler variables
ref T6125, T4648
2017-10-03 13:50:16 -04:00
Mike Blumenkrantz 6f186db24b clamp expanding gadget size to 0 to prevent sizing overflows
if the expanded size is negative then the size should be 0 and the gadget is
not visible
2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 7c726172e4 handle gadget site layouts using accurate parent geometry 2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 4ae2145330 move gadget editor help text onto the editor popup
ref T4648
2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 62acd53a96 avoid div by 0 in gadget layout
CID 1381165
2017-09-15 12:16:48 -04:00
Mike Blumenkrantz 283a1cd620 handle unmovable gadgets in gadget move action
a gadget which refuses to create a duplicate of itself can be considered
immobile

fix T5998
2017-09-14 14:38:14 -04:00
Mike Blumenkrantz ccd374e6a2 add some hidden boxes to use as gadget popup hover parents
boxes get resized with zone useful geometry to ensure the content is always
on screen and visible

fix T5945
2017-09-14 14:00:39 -04:00
Mike Blumenkrantz a5bb9932ee revert gadget ctxpopup autopositioning attempts
I don't think this method would ever have worked reliably

This reverts commit 6f1b75e87b.
This reverts commit 84e999f5f3.
2017-09-12 14:37:53 -04:00
Mike Blumenkrantz 6bd97ced9b handle gadget site layout when last gadget in site is a spacer 2017-09-12 13:36:39 -04:00
Mike Blumenkrantz 721eeb994e make spacer gadgets smarter when multiple spacers exist
* ignore consecutive spacers
* attempt to size/fill consistently based on occupied space

fix T5973
2017-09-12 13:21:04 -04:00
Mike Blumenkrantz 6f1b75e87b disable auto positioning of gadget ctxpopups for now
ctxpopups 2hard4me atm
2017-09-01 15:39:33 -04:00
Mike Blumenkrantz 8ea5cf9c47 add desklock gadget site event rect to event grabber while editor is visible
allow actions to trigger on gadgets during editing

ref T4648
2017-09-01 13:40:11 -04:00
Mike Blumenkrantz 46cd0090cd stack gadgets below site event rect when reparenting gadget 2017-09-01 13:40:11 -04:00
Mike Blumenkrantz 6dd9205e0a rename E_EVENT_COMPOSITOR_RESIZE -> E_EVENT_COMPOSITOR_UPDATE 2017-09-01 13:40:11 -04:00
Mike Blumenkrantz 1ca1201110 recalc desktop gadget sites on compositor update event 2017-09-01 13:40:11 -04:00
Mike Blumenkrantz 84e999f5f3 track gadget ctxpopups and reposition within zone on resize
this attempts to shift the ctxpopup content vertically and horizontally to
keep it on the same screen that the gadget is on

fix T5945
2017-09-01 13:40:11 -04:00
Mike Blumenkrantz 175c614838 add spacer gadgets for bryces
this is a rectangle which dynamically resizes based on the available space
in the bar. it can only be added when autosize is disabled, and setting
autosize will remove all spacers

fix T5914
2017-08-25 14:47:10 -04:00
Mike Blumenkrantz 2e0638e87a check whether gadgets are elm objects before calling elm functions 2017-08-25 14:47:10 -04:00
Mike Blumenkrantz 0f5b287866 add gadget api for determining if a gadget site is a desklock site
potentially this could be improved to use a vastly overengineered 'policy'
setup, but for now this fits the biggest use case

ref T4648
2017-08-25 14:47:10 -04:00
Mike Blumenkrantz 29b736257c destroy dropped gadgets after drop operation completes
the gadget object is used during the drop callback, so destroying it
before the callback breaks the drop operation
2017-08-25 14:47:09 -04:00
Mike Blumenkrantz 4d8e1d5e29 perform gadget site layout before calling drop callback
calling this inside the drop callback resets the dropped gadget's position
and causes the drop operation to fail
2017-08-25 14:47:09 -04:00
Mike Blumenkrantz feb17c898d set moving gadgets in pointer site to have moving state
prevent spurious resizes during layout
2017-08-25 14:47:09 -04:00
Mike Blumenkrantz 850f5b40f8 handle gadget ctxpopup placement for desktop gadgets
fix T5877
2017-08-25 14:47:09 -04:00
Mike Blumenkrantz 6b2a9a0f7b set gadget ctxpopup priority based on anchor
fix T5877
2017-08-18 15:52:50 -04:00
Mike Blumenkrantz 57c448739a add support for external gadget providers in the gadget editor
this allows external gadget managers to add their gadget types into
existing editor/layouts
2017-08-11 18:48:49 -04:00
Mike Blumenkrantz 408128df95 handle destruction of demo gadgets without crashing
demo gadgets automatically call _gadget_free() on object delete, avoid
recursively calling it
2017-08-11 18:48:49 -04:00
Mike Blumenkrantz 2d80ef091e further improve keyboard handling while gadget editor is active 2017-08-11 18:48:49 -04:00
Mike Blumenkrantz 92a0cb11d6 disallow demo gadget ids from counting towards wizard success 2017-08-11 18:48:49 -04:00
Mike Blumenkrantz 4e4f66fc2b prune gadgets from editor if destroyed while editor is active 2017-08-11 18:48:49 -04:00
Mike Blumenkrantz fd6f9f1c14 destroy gadget configs when deleting a gadget site 2017-08-07 14:48:07 -04:00
Mike Blumenkrantz d5a1b30ab4 add gadget site as param for gadget wizard callbacks
it's important to be able to track this lifetime in order to cancel the
wizard if the site is deleted
2017-08-04 16:05:16 -04:00
Mike Blumenkrantz 09aee20e3c save config automatically when removing gadgets 2017-08-04 16:05:16 -04:00
Mike Blumenkrantz cb80d5157c more accurately determine gadget editor visibility
ref 2675422e9d
2017-08-04 16:05:15 -04:00
Mike Blumenkrantz 81fe0b4d49 set gadgets in the editor's pointer site as moving
prevent random resizes during gadget layout
2017-08-04 16:05:15 -04:00
Mike Blumenkrantz 30ada88a34 reject gadget site layout attempts only when it would be impossible
a site with orient set is expected to fill using only one axis, so a size
of 0xH or Wx0 is valid in some cases

fix T5806
2017-08-03 11:52:24 -04:00
Mike Blumenkrantz 541c30b3c4 set gadget recalc immediately when not in canvas smart calc 2017-08-03 11:52:18 -04:00
Carsten Haitzler 3051df7fee gadget recalc - if you add a job...del and add again
if you add a job to do things like defer a calc till later in the loop
(or if later in size calc - it'd be the next loop run after rendering)
... then del the previous job and add a new one. why? order of
operation. if you add job a... because of event a, then add job b,
because of event b ... if for whatever reason, event a happens again
and you skip adding job a... job a will run before jbo b, even though
the LAST event is later and that 2nd event a may relay on event b
state/calculations. so always del then add to ensure then that job a
happens ater b if this scenario happens. it just leads to fewer
surprises and weird issues.
2017-07-31 17:41:35 +09:00
Mike Blumenkrantz 2f2075f588 remove tooltips from desktop gadget editors
this looks bad?
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz d2cdde01d1 set max size hint on desktop gadget editor gadgets when editor is resized
ensure that the gadgets size based on grid item size
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz 4ce460525c return immediately when setting a null gadget style if current style is null 2017-07-28 15:44:55 -04:00
Mike Blumenkrantz d216cce6eb use zone size for un-oriented new gadgets
this is a relative size which I set based on zone size, so avoid the
possibility of using unsized site geometry
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz 9eed5f49a8 abort gadget site layouts if the gadget site has not been sized
this triggers infinite loops, and a resize on the site will trigger a layout
automatically
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz 3e982446ec trigger gadget site recalc job if gadget object hints change 2017-07-28 15:44:55 -04:00