Commit Graph

620 Commits

Author SHA1 Message Date
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