Commit Graph

492 Commits

Author SHA1 Message Date
Mike Blumenkrantz 67153a06a2 make wayland client keyboard focus list pruning more robust
this should handle all possible cases where focused keyboard resources
need to be removed from the global list
2016-04-26 09:42:51 -04:00
Mike Blumenkrantz 5d64676bd0 run focus-out and mouse-out wayland client callbacks for deleted clients
this fixes a number of issues caused by clients not cleaning up on deletion

ref 3e9029ea08

 #YouAlwaysRememberTheFirstTimeYouBorkedTheCompositor
2016-04-26 09:42:51 -04:00
Derek Foreman ba88768344 Fix wayland hide for internal windows
We need to make sure we drop reference on all exit paths through the
hide callback - somehow this only seemed to break internal windows.

ref 65166c5a36
2016-04-26 09:42:51 -04:00
Derek Foreman 20303989de Re-enable window close animations for wayland
These should work properly with the new buffer management code.
2016-03-09 12:14:34 -05:00
Derek Foreman ee43c83c7d Remove wayland buffer reference
This code is similar to code in weston, but doesn't really work properly
for us in E, since this can blow up buffers behind the async renderer's
back.

The rest of the reference code has been pushed into e_pixmap, so we can
kill this all now.
2016-03-09 12:14:29 -05:00
Derek Foreman 7aef5e74fd Rework wayland buffer handling
We need to keep wayland buffers around even if they'll never be written
to again.  This is part of Buffer_Reference's task in weston, but we
already have our pixmap abstraction which can serve mostly the same
purpose.

Remove the "buffer reference" stuff from e_pixmap and replace it with a
kept buffer for the last commit.

Add shared memory pool references to keep pools from going away on us.
2016-03-09 12:14:23 -05:00
Derek Foreman 74ce8dd7be Take an extra reference on wayland clients
We need to make sure wayland clients aren't deleted while the scene
graph has their data pointers, so we take an extra reference when creating
them.

We drop that reference by clearing the client's image data and putting it
in the render post_updates list.
2016-03-09 12:14:08 -05:00
Mike Blumenkrantz b1a5eeeb0c remove some unused variables 2016-03-09 12:09:50 -05:00
Mike Blumenkrantz 2e692ace58 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-03-09 12:09:46 -05:00
Derek Foreman 5143ed69de 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-03-09 12:09:15 -05:00
Derek Foreman c7027d4f44 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-03-09 12:08:37 -05:00
Derek Foreman c9b720cccd 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-03-09 12:08:33 -05:00
Derek Foreman f8be94f19e 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-03-09 12:08:21 -05:00
Derek Foreman 209cf8f9d7 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-03-09 12:08:03 -05:00
Mike Blumenkrantz 97b6558444 handle more mouse buttons in wayland
according to the "reference" compositor this is how it works
2016-02-02 13:36:20 -05:00
Mike Blumenkrantz 9af96a4c23 determine new_client state for xwayland clients using xwayland pixmap
in the case where the xwayland pixmap has previously been marked as usable,
the corresponding client is guaranteed to have gone through the new_client
eval. allowing a second eval will result in wrong geometries being set for
the window in some cases
2016-02-02 13:36:14 -05:00
Mike Blumenkrantz 3535581b2c enable surface visibility fallthrough for drag clients
more surfaces with no shell interfaces
2016-02-02 13:35:43 -05:00
Mike Blumenkrantz c0be62b0b4 track wayland client mouse button states as a full button mask
sending a button release event to a surface which has not previously
received a button press yields strange results
2016-02-02 13:35:38 -05:00
Mike Blumenkrantz 7ae3d94308 remove _e_comp_wl_focus_down_set()
this function does nothing for wayland clients and never should have
been used in this file
2016-02-02 13:35:19 -05:00
Mike Blumenkrantz 65c222698c reenable fallthrough surface (un)mapping for subsurfaces during commit
subsurfaces have no shell interface and rely upon the map state of parent
surfaces to determine whether they are mapped
2016-02-02 13:35:15 -05:00
Mike Blumenkrantz 45d8cb6b5e remove duplicate visibility setting blocks from wayland surface commit
this is already present (and identical) in state commit
2016-02-02 13:35:03 -05:00
Mike Blumenkrantz 47196af43a always apply damages and input regions during wayland commit
mapped status is not relevant according to spec
2016-02-02 13:34:57 -05:00
Mike Blumenkrantz 3b77b7aa43 do not set focus in wayland client show callback for cursor clients 2016-02-02 13:34:53 -05:00
Mike Blumenkrantz 317f0794d6 automatically mark wayland cursor surfaces as visible during set_cursor
a cursor client should be shown/hidden as needed despite its lack of a
shell interface, and having a special flag to identify these types of
surfaces makes it easier to do that
2016-02-02 13:34:48 -05:00
Mike Blumenkrantz f129b0d7d5 |= instead of = flag setting for want_focus during wayland surface commit
if want_focus has already been set, this check should not unset it
2016-02-02 13:34:32 -05:00
Mike Blumenkrantz 62171ab39a improve focus setting during wayland client show callback
take_focus will only be handled if the new_client flag is set. in all
other casees, focus_set should be called directly

new_client flag implies changed flag
2016-02-02 13:34:28 -05:00
Mike Blumenkrantz 76d7824a7c only do passthrough surface map on xwayland surfaces during commit
these was a workaround for handling early internal windows which is
no longer necessary now that they will handle their map states more
effectively

now, any wayland surface (not xwayland) requires a shell to map the
surface as intended
2016-02-02 13:34:13 -05:00
Mike Blumenkrantz f1ccac3775 remove need_reparent, reparented, first_damage flags from wl client comp_data
these flags, and related code, have no functional purpose in wayland
2016-02-02 13:33:58 -05:00
Marcel Hollerbach a928205be4 e_comp_wl: only ignore ignored clients
a override client (in terms of override like x) should get focus, which
would not happen for the case of the function call.
2016-02-02 13:33:22 -05:00
Mike Blumenkrantz dfa9b45044 create wl client connection during compositor init, use in shot module
fixes shot module

ref T2919
2016-02-02 13:32:31 -05:00
Mike Blumenkrantz e67f238c06 call ecore_wl2_shutdown() in wl compositor delete callback
shutdown/restart crash--
2016-02-02 13:32:31 -05:00
Chris Michael 96b55ce441 Fix using global ewd variable by making it part of e_comp_wl
ref T2919

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:31 -05:00
Chris Michael be2221ed95 Try to init (and error check the init) of ecore_wl2 library before we
create a compositor

ref T2919

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:30 -05:00
Chris Michael 824003eb1d port wayland compositor to use Ecore_Wl2
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-02-02 13:32:30 -05:00
Derek Foreman c5e4a0ac81 wayland: Add support for wl_surface.damage_buffer
Summary:
damage_buffer posts damage in buffer co-ordinates instead of surface
co-ordinates.  For us currently these are always the same co-ordinate
spaces.  This will change when we start supporting viewports and
transforms.

Note: this is currently conditional on the macro
WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION which isn't in any
released wayland, but will be in the next.  We can remove
the ifdefs and change our wayland version dependency when
it's released

 #NefariousHiddenAgenda

Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3468
2015-12-28 13:48:34 -05:00
Mike Blumenkrantz ab0d5de40c set wayland new client focus based on accepts_focus and !override
seems to resolve some cases where focus is not applied to new clients
2015-12-11 16:48:46 -05:00
Mike Blumenkrantz cdd8d86abe make e_comp_wl_surface_attach static and take a surface state
when attaching a buffer, it's necessary to have the state available
in order to pull the buffer data into the state for use during commit

fixes subsurface frame callbacks
2015-12-11 16:48:40 -05:00
Mike Blumenkrantz 7836d58030 do not drop subsurface buffer early after commit from cache
this should work the same way as a normal surface
2015-12-11 16:48:34 -05:00
Mike Blumenkrantz c520000c33 apply already-committed wayland subsurface positioning after parent surface move 2015-12-11 16:48:02 -05:00
Mike Blumenkrantz 8239622d1b enforce wayland subsurface stacking order when parent surface is restacked 2015-12-11 16:47:53 -05:00
Derek Foreman 81ff082e0d Stop using MIN macros when choosing versions for wayland resources
Summary:
libwayland-server.so will post an error if the requested version
is higher than the supported one anyway, so there's no point in
doing this.

Using MIN() to pick versions is a client side idiom.

 #kansas

Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3385
2015-11-26 20:12:47 -05:00
Mike Blumenkrantz e8f4f30f40 adjust for SSD geometry during wayland client resize
client moveinfo includes the frame geometry, so this must be taken
into account when resizing a client which has a frame

fix T2863
2015-11-24 17:29:53 -05:00
Mike Blumenkrantz d32392760a always set wayland E_Client->redirected during client creation
fix T2846
2015-11-19 15:58:52 -05:00
Mike Blumenkrantz 4250a14861 set e_comp->gl for wayland compositors based on gl display bind success 2015-11-07 12:23:04 -05:00
Mike Blumenkrantz fc01d6a24c check for wayland egl extensions before starting a gl compositor
when running in software mode, evasgl performs no checking to determine
whether gl is available, leading to a crash due to missing extensions
2015-11-04 12:23:05 -05:00
Nicolas Aguirre a8bf439f88 Revert "Adds eglfs to Enlightenment"
This reverts commit ff1e7b5083.
2015-11-03 08:01:58 +01:00
Nicolas Aguirre 31ce65a2c4 Revert "Don't load xwayland if it isn't compiled"
This reverts commit 496ae3746f.
2015-11-03 07:57:56 +01:00
Florent Revest 496ae3746f Don't load xwayland if it isn't compiled 2015-11-03 07:50:21 +01:00
Florent Revest ff1e7b5083 Adds eglfs to Enlightenment 2015-11-03 07:37:41 +01:00
Mike Blumenkrantz ae6416c27c add wayland egl client support
definitely not a feature, I promise™
2015-11-02 16:25:02 -05:00