Commit Graph

707 Commits

Author SHA1 Message Date
Mike Blumenkrantz a142a7eb80 focus comp canvas's client when no real client is focused 2017-07-07 16:26:28 -04:00
Mike Blumenkrantz 1b6ccd5aa8 add handler to catch (new) fake elm win wl2 window client
now the compositor canvas has a wl2 window
2017-07-07 16:26:28 -04:00
Mike Blumenkrantz 5df53cec7b process screen events in wl when using fake screens 2017-06-30 10:25:18 -04:00
Mike Blumenkrantz 43dea93969 handle rotations with fake xinerama screens 2017-06-30 10:25:18 -04:00
Mike Blumenkrantz 69c85fc1aa only set E_Client->want_focus for wl override clients if not popup client
do not attempt to focus popups as they are already child windows and thus
do not require keyboard focus
2017-06-30 10:25:17 -04:00
Mike Blumenkrantz 42523d27f0 multiply pointer axis values by 10 for wl clients
wayland clients expect this multiplier, so now scrolling speed should be
back to normal
2017-06-30 10:25:17 -04:00
Derek Foreman 18fbd1da32 Don't delete busy E_Comp_Wl_Buffers
Hardware planes are going to make E_Comp_Wl_Buffer lifetimes harder to
manage, so we need to let the E_Comp_Wl_Buffer object outlive the
resource attached to it.

We already track a busy count, so we just have to use it to prevent
deleting a busy buffer.
2017-06-23 11:52:04 -05:00
Mike Blumenkrantz 773122db66 store output subpixel value to randr2 screen data during drm init 2017-06-16 15:00:12 -04:00
Mike Blumenkrantz d9c03f1059 use fake xinerama screens when initializing wl outputs
always ignore physical screens if fake ones are present
2017-06-16 15:00:12 -04:00
Mike Blumenkrantz 4933569bc1 don't null pointer after deleting internal win during wl delete request
this is invalid during a logout
2017-06-16 15:00:12 -04:00
Mike Blumenkrantz bf157e03dc another fix for e_comp_wl->ptr.x/y coords being wl_fixed instead of ints
ref 2c7e91d38f
2017-06-09 20:18:13 -04:00
Mike Blumenkrantz 9df31011c8 unset wl selection target client if that client is deleted
the frame deletion callback would trigger far too late, allowing
crashes to occur if the selection target client exited between the
time of the drop event and the selection send event
2017-05-12 12:08:37 -04:00
Mike Blumenkrantz b75f0d2be2 unset wl button mask when beginning a move/resize operation
ensure that clients do not receive a release event for any pressed
buttons
2017-05-12 12:08:37 -04:00
Mike Blumenkrantz 6a28856086 remove duplicated client stacking code from wl restack callback
this would always have resulted in double restacking since the client callback
already handles restacks
2017-04-07 16:08:37 -04:00
Mike Blumenkrantz 2ca599b317 apply transient stacking to wl clients when restack would not otherwise occur
ensure that transients are stacked consistently every time
2017-04-07 16:08:37 -04:00
Mike Blumenkrantz c196ef110e re-place transient wl clients when parent is first sized
this should ensure more reliable centering using a nonzero geometry
2017-04-07 16:08:37 -04:00
Mike Blumenkrantz 7fe67cf187 slightly optimize maximize -> fullscreen protocol comms for wl clients
this is a no-op since a configure will be sent later
2017-03-24 13:17:24 -04:00
Mike Blumenkrantz f6e332946c add flag for wl clients to determine ssd mouse-in vs client mouse-in
better handling for moving mouse into ssd region with xwl clients
2017-03-24 13:17:24 -04:00
Mike Blumenkrantz 1be8a5a590 always feed mouse events for wl client move events
better handling for xwayland case of moving pointer into ssd region
2017-03-17 15:08:38 -04:00
Mike Blumenkrantz 7f142f31f5 use even more accurate wl callbacks for detecting ssd mouse in/out events
ensure that any wl client with ssd hits the ssd mouse eventing path
2017-03-17 15:08:38 -04:00
Mike Blumenkrantz a151ac30b8 do not send mouse events to ssd wl clients if mouse is within ssd region 2017-03-17 15:08:38 -04:00
Mike Blumenkrantz f2ab232f3e Revert "Stop sending wayland motion events when the mouse is grabbed"
This reverts commit 0a91a24573.

this should be resolved in a more readable way now
2017-03-17 15:08:38 -04:00
Mike Blumenkrantz 8f197eba71 compare against e_client_action_get() for rejecting wl mouse events
signal actions do not set the cur_mouse_action pointer, but the return
of this function will still match the client for a more accurate heuristic
2017-03-17 15:08:38 -04:00
Mike Blumenkrantz 5a94a95e63 send wl client resize edges during focus-in/out send_configure
avoid prematurely terminating resize operations
2017-03-17 15:08:38 -04:00
Mike Blumenkrantz e23bf0cf68 do not use animations for wl clients with initial maximize state
this looks fugly and breaks all kinds of things
2017-03-17 13:16:59 -04:00
Mike Blumenkrantz 0d8b33c15f use maximized geometry for shell maximize calls on wl clients if !buffer_commit
this is for setting the initial state of a surface as maximized, so do not use
animation geometry here
2017-03-17 13:16:59 -04:00
Mike Blumenkrantz 71c9cedfbf only hide wl clients on surface destroy when surface is mapped
fixes some cases where hide animations would not be visible
2017-03-17 13:16:59 -04:00
Mike Blumenkrantz cc434190ad call wl/x compositor shutdown functions directly during comp shutdown 2017-03-10 15:55:06 -05:00
Mike Blumenkrantz a7f708d568 add wl client flag to indicate status of xdg6 pre-buffer configure
ensure that initial configure is not sent more than once

ref T5044
2017-03-10 15:55:06 -05:00
Mike Blumenkrantz 802136f5f2 do not use saved e_randr screens if fake screens have been added 2017-03-10 15:55:06 -05:00
Mike Blumenkrantz d29fb6b0b5 do not unset E_Client->placed for fullscreen/maximize clients
these are already placed
2017-03-03 10:49:33 -05:00
Mike Blumenkrantz cfb1fa41e6 add all wl client frame callbacks with priority AFTER
ensure that these occur after all other callbacks since they can affect
the lifetime of the client object
2017-03-03 10:49:33 -05:00
Mike Blumenkrantz 504f88d24a hide wl clients before deleting them on surface destroy
==13853== Invalid read of size 8
==13853==    at 0x5C7C56: _e_comp_wl_surface_destroy (e_comp_wl.c:1804)
==13853==    by 0xA999971: destroy_resource (wayland-server.c:611)
==13853==    by 0xA9A06F4: for_each_helper (wayland-util.c:374)
==13853==    by 0xA9A073F: wl_map_for_each (wayland-util.c:387)
==13853==    by 0xA999C87: wl_client_destroy (wayland-server.c:763)
==13853==    by 0xA999216: wl_client_connection_data (wayland-server.c:283)
==13853==    by 0xA99C2B0: wl_event_source_fd_dispatch (event-loop.c:90)
==13853==    by 0xA99CC11: wl_event_loop_dispatch (event-loop.c:423)
==13853==    by 0xA787AC0: _cb_create_data (ecore_wl2_display.c:272)
==13853==    by 0xDBE984D: _ecore_call_fd_cb (ecore_private.h:333)
==13853==    by 0xDBEC01B: _ecore_main_fd_handlers_call (ecore_main.c:1992)
==13853==    by 0xDBEC8A9: _ecore_main_loop_iterate_internal (ecore_main.c:2379)
==13853==    by 0xDBEA672: ecore_main_loop_begin (ecore_main.c:1292)
==13853==    by 0x441DA9: main (e_main.c:1089)
==13853==  Address 0x30ba5d90 is 176 bytes inside a block of size 1,424 free'd
==13853==    at 0x4C2ED4A: free (vg_replace_malloc.c:530)
==13853==    by 0x4603D6: _e_client_free (e_client.c:588)
==13853==    by 0x5475A8: e_object_free (e_object.c:119)
==13853==    by 0x5477C4: e_object_unref (e_object.c:152)
==13853==    by 0x5473D7: e_object_del (e_object.c:60)
==13853==    by 0x5C7C51: _e_comp_wl_surface_destroy (e_comp_wl.c:1803)
==13853==    by 0xA999971: destroy_resource (wayland-server.c:611)
==13853==    by 0xA9A06F4: for_each_helper (wayland-util.c:374)
==13853==    by 0xA9A073F: wl_map_for_each (wayland-util.c:387)
==13853==    by 0xA999C87: wl_client_destroy (wayland-server.c:763)
==13853==    by 0xA999216: wl_client_connection_data (wayland-server.c:283)
==13853==    by 0xA99C2B0: wl_event_source_fd_dispatch (event-loop.c:90)
==13853==    by 0xA99CC11: wl_event_loop_dispatch (event-loop.c:423)
==13853==    by 0xA787AC0: _cb_create_data (ecore_wl2_display.c:272)
==13853==    by 0xDBE984D: _ecore_call_fd_cb (ecore_private.h:333)
==13853==    by 0xDBEC01B: _ecore_main_fd_handlers_call (ecore_main.c:1992)
==13853==    by 0xDBEC8A9: _ecore_main_loop_iterate_internal (ecore_main.c:2379)
==13853==    by 0xDBEA672: ecore_main_loop_begin (ecore_main.c:1292)
==13853==    by 0x441DA9: main (e_main.c:1089)
==13853==  Block was alloc'd at
==13853==    at 0x4C2FA50: calloc (vg_replace_malloc.c:711)
==13853==    by 0x5471A4: e_object_alloc (e_object.c:20)
==13853==    by 0x467AD5: e_client_new (e_client.c:2596)
==13853==    by 0x5C7F11: _e_comp_wl_compositor_cb_surface_create (e_comp_wl.c:1858)
==13853==    by 0xADBDC57: ffi_call_unix64 (in /usr/lib64/libffi.so.6.0.2)
==13853==    by 0xADBD6B9: ffi_call (in /usr/lib64/libffi.so.6.0.2)
==13853==    by 0xA99EEED: wl_closure_invoke (connection.c:935)
==13853==    by 0xA999581: wl_client_connection_data (wayland-server.c:371)
==13853==    by 0xA99C2B0: wl_event_source_fd_dispatch (event-loop.c:90)
==13853==    by 0xA99CC11: wl_event_loop_dispatch (event-loop.c:423)
==13853==    by 0xA787AC0: _cb_create_data (ecore_wl2_display.c:272)
==13853==    by 0xDBE984D: _ecore_call_fd_cb (ecore_private.h:333)
==13853==    by 0xDBEC01B: _ecore_main_fd_handlers_call (ecore_main.c:1992)
==13853==    by 0xDBEC8A9: _ecore_main_loop_iterate_internal (ecore_main.c:2379)
==13853==    by 0xDBEA672: ecore_main_loop_begin (ecore_main.c:1292)
==13853==    by 0x441DA9: main (e_main.c:1089)
2017-03-03 10:49:33 -05:00
Mike Blumenkrantz 58f7d7e54e do not shortcut wl surface commit unignore path for internal wins
this doesn't seem to do anything and therefor is not worthwhile
2017-02-24 14:15:38 -05:00
Mike Blumenkrantz b0cb4b38d6 redo wl client setting of E_Client->take_focus and E_Client->want_focus
this used to be set on show since the assumption was that show was the
first time the client would be seen, but this turns out to be incorrect
and results in focus being set too early (breaking policy)
2017-02-24 14:15:38 -05:00
Mike Blumenkrantz e7539003ba unadjust wl surface coords before applying position during commit
this seems to fix some positioning issues with internal wins
2017-02-24 14:15:38 -05:00
Mike Blumenkrantz a117c977dd e_menu_grab_window_get() -> e_menu_is_active()
0 is a valid canvas window id, and this function was no longer being used
for its original purpose
2017-02-24 14:15:38 -05:00
Mike Blumenkrantz 8f3c9dd796 do not use new_client to determine placement-related paths during wl client commit
this is a remnant from xdg5-only code where new_client meant "first buffer". with
xdg6, this is no longer the case since a surface can receive infinite commits
without ever having a buffer attached

ref 9a82f7bcb0
2017-02-10 17:24:13 -05:00
Mike Blumenkrantz d6052cbbfd unignore wl clients on first commit regardless of buffer attachment
this allows for things to begin catching "new" clients as soon as possible
in the compositor
2017-02-10 17:24:13 -05:00
Mike Blumenkrantz 7c118eb272 use E_Client->changes.size for validating wl client geom during configure
xdg6 allows for clients without buffers to be configured such that the
first buffer will match the configured state

if a client is sized before this point, the changes.size flag will be set
2017-02-10 17:24:13 -05:00
Mike Blumenkrantz 51782fd5ee Revert "e - wayland - fix double-resize if e wants a different initial size"
This reverts commit e1c3120689.

this commit revealed a number of issues with the xdg6 implementation related
to unconfigured buffer management: see subsequent patches for a less
sledgehammer-y solution

ref 5497fadce4
2017-02-10 17:24:13 -05:00
Mike Blumenkrantz c6216d7c1e reset compositor pointer cursor if wl surface destroy is the current cursor
this should never happen and is only included as a failsafe

 #TheDisappointer
2017-02-10 17:24:13 -05:00
Mike Blumenkrantz 00329d6f29 force mouse-out on wl clients during delete if mouse.in is set
#TheDisappointer
2017-02-10 17:24:13 -05:00
Derek Foreman 391c833a8d Remove tests for wayland damage_buffer presence
We now depend on a version of wayland that has these, so we don't
need to handle the case where it's not available anymore.
2017-02-10 10:06:00 -06:00
Carsten Haitzler e1c3120689 e - wayland - fix double-resize if e wants a different initial size
let's say you sue tiling or some module and it wants a window by
default to maximize or fill the screen or be size XxY ... this stops
the client first having a buffer smaller (or larger) and then sizing
down rendering 2 times (one of the renders is pointless). this makes
initial buffer render/show seamless as it should be in wayland.
2017-02-10 19:23:43 +09:00
Derek Foreman 2021480748 Dispatch wayland frame callbacks in the correct order
The protocol says they should be dispatched in the order they're
registered, so switch to list append instead of list prepend.
2017-02-08 13:25:30 -06:00
Chris Michael 63a9bae282 fix potentially uninitialized variables
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-07 13:18:19 -05:00
Chris Michael 76cbf61616 minor formatting fix
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-07 11:09:49 -05:00
Derek Foreman 73aecd73ab Replace all timer_add with timer_loop_add
So yeah, I've literally used sed to replace every occurrence of
ecore_time_add() with ecore_timer_loop_add() because I'm reasonably
confident that no part of E has a legitimate need for timer based on the
exact current time.

It would be really nice if I'm not wrong. :)

The reason for this is the incredible spew of clock_gettime() calls I'm
seeing on an ARM system (that should have a vdso for gettime, but...)
This can amount to thousands of system calls per second.

 #YOLO
2017-02-03 15:52:28 -06:00
Mike Blumenkrantz ee4a861f90 use 1x1 for unsized (internal) clients
this was a typo
2017-02-03 15:13:45 -05:00
Mike Blumenkrantz d566b54049 simplify mouse-out cursor reset for wl clients
this is handled by e_pointer_object_set()
2017-02-03 15:13:45 -05:00
Mike Blumenkrantz e2f8d2ba69 implement pointer-constraints v1
xwayland nyi
2017-02-03 15:13:45 -05:00
Derek Foreman 0a91a24573 Stop sending wayland motion events when the mouse is grabbed
This stops the compositor from sending motion events to internal
windows while they're being moved or resized.
2017-02-02 12:03:51 -06:00
Chris Michael 1974f5da2d Revert "send wl_touch events when we handle mouse buttons"
Reverting this as it ends up causing multiple events being handled
(touch and pointer) inside various clients if you have both touch and
pointer enabled. Will need a different fix here....

This reverts commit 7906537c02.
2017-01-17 13:28:05 -05:00
Chris Michael 7906537c02 send wl_touch events when we handle mouse buttons
Small patch to enable sending wl_touch down/up events when pointer
mouse button events are handled. This is needed in the case where we
do Not have any mouse pointer at all, but we do have touch support.

ref T5094

NB: This allows weston-simple-touch client to operate in Enlightenment
now. There is still something strange happening with EFL clients in E
wrt touch events tho...

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-17 11:31:48 -05:00
Mike Blumenkrantz 0c56e19a64 validate xdg-shell move/resize requests against latest button serial
these are supposed to match in order to initiate the corresponding action
2017-01-13 11:35:20 -05:00
Chris Michael c5ad11886c fix shadowed variable declaration
Eina_List *l is already previously defined at the top of this
function. Since we are just using it for list iteration, there is no
need to define it again.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-04 08:30:53 -05:00
Carsten Haitzler 652d7e113e e wl - fix build break with wl. 2016-12-16 22:03:17 +09:00
Carsten Haitzler 5c38609e0e client handling - add support for window stacks needed for views/manager
this adds core basic handling for window stacks where windows behave
correctly as a single unified stack something like what naviframe does
but out-of-window so you can including multiple processes. only on x11
right now as it's being supported/worked on.

as we dont plan to kepe naviframe in future, this is the way to go.
naviframe "pages" will be windows in a stack. the wm should do the
nice thing. in e this will be very nice. for now elsewhere we use
transient_for so a wm would treat this like a bunch of dialogs with a
single parent window. i guess in a desktop thats probably what you
might expect. e will be a little more "finesse" filled.

need to make ibar, tasks,m win menu and winlist (alt-tab) respect this
and only show the top member of a stack.

need to send messages to clients when they are "top" or "middle" or
"bottom" or "alone" in the stack or something so decorations can change.

should add soem new border signals in theme (for both SSD and CSD) to
make this look nice. will need some config additions for that and
ability for e comp to do the right thing

but this is a solid start
2016-12-16 16:17:10 +09:00
Mike Blumenkrantz ca7c77d05e fix internal wl windows to exit when border X is clicked 2016-12-05 10:49:06 -05:00
Chris Michael 4aba7e7beb remove unused variables in e_comp_wl
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-02 10:41:46 -05:00
Derek Foreman 41e60d251e Stop sending key up/down events on focus change under wayland
We shouldn't be doing this, but there's a collective memory that
this was put in place to fix stuck modifier bugs.

If we run into stuck modifiers again because of this patch, then we
should be fixing them in a different way.

If anyone bisects to this point, I apologize - assign me a ticket.
2016-12-01 10:55:49 -06:00
Mike Blumenkrantz 08ee9293df feed mouse move and canvas mouse up upon breaking a wl surface grab
ensure that the hw pointer location and the cursor location match after grabs

fix T4939
2016-12-01 11:22:42 -05:00
Derek Foreman 60617c82d7 More aggressively prune keyboard focus list
Even if a client is deleted we still need to get its resources off the
keyboard focus list.
2016-11-30 14:48:54 -06:00
Derek Foreman ce34c550e7 Fix crash when exiting an xdg shell application
The focus in timer has been firing for deleted clients, this causes a
NULL pointer dereference.

Then again, maybe the timer should've been disabled by now...
2016-11-30 14:48:54 -06:00
Derek Foreman 8245c1eb7a Fix keyboard tracking when leaving an xdg shell window
_parent_client_contains_pointer() shouldn't return true if there is no
parent client.  This could result in leaving stale resources in the
keyboard focus list and crash the compositor.
2016-11-30 14:48:54 -06:00
Mike Blumenkrantz ca5176e6fa handle input detection for wl surface grabs more accurately using stacking
this should more accurately handle cases where mouse movements over grabbed
surfaces are intercepted by overlapping windows
2016-11-30 12:46:54 -05:00
Mike Blumenkrantz f83045dc62 move the comp canvas cursor object during wl surface grabs
the struct member is not guaranteed to be the visible object, so get
the ee cursor and move that
2016-11-30 12:34:30 -05:00
Mike Blumenkrantz 19a902ec09 stack subsurfaces above their parents upon creation
handles the case where no explicit stacking is set on the subsurface
2016-11-29 10:11:23 -05:00
Mike Blumenkrantz e95541635e clarify some wl surface checks to require elm wins
these should not apply to role-less surfaces
2016-11-22 11:31:22 -05:00
Mike Blumenkrantz 7b7e56af0c require an elm win to apply auto-visibility for internal wins in wl surface commit
other internal surfaces could be things like cursors, and these should not be made visible
before setting a role
2016-11-22 11:31:22 -05:00
Mike Blumenkrantz 5497fadce4 xdg6 support 2016-11-22 11:31:22 -05:00
Mike Blumenkrantz 6f5feb99b2 remove wl client pixmap aliasing on del
not sure why I added this but it was wrong
2016-11-08 12:49:23 -05:00
Mike Blumenkrantz 886d29d5d5 unset wl client surface pointer on surface destroy
leaving this around after this point is dangerous and has a high probability
of crashing
2016-11-08 12:49:23 -05:00
Mike Blumenkrantz 1c4b11ef9f reset initial internal wl client states when hiding (but not deleting)
ensure that these windows are not able to be shown again until commits occur
2016-11-08 12:49:23 -05:00
Derek Foreman b5205a0ca3 Stop passing dimensions to _e_comp_wl_surface_state_init
The dimensions we passed were frequently wrong anyway, so let's stop
doing that.
2016-11-04 16:25:58 -05:00
Derek Foreman a9d710ab27 Fix wayland opaque regions
Similar set of changes to the recent input region changes.  They may not
have been quite so broken to begin with, but it's probably less confusing
to treat both types of region the same way.
2016-11-04 16:25:58 -05:00
Derek Foreman 404a23f7d3 Fix massive wayland input region brokenness
It was impossible to set an empty input region.

Input regions were being clipped to the size of whatever buffer was
previously attached when they should really be clipped at commit
time to whatever buffer was attached in the commit.

The intersection operation created round off errors and
e_comp_object_input_area_set is clipping anyway, so we can simplify this
and retain precision.
2016-11-04 16:25:58 -05:00
Derek Foreman e74f2a45af Increase area of tilers for regions
We don't have any idea at this point what the region will be used for,
and tilers clip to their area on ingress.  If we're going to use tilers
for wayland regions we need to make them huge and clip them later.
2016-11-04 16:25:58 -05:00
Chris Michael d6c6961ab4 check if a client is internal or not before deleting
This fixes a crash where mousing back into internal windows would
cause a crash (from efl wayland mouse pointers).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-31 14:22:03 -04:00
Derek Foreman 30e9f45dfc Block session recovery for internal windows 2016-10-25 14:12:15 -05:00
Chris Michael 2c096f685c Revert "reset elementary softcursor config on shutdown"
This reverts commit bdd290591c.

Reverting this as we need to find a better way to handle mouse
pointers on EFL Wayland Clients.
2016-10-25 11:06:07 -04:00
Chris Michael d4b9ad591e Revert "disable elementary softcursor mode for wayland compositing"
This reverts commit f7592166eb.

Reverting this as we need to find a better way to handle mouse
pointers for EFL Wayland Clients.
2016-10-25 11:06:07 -04:00
Chris Michael bdd290591c reset elementary softcursor config on shutdown
This is needed because if we shutdown E then try to run EFL apps in
Weston, the Elm Softcursor mode would have been saved as 'off' so we
should be sure to reset this.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-25 07:44:41 -04:00
Chris Michael f7592166eb disable elementary softcursor mode for wayland compositing
This commit disables elementary softcursor mode when running as a
wayland compositor. This stops any EFL Wayland Client apps from
creating their own mouse pointer and thus we do not have 2 mouse
pointers on EFL apps anymore.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-24 13:52:09 -04:00
Derek Foreman e4da5ba56a Auto generate wayland protocol
Replaces any checked-in wayland protocol files with auto-generation.

In some cases this means renaming include files that didn't use "standard"
names, or adding missing xml files.  Any source edits are simple search and
replace, there should be no functional changes.
2016-09-26 15:23:50 -05:00
Derek Foreman c528245469 Don't send keyboard leave events to unfocused clients
This fixes a problem when focus moves between two xwayland clients.

My testing of gtk applications shows no regressions, bug if xdg_shell
popups start behaving oddly again, look here first.
2016-08-26 12:05:58 -05:00
Mike Blumenkrantz 3a561bb00a ignore xwl clients when flagging wl surfaces as internal
fix T4430
2016-08-26 10:51:20 -04:00
JengHyun Kang dca5cc2fa0 e_comp_wl: break from meaningless loop
Summary:
kbd.keys are only added from e_comp_wl_key_down().
         And in that function, duplicated keys are not add in the list.
         So only one key is going to be in the list.

Test Plan: Watch kbd.keys list during key press / release.

Reviewers: raster, devilhorns, zmike!, ManMower

Reviewed By: ManMower

Subscribers: duna.oh, input.hacker, cedric

Differential Revision: https://phab.enlightenment.org/D4230
2016-08-17 10:22:37 -04:00
Mike Blumenkrantz 3b21839615 clear wl subsurface data during delete only if subsurface is not also deleted
fix T4297
2016-08-08 11:38:32 -04:00
Derek Foreman 926d9ab6d8 Fix test for object visibility when deleting wayland clients
In the very last commit I got the visibility check wrong.

ref 0680250d72
2016-07-21 14:29:20 -05:00
Derek Foreman 0680250d72 Fix wayland clients not deleting when they're hidden
We kept an extra reference for wayland clients and dropped it on their final
render to stop crashes.  However, if they're not on screen at the time of
their deletion this reference still needed to be dropped.

Fixes clients remaining on the deskmirror after dying on another desktop.
2016-07-21 13:11:37 -05:00
Derek Foreman 248fa6d1e6 Fix xdg_shell focus logic
Moves and resizes tripped up the new xdg focus logic, so test if the
focus is leaving the client entirely before trying to determine if it's
leaving into a parent surface.
2016-07-13 16:03:55 -05:00
Derek Foreman e32db0e7e3 Make sure the same keyboard resource doesn't end up on the focus list twice
This stops recent xdg_popup focus tracking changes from causing multiple
key events to be sent to the focused client.
2016-07-13 16:01:51 -05:00
Derek Foreman 963afc8fea Properly send kbd focus to xdg_shell popups
Oops, a client can have multiple top level windows.

ref f391a0fb67
2016-07-08 16:12:43 -05:00
Derek Foreman f391a0fb67 Fix xdg_shell keyboard enter/leave events
On xdg_shell we should only ever send enter/leave to top level surfaces
or GTK becomes sad.
2016-06-29 16:23:41 -05:00
Derek Foreman ada8e2deac Don't send keyboard leaves to unmapped wayland surfaces
There are actually toolkits that create surfaces, do nothing with them,
and destroy them.  Sending keyboard leave events for this causes problems.

Fixes a bug in handling of some GTK popups.
2016-06-29 16:21:49 -05:00
Derek Foreman 27e9845abd Only unignore a client on the first commit with a buffer
Otherwise, if a wayland client does its first commit without a buffer
attached it will confuse our focus logic.
2016-06-29 13:20:37 -05:00
Mike Blumenkrantz cefcc5248f add some hacks to route mouse events to wl popups correctly while mouse is down
in a choice between fixing a corner case popup behavior and breaking dnd
or having functional dnd and adding hacks to fix corner case popup behavior,
adding more hacks was the obvious correct solution

ref 03a4ecbdb0
2016-06-24 11:31:02 -04:00
Mike Blumenkrantz 4852a6903b remove unused event info from _e_comp_wl_mouse_out() 2016-06-24 11:31:02 -04:00