Commit Graph

10863 Commits

Author SHA1 Message Date
Mike Blumenkrantz e1035aef81 Revert "e comp: fix crashes on exit/restart when e_comp is NULL"
This reverts commit 26a7ba3a58.

this can only occur if something forces an event flush during shutdown.
in this case, whatever is triggering the event flush is a bug, not the
dereferencing of a pointer which is guaranteed to exist for the normal
lifetime of the process
2016-02-25 15:05:24 -05:00
Mike Blumenkrantz 357fd48ff8 remove emotion_init/shutdown from e_video
this already happens during regular startup
2016-02-25 15:04:51 -05:00
Mike Blumenkrantz beee048282 do not decrement e_comp->new_clients for non-new clients during _e_client_eval
this overflows the int!
2016-02-25 14:16:25 -05:00
Mike Blumenkrantz 9d3f4564b3 make bgpreview create vdesk config dialog on mouse up instead of mouse down
if the option to always raise a window on click is enabled, clicking an internal
window in a way which creates another window will cause a race condition where
the clicked window is raised over the newly created window

there is no obvious policy-wide solution to this issue, but making this change
at least resolves the issue in question

fix T3210
2016-02-25 14:00:01 -05:00
Mike Blumenkrantz bb1c0dba28 fix bgpreview internals parenting
fixes errors on object deletion as well as object visibility

ref be1b11ca28
2016-02-25 13:39:32 -05:00
Mike Blumenkrantz 8c969b5f5f remove some unused variables 2016-02-25 13:37:52 -05:00
Mike Blumenkrantz 6fe6fba44e redo wayland pixmap ids to use monotonic decreasing ints with no collisions
using pointers for this turned out to have some corner case collisions, so
now just use something totally unrelated to the surface to ensure uniqueness
2016-02-25 11:16:09 -05:00
Carsten Haitzler f5148ddbf3 e - efm: fix op registry listener add and dont use eina_error
eina list stopped using eina_error like... so so so so so long ago like
before 1.0 - so eina_error value may be something junk and from
somewhere else where the list append succeeded but ena error said
fail- and that is what was happening and things crashed. this fixes this

@fix
2016-02-23 13:54:24 +09:00
Mike Blumenkrantz 41e95cc3f4 enable comp object image data refresh if a dirty call is made with no damages
this indicates that a buffer has changed, but there is no new data to draw
2016-02-22 17:48:35 -05:00
Mike Blumenkrantz 89df60a6cd add comp object util callback for closing on Escape key
this is the most common usage for autoclose callbacks, so having it
available as api saves a lot of typing for the codebase
2016-02-21 11:50:23 -05:00
Mike Blumenkrantz 87d4e254f0 pre-remove pixmap from x11 clients during del hook
this breaks the compositor!

ref 0ca200513e
2016-02-19 18:02:54 -05:00
Mike Blumenkrantz 3f3ed7ae99 reshuffle x11 comp init to cleanup on failure cases
in the event of a wayland start, x11 comp init will fail, meaning that
cleanup must occur in order to avoid erroneous triggering of x11 handlers

 #TooSoon
2016-02-19 17:07:03 -05:00
Derek Foreman 625e417bb2 Remove wayland focus timer in delete callback
If we don't remove it now it could fire later when the structures
it depends on are already freed.
2016-02-18 12:40:52 -06:00
Derek Foreman 0ca200513e Move pixmap free to client free from client destroy
Under wayland we need the pixmaps to exist until after the close
animations finish, even if clients can perform new rendering.

@fix
2016-02-18 12:31:31 -06:00
Derek Foreman b30c96e142 Use eina_list_merge instead of eina_list_move for wayland lists
We should use eina_list_merge for concatenating lists instead of
eina_list_move.
2016-02-18 12:31:31 -06:00
Derek Foreman 6a65d2a546 Protect the wayland frame callback list from corruption
The resource destroy callback for frame callbacks will walk the frame list
to remove itself.  When freeing that list we need to make sure the
resource destroy callback doesn't see the same list we're walking and
corrupt it.
2016-02-18 12:31:31 -06:00
Derek Foreman 7063aa3bb8 Initialize pointer before passing to e_wheel_bindings_find()
It's going to dereference it, so init it to NULL.
2016-02-18 12:31:31 -06:00
Derek Foreman c373331f94 Remove wayland frame callbacks from subsurface cache on destruction
There are 3 places a frame callback could be hiding.  frames list,
pending.frames list, or subsurface cached.frames list.  We weren't
clearing it from the subsurface cache on destruction.
2016-02-18 11:51:10 -06:00
Derek Foreman cd3a071519 Initialize pointer before calling e_bindings_mouse_button_find()
The pointer is dereferenced, so it should have an initialized value.
2016-02-18 11:50:18 -06:00
Mike Blumenkrantz 3f82a7f1fb return no binding found when trying to incrementally resolve end-of-list mousebinds
in the case where every binding until the end of the binding list has been rejected,
returning NULL must happen in order to inform callers that there is no more resolving
to be done, breaking out of an otherwise infinite resolve loop

ref fe5d2e6e61
2016-02-17 12:36:34 -05:00
Mike Blumenkrantz c14adb768f improve enforcement of shelf autohide-related window adjustment
for whatever reason, there's a global option which makes windows adjust
when a shelf autohides as well as a per-shelf option to ignore the global
option

in the case where the global option is not enabled, there is no reason to
check the per-shelf option

ref 5d63b07ca3
2016-02-17 11:36:30 -05:00
Derek Foreman 3e9029ea08 Ensure wayland clients haven't been deleted when processing callbacks
Summary:
It's apparently possible to trigger at least some of these by interacting
with a client as it's closing, so add a bunch of checks.

Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3699
2016-02-16 16:41:03 -05:00
Mike Blumenkrantz a9b4754776 do not clamp comp object input regions to 0,0
this breaks input for clients using csd which are aligned at x|y axis
2016-02-16 15:36:56 -05:00
Mike Blumenkrantz e8b8fe8310 add flag for zone obstacles to indicate verticality
I added a lower quality and less precise workaround for this before
since I didn't have enough test cases to think of something which would
be suffiently good to handle all cases.

as a result, initial calculations for obstacles would incorrectly detect
horizontally-oriented obstacles as being vertical, causing inconsistencies
in window placement. this would become even more severe if the obstacle
never resized itself, erroneously modifying window placement to position
around obstacles which did not exist

having a hint on the obstacle to indicate a direction is sufficient for
most cases, specifically zone useful geometry calcs, where obstacles are
expanded to cover the entire screen on which they reside and must expand
accurately based on the orientation of the obstacle

ref 10c43efc83
2016-02-08 14:52:55 -05:00
Mike Blumenkrantz 7d3319e6ee do not perform special case position adjustment for re_manage clients
this case is solely for handling clients which are created with nonzero
position, eg. an x11 window trying to display itself centered upon initial
creation. re_manage indicates a window which is re-managed after a restart of
enlightenment, so these windows clearly do not fall into that case

fixes an issue where windows would move up+left by the size of their frame during
restart

ref 95e133282e
2016-02-08 14:52:55 -05:00
Mike Blumenkrantz 493f6f595b Revert "e - restart window positioning - fix it"
This reverts commit d0229b3652.

see following patches
2016-02-08 14:51:21 -05:00
Carsten Haitzler d0229b3652 e - restart window positioning - fix it
so every time i restart e i have my windows all messed up. it's
INSANELY annoying and time consuming every single time having to move
a dozen or more windows back to where they should be just because i
restarted e. i've narrowed it down to 2 places. 1 which is trying to
handle "out of screen" windows and during startup it seems things are
not quite stable yet as the randr code figures things out until the
event storm settles down.

when this is then fixed - another bit of code just shuffles windows up
all the time by a titlebar whcih is also supremely annoying. this is
the code that adopes a new frame for a window.

so the nasty hack to avoid piles of pain right now is for the first 5
seconds of e's life - don't do this stuff. at least you can now use e
and not be annoyed to hell and back every restart.

yes a nicer fix may be better - but that's going to take a lot more
time and patience and until then - this will do.
2016-02-06 11:31:01 +09:00
Carsten Haitzler e75af1536d Revert "e bg: remove debug printf"
This reverts commit 77c2a2a3d1.

oops - i forgot i had all this other debugging there
2016-02-06 10:29:04 +09:00
Carsten Haitzler 77c2a2a3d1 e bg: remove debug printf 2016-02-06 10:27:09 +09:00
Mike Blumenkrantz e7a40cfc5f remove debug printf from e_bg
ref be1b11ca28
2016-02-05 13:29:44 -05:00
Carsten Haitzler 99a98997ad e - bgpreview widget - fix sizing of normal wallpapers after video add
sizing of bg previuews with normal edje wallpapers broke when adding
in video - fix back to where it was and working again
2016-02-05 22:01:27 +09:00
Carsten Haitzler be1b11ca28 e - video bgs - allow selection of video files for wallpapers
this allows video files to be played for wapapers - they loop and run
indefinitely. it is a special video object that shares the same source
across all outputs, so if you have the same video set, on 2 screens
(or desktops) then it's only decoded once and uses proxies to
ducplicate. this works in the pager too (it uses proxies).

this is for amusement and fun and ... because we can. :)
2016-02-05 18:35:49 +09:00
Carsten Haitzler 26a7ba3a58 e comp: fix crashes on exit/restart when e_comp is NULL
when we are shutting down i seem to get into a state where e_comp is
null yet we are still processing events. this fixes that and checks.
2016-02-05 18:35:49 +09:00
Mike Blumenkrantz b9c45c6159 check whether to reapply all callbacks for comp util objects when changing type
in the case where the existence of a zoomap in the comp frame edje has changed
during the course of changing the type, these callbacks must be updated with new
data params in order to ensure accurate operations during callbacks
2016-02-04 16:24:44 -05:00
Chris Michael 38d3654982 only specify sw, sh, fh variables if we intend on using them
This patch fixes an issue where building with wayland support but
disabling wl_drm module would cause compiler warnings about these
variables being defined but not used

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-04 13:14:29 -05:00
Mike Blumenkrantz 896781204f clamp minimum shelf size to 20px in shelf config
the majority of gadgets do not render correctly/anything under this size,
so allowing it to be set is not going to be helpful to anyone
2016-02-04 12:58:38 -05:00
Mike Blumenkrantz fe5d2e6e61 add bool return for mouse-based E_Action callbacks
in many cases, a mouse action's callback will fail to execute as a result of multiple
objects being under the pointer at the time of the event. in this case,
the callback should be able to determine whether action callback processing should
continue.

as an example, when attempting to execute an action which only activates for
client objects, if the passed object is not a client then the callback should return
false to indicate that it was not able to perform the action for the given object,
allowing further actions to be attempted on this object
2016-02-03 18:09:18 -05:00
Mike Blumenkrantz 39c6f1c33a ignore subsequent bindings with ANY context after finding a previous ANY binding
if multiple ANY bindings exist for a given event, return the first one found
2016-02-03 18:09:18 -05:00
Mike Blumenkrantz 331a3e74e1 disable map when unsetting zoomap child
if the existing map is left enabled when the child is removed from the
zoomap, the child object will be permanently misrendered with the previously
applied map
2016-02-01 17:31:20 -05:00
Mike Blumenkrantz 6a4488faea set child of zoomap as new content for comp util objects when changing type
the zoomap is deleted here anyway, so all this does is crash

ref 980135fc38
2016-02-01 17:23:02 -05:00
Mike Blumenkrantz b5103ac3e2 compare key OR keyname in e_bindings_key_event_find()
keys such as tab will have different names in key and keyname, eg.
"Tab" vs "ISO_Left_Tab", and both names are valid for comparisons

thanks to @billiob for pointing out this regression
2016-02-01 11:31:57 -05:00
Mike Blumenkrantz 782cf3606e send mouse out+in on desk flip end
this triggers mouse in events on objects under the mouse in order to
forcibly reapply focus for mouse-based focus policies

fix Tfrance
2016-02-01 11:04:38 -05:00
Mike Blumenkrantz 6544ae2c65 add back binding key->keyname check in e_bindings_key_event_find()
second copy/paste failure of the day...
2016-01-25 16:56:52 -05:00
Mike Blumenkrantz d6772d8911 update xkb.cur_group and send event upon serializing an EFFECTIVE layout in wl input
according to xkbcommon, the group returned from serializing the EFFECTIVE layout
is the one which is currently active. this array index should match up with the
list used in the xkb part of E_Config
2016-01-25 16:33:49 -05:00
Mike Blumenkrantz 8678e01ce9 do not update keymap group in _e_comp_wl_input_keymap_update()
this state is dead, and any group changes which have been made should
be reapplied based on the new state
2016-01-25 16:33:49 -05:00
Mike Blumenkrantz 10c43efc83 fill zone obstacles on x/y axis during useful geometry recalc
this fixes an issue where shrinking vertical shelves would cause vertically
maximized windows to always match the height of the shelf

possibly needs improving later depending on usage of zone obstacles in
the future...
2016-01-25 13:45:47 -05:00
Mike Blumenkrantz ea2ec5a2f3 use desk obstacles for calculating desk-specific zone useful geometry
typo--
2016-01-25 13:41:13 -05:00
Mike Blumenkrantz 6a20006ac2 prefer specific context activation for bindings over generic context
in the case where an ANY context action exists and a SPECIFIC context action
also exists for the exact same binding (eg. alt+click), the action which was
added to the config first would be activated

this is unreliable and confusing since it's impossible for users to determine
the order without either manually examining the config or clearing all bindings
and starting over, and this presupposes that the user is even aware of such an
issue

instead, now the most specific binding context will be chosen, with ANY used only
as a fallback in the case where no other binding could be activated for a given
scenario
2016-01-25 13:10:03 -05:00
Mike Blumenkrantz 37394b26c3 use event-finding functions to simplify key/edge binding handlers 2016-01-25 13:00:11 -05:00
Mike Blumenkrantz 93b106f17e add edge binding event find function
similar to key/mouse/wheel functions
2016-01-25 12:51:56 -05:00