Commit Graph

165 Commits

Author SHA1 Message Date
Mike Blumenkrantz 4d0ceeb02c add fd passing to aux hints protocol 2017-09-21 13:31:01 -04:00
Mike Blumenkrantz 5da5418873 add a client parameter to wl key down/up event processing functions
if passed, send the event to the specified client
2017-09-21 13:31:01 -04:00
Derek Foreman 42d3e30f5c Handle wayland frame commits with no surface damage better
Previously we immediately kicked back the frame callback when a client
sent a surface frame without damage.  This let clients that use frames
for timing proceed, but they generally just send another frame right
away and spin in this way until they reach their intended render time.

Now we use animators so the frame callbacks will be limited to the
animator tick source's frequency.

ref T5850
2017-08-31 14:44:58 -05:00
Marcel Hollerbach 5b3f38efcf leave the E_Comp_Wl_Data define in e_comp.h
otherwise bulding without wayland breaks
2017-08-12 22:47:52 +02:00
Marcel Hollerbach fcd271dd1b e_comp_wl: move types into typedef section
WIth this we dont need a second define of the same type in e_comp.h

This fixes a duplicated definition warning
2017-08-12 15:17:03 +02:00
Marcel Hollerbach 8ef5a7c89d e_comp: stop including e_comp_x here without a reason 2017-08-12 15:17:03 +02:00
Mike Blumenkrantz c1cf0249a0 make action routes usable in subcompositors 2017-08-04 16:05:16 -04:00
Mike Blumenkrantz 862b02adc8 extend key action routing for general action contexts
this allows authorized clients to activate validated actions
2017-08-04 16:05:16 -04:00
Mike Blumenkrantz 8748b197fa implement action routing for wayland clients
this allows a wayland client to request that a given action name be bound
to the requested surface using a mode to restrict activation of the binding

modes include:
* shared
 - activated when any surface from the client has focus
* topmost
 - activated when the requested surface has focus and is the topmost client
* exclusive
 - activated when the requested surface has focus; blocks other action routes

 #SamsungFeatures

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-08-04 16:05:16 -04:00
Mike Blumenkrantz 2f97cb69db finish wl window stacks
fix T5350
2017-08-04 16:05:15 -04:00
Mike Blumenkrantz ab328c6512 implement support for wl aux hints
this is a direct copy of a feature from tizen git with no modifications other
than what was required for compilation and functionality

https://git.tizen.org/cgit/platform/upstream/enlightenment/commit/?id=8ea090222cee86b57e54f1444c5b63252380fba5
https://git.tizen.org/cgit/platform/upstream/enlightenment/commit/?id=2c5593325c3f32efa92da3c371a780e434a30efd

fix T5780
2017-07-28 15:45:01 -04:00
Mike Blumenkrantz def1b28174 save xwindow of x11 selection owner, not client
gtk uses non-application xwindows for managing selections, so this would always
fail when bridging selections from gtk apps
2017-07-28 15:44:55 -04:00
Mike Blumenkrantz 3055c0ecae remove wl screenshooter protocol
this should never have existed, as it makes no sense for a compositor to
use protocol in order to allow itself to take screenshots
2017-07-20 17:18:33 -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
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 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 2297427514 remove unused struct members 2017-04-21 16:16:38 -04:00
Mike Blumenkrantz a5cc19bd1a remove unused struct members from wl E_Comp_Wl_Client_Data 2017-04-07 16:08:38 -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 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 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 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 1bf6c2d5c3 remove e_comp_wl->ptr.grab_x/y
unused
2017-02-24 14:15:38 -05:00
Mike Blumenkrantz 2c7e91d38f make e_comp_wl->ptr.x/y ints and fix usage to be consistent
sometimes these were treated as ints and sometimes wl_fixed
2017-02-24 14:15:38 -05:00
Carsten Haitzler 8c87fe514d e comp - wl - add void cast to reduce warnings
we're pointer playing anyway so types here are not really useful. we
have to get our ptrs right - including alignment, and these warnings
are not useful and just noise.
2017-02-12 16:25:35 +09: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
Chris Michael 90c120985a minor formatting fix
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-07 11:09:54 -05:00
Mike Blumenkrantz e2f8d2ba69 implement pointer-constraints v1
xwayland nyi
2017-02-03 15:13:45 -05:00
Mike Blumenkrantz 186cf73294 implement relative-pointer v1 2017-02-03 15:13:45 -05: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
Mike Blumenkrantz 5aadf3b3ff implement xdg-foreign v1
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2017-01-13 11:34:50 -05:00
Mike Blumenkrantz 5497fadce4 xdg6 support 2016-11-22 11:31:22 -05:00
Derek Foreman f30ad5a48b Fix wayland extension global creation
The globals are singletons, but the bindings are per wl_client.
2016-07-29 16:45:30 -05:00
Marcel Hollerbach d1e700cb68 e_comp_wl: introduce api to set index of keymap
this commit introduces the setting of the index. Setting the index here
means that the layout with the id 0..n, out of the compiled keymap file
will be used. After a new index is set the modifiers are updated, that
the client are aware of the new resulting group.

If the api is called before the compositor is inited (this can happen
in e_xkb, so the drm can use the keymap at startup) then the index is
saved in between and will be flushed once the compositor does the init.
2016-06-30 20:19:33 +02:00
Derek Foreman 1f44a593c2 Track whether a surface is an xdg one 2016-06-29 16:19:20 -05:00
Derek Foreman 19817b47de Send wayland surface enter and leave events
These events are supposed to be sent to clients that have bound wl_output
and manipulate surfaces.
2016-06-21 12:33:49 -05:00
Mike Blumenkrantz b5576dbb8c use separate flag for pending wl client unmaximize
also set flag to prevent saved geometry from being overwritten
2016-06-20 16:04:10 -04:00
Derek Foreman 2d1802375d Add DMABuf support for wayland
This adds compositor handling of DMABuf buffers.  DMAbuf capabilities
are advertised for the drm back-ends, and DMAbuf buffers are handled
as native surfaces.
2016-05-18 12:05:34 -05:00
Derek Foreman 6b0c55dd96 Track parent compositor dmabuf capabilities on wayland on wayland
When running as a wayland compositor connected to another wayland
compositor, we don't want to advertise dmabuf capabilities if the
parent compositor doesn't support them.

If it does, we'll want to proxy dmabuf requests to it instead of handling
them ourselves.

Expose this as new bools in e_comp_wl.
2016-05-18 12:05:34 -05:00
Mike Blumenkrantz 6aee63d1dc redo wl (xdg)shell surface ping
- remove (wrong) global variables which tracked client-specific resources
- start ping upon creating a shell surface
- track client-specific shell resources on a per-client basis
2016-04-18 15:37:22 -04:00
Mike Blumenkrantz 63af4ea865 buffer server-side (un)maximize commands to ensure synchronization in wayland
maximize is client-initiated and compositor-enforced in wayland, meaning that a
maximize should only be acted upon in the compositor after the client has
acknowledged that it has transitioned into the maximized state (likely removing
part of its csd region) and has resized itself to match the expected maximize
size

fix T3297
2016-04-08 16:08:32 -04:00
Mike Blumenkrantz da74e690f0 redo xdg shell to enforce double buffering of client-side configure serials
xdg shell configure states (maximize, fullscreen) return a client ack when the
client has applied the state. the ack, followed by the next surface commit,
indicates that the surface is ready to be transitioned into the configured state
2016-04-05 15:05:10 -04:00
Mike Blumenkrantz 687b5fb6b6 set maximizing flag during maximize resizing for wl clients
a helpful indicator for when to avoid potentially leaking positioning info
2016-04-04 14:02:39 -04:00
Mike Blumenkrantz c70054174e implement www wayland extension handling for clients
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2016-04-01 06:29:49 -04:00
Mike Blumenkrantz e919734df7 extend wl extension macros to store globals into extension data 2016-03-21 17:24:24 -04:00
Mike Blumenkrantz b2107ae2b0 remove maximize_pre flag from wl client comp_data
this breaks modification of maximized size for surfaces as well as animations

fix T3297

partially reverts 0321fd690e
2016-03-12 11:18:10 -05:00
Derek Foreman 36586fbf9c 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-08 12:46:32 -05:00
Derek Foreman dfc7c26ce4 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-08 12:46:32 -05:00