Commit Graph

654 Commits

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