Commit Graph

174 Commits

Author SHA1 Message Date
Christopher Michael 8fd255c45c e_comp_wl: Remove wayland wobbly windows stuffs
This never worked properly, is unsupported by upstream wayland, and
just general clutter so let's remove it. There are no plans to support
this and is just extra overhead...
2021-03-01 10:35:15 -05:00
Carsten Haitzler f6e4be1005 e wl screen dimming.blanking/timeouts/lock handling redo/fixup
so there was a fair bit of stick-tape and chewing gum in putting the
wl screensaving in e_Screensaver.c ... it thus was very different to
the x stuff. it SHOULd have had e_comp_wl handle idle timeout like the
xserver did and then glue in the same way the x code did to be
conistsent. instead of trying to fix the chewing gum ball there in
e_Screensver.c to find the logic holes ... i made it work like the
code as indicated above. this now makes it work reliably. dim
reliably. lock reliably. it even doesnt exit on ctrl+alt+backspace
once desklock is up now to allow locks to really lock... (dont use
locks during dev then if you need ctl+alt+backspace).

at least now all this dpms/screensavwr/brightness/backlight/lock goop
is consistent between wl and x11 and wl seems reliabkle now (to me).

knock this off as an annoyance fixed.

@fix
2020-06-28 15:06:37 +01:00
Derek Foreman a037001031 Send unique keymap fds to clients
Summary:
Prevent wayland clients from being able to destroy the compositor's
singleton keymap by making individual copies for each client.

Reviewers: zmike, devilhorns

Reviewed By: zmike, devilhorns

Subscribers: cedric

Tags: #enlightenment-git

Differential Revision: https://phab.enlightenment.org/D6861
2018-08-17 12:28:49 -05:00
Mike Blumenkrantz 9a484d1b64 add generic handling for passing xkb objects to efl-wl objects under wayland
ensure that keymaps are effectively propagated to efl-wl clients and that key
presses are always propagated
2018-01-24 16:18:57 -05:00
Mike Blumenkrantz 6985df9058 throw unconfigured buffer error as necessary in wl_surface.commit 2018-01-08 11:53:52 -05:00
Mike Blumenkrantz 5cc08794ee handle passed output resource for xdg-shell fullscreen request 2018-01-08 11:14:05 -05:00
Mike Blumenkrantz 59fa0e418d use E_BITFIELD define for bitfield struct members
on release builds this will be a bitfield, on devel builds it will make
bools a normal unsigned char for easier debugging
2017-11-07 10:39:56 -05:00
Mike Blumenkrantz b8f8c42aec make wl_pointer cursor handling state-based to correctly handle cursor visuals
this fixes a lot of corner cases such as apps which set their cursor before
receiving pointer.enter events
2017-11-03 13:21:57 -04:00
Derek Foreman 077ae06955 Fix wayland frame callback failure
Turns out ecore_animator_add() can randomly pick the wrong canvas to use as
a tick source.  Using EFL_EVENT_ANIMATOR_TICK on the compositor evas instead
will ensure we don't accidentally pick an internal window for a tick source.

Fix T6070
2017-09-22 17:00:25 -05:00
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