Commit Graph

19876 Commits

Author SHA1 Message Date
Chris Michael 846722277c Revert "wl-drm: Fix issue of not being able to set output mode"
Reverting this in favor of a better way to fix the issue inside EFL
itself.

This reverts commit 5dc1c1c8eb.
2017-11-01 08:49:55 -04:00
Mike Blumenkrantz b5320b6246 explicitly free client animation agent object during fullscreen operation
ensure that animations do not persist after fullscreen state has been set
2017-10-31 12:04:48 -04:00
Mike Blumenkrantz 0f216c7e95 handle more mouse buttons under wayland
this was incorrectly referenced from weston's x11 compositor, which directly
uses xcb events and sends them as wl_pointer events. efl translates all input
events to use the same button scheme numbering, coincidentally enabling the use
of this code for all backends
2017-10-30 10:51:20 -04:00
Mike Blumenkrantz 47df20207d block wl modal window destructor from intercepting xwl modal windows
failing to pass these to the xwl destructor breaks the xserver

ref T5593
2017-10-30 10:29:39 -04:00
Mike Blumenkrantz ac49e6de22 unset xwayland client changes.pos flag during xwl->wl switch if client is unplaced
fixes some initial client positioning issues
2017-10-30 10:29:39 -04:00
Carsten Haitzler 4f8e3acfcf nvidia driver workaround atexit handlers for pam auth
this works around an apparently atexit() handler in nvidia drivers
that if you fork() a parent and do NOT exec() then the child process
will end up messing with the parent processes access to the nvidia
devices/display/whatever i believe via an atexit() handler because
moving from exit() to _exit() solves the issue. fixes T6197

@fix
2017-10-30 13:11:06 +09:00
Carsten Haitzler 3daf3ac456 e main - xdg runtime dir fixup - dont overwrite same buffer
this path i never saw triggered before on linux because xdg runtime
dir is set... but if it isn't... dont mess up the runtime dir path

@fix
2017-10-28 23:43:50 +09:00
Mike Blumenkrantz 3d701839b6 send wl pointer leave for deleted clients if viable 2017-10-27 13:21:03 -04:00
Mike Blumenkrantz bbb3ec1fc5 unset client's mouse-in state on mouse out even while fullscreen or deleted
the state should always be updated regardless of these attributes
2017-10-27 13:21:03 -04:00
Carsten Haitzler 32be41d505 ptr grab/ungrab for blank/unblank - log stages and work done for debug
looking to get more info for what is going on...
2017-10-26 10:50:37 +09:00
Chris Michael 5dc1c1c8eb wl-drm: Fix issue of not being able to set output mode
If we pass in screen geometry here when trying to set an output mode,
we can encounter "out of memory" errors from libdrm with outputs that
have a high resolution. As it turns out, we should be passing 0, 0 for
the x/y values when trying to set an output mode.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-10-25 15:28:46 -04:00
Derek Foreman fa1a858356 Fix crash on wayland logout if xwayland hasn't started yet
If xwayland hasn't started yet then the root window id is 0, which is
invalid, so we crash in e_comp_x_shutdown.
2017-10-25 14:17:10 -05:00
Derek Foreman 930cf317d6 Clear stored root window id when shutting down X
Currently e_comp_util_has_x() will still return true after the X
machinery is shut down - this can lead to crashes on logout under
wayland when xwayland apps are running.  Clearing the root window
id resolves this.

@ref T5593
2017-10-25 10:45:05 -04:00
Mike Blumenkrantz c09b2f35dd add client refs for volume control sinks
ref T6150
2017-10-25 10:45:05 -04:00
Mike Blumenkrantz 40be5b9d45 move x11 compositor cleanup into shutdown function 2017-10-25 10:45:05 -04:00
Derek Foreman 680b7b485d Fix xwayland related crash when mousing out of a window
XWayland likes to set a buffer on the cursor surface then delete it before
we release it.  I'm pretty sure when a client does that we're within spec
to just kill it, but users will likely find this response ungratifying.

So, instead, just gracefully fail to render the undefined surface.

@ref T5593
2017-10-24 13:57:00 -05:00
Mike Blumenkrantz 02ea045ca7 cancel wl selections after removing destroy listener
cancel may destroy the selection source, resulting in invalid access

==10735== Invalid write of size 8
==10735==    at 0x87C8095: wl_list_remove (wayland-util.c:56)
==10735==    by 0x2EE745: _e_comp_wl_data_device_selection_set (e_comp_wl_data.c:506)
==10735==    by 0x2EF241: _e_comp_wl_data_device_cb_selection_set (e_comp_wl_data.c:714)
==10735==    by 0x1021F037: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
==10735==    by 0x1021EA99: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
==10735==    by 0x87C70C0: wl_closure_invoke (connection.c:935)
==10735==    by 0x87C13C8: wl_client_connection_data (wayland-server.c:406)
==10735==    by 0x87C4483: wl_event_source_fd_dispatch (event-loop.c:90)
==10735==    by 0x87C4DE4: wl_event_loop_dispatch (event-loop.c:423)
==10735==    by 0x85AE346: _cb_create_data (ecore_wl2_display.c:399)
==10735==    by 0x946857A: _ecore_call_fd_cb (ecore_private.h:347)
==10735==    by 0x946AE51: _ecore_main_fd_handlers_call (ecore_main.c:2015)
==10735==    by 0x946B823: _ecore_main_loop_iterate_internal (ecore_main.c:2403)
==10735==    by 0x946935E: ecore_main_loop_begin (ecore_main.c:1308)
==10735==    by 0x151139: main (e_main.c:1088)
==10735==  Address 0x222ca980 is 16 bytes inside a block of size 136 free'd
==10735==    at 0x4C2CE1B: free (vg_replace_malloc.c:530)
==10735==    by 0x2F076F: e_comp_wl_clipboard_source_unref (e_comp_wl_data.c:1291)
==10735==    by 0x214C6A09: _xwayland_send_cancelled (dnd.c:149)
==10735==    by 0x2EE71D: _e_comp_wl_data_device_selection_set (e_comp_wl_data.c:504)
==10735==    by 0x2EF241: _e_comp_wl_data_device_cb_selection_set (e_comp_wl_data.c:714)
==10735==    by 0x1021F037: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
==10735==    by 0x1021EA99: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4)
==10735==    by 0x87C70C0: wl_closure_invoke (connection.c:935)
==10735==    by 0x87C13C8: wl_client_connection_data (wayland-server.c:406)
==10735==    by 0x87C4483: wl_event_source_fd_dispatch (event-loop.c:90)
==10735==    by 0x87C4DE4: wl_event_loop_dispatch (event-loop.c:423)
==10735==    by 0x85AE346: _cb_create_data (ecore_wl2_display.c:399)
==10735==    by 0x946857A: _ecore_call_fd_cb (ecore_private.h:347)
==10735==    by 0x946AE51: _ecore_main_fd_handlers_call (ecore_main.c:2015)
==10735==    by 0x946B823: _ecore_main_loop_iterate_internal (ecore_main.c:2403)
==10735==    by 0x946935E: ecore_main_loop_begin (ecore_main.c:1308)
==10735==    by 0x151139: main (e_main.c:1088)
==10735==  Block was alloc'd at
==10735==    at 0x4C2DC05: calloc (vg_replace_malloc.c:711)
==10735==    by 0x2F0520: e_comp_wl_clipboard_source_create (e_comp_wl_data.c:1231)
==10735==    by 0x214C71C9: _xwl_selection_notify (dnd.c:286)
==10735==    by 0x946130C: _ecore_call_handler_cb (ecore_private.h:331)
==10735==    by 0x94626BC: _ecore_event_call (ecore_events.c:629)
==10735==    by 0x946B83E: _ecore_main_loop_iterate_internal (ecore_main.c:2408)
==10735==    by 0x946935E: ecore_main_loop_begin (ecore_main.c:1308)
==10735==    by 0x151139: main (e_main.c:1088)
2017-10-20 13:40:20 -04:00
Mike Blumenkrantz 160d6b91a0 null wl clipboard+selection source pointers when destroying clipboard source
fix T6242
2017-10-20 13:40:20 -04:00
Mike Blumenkrantz b24b68df77 set null input regions for surfaces upon calling set_cursor or start_drag
these surfaces have no input region according to spec
2017-10-20 13:40:20 -04:00
Mike Blumenkrantz 5cab9486f3 ignore set_input_region requests for wl surfaces which are cursors or drags
according to spec this is correct behavior
2017-10-20 13:40:20 -04:00
Mike Blumenkrantz b3356a7e8f do not unqueue render when deleting a client's render update
a render loop may run for reasons other than rendering a specific client
2017-10-20 13:40:20 -04:00
Mike Blumenkrantz ef69fabd47 add client refs for the nocomp client
this client may be referenced after deletion during render loop

fix T6151
2017-10-20 13:40:20 -04:00
Carsten Haitzler 0fada40917 smart suspend - honor suspend on ac or not flag as it should
so if you closed the lid ANd didn't have external screens ANd had ac
plugged in ... e would suspend even if youdidn't have "suspend on ac"
checked in blanking dialog. respect this and handle it properly.

@fix

side note... i've notced acpid no longer reporting lid events on one
of my systems. this is very sucky. you now have to open
/dev/input/event2 (this may vary from device to device) to get lid
events... it's an input device. this means elput needs to start doing
this as we cant get power button or lid events anymore .... and we may
have to do this for x11 too.
2017-10-18 13:33:47 +09:00
Carsten Haitzler 929037aaa0 battery modules - actually set ac power flag based on ac presence
this should fix T3649

@fix
2017-10-18 13:32:50 +09:00
Mike Blumenkrantz f20765df67 add render update when showing clients if damages exist
ensure that these clients render as expected

ref T5593
2017-10-13 09:46:19 -04:00
Stephen Houston 39b0632f40 Align the preview properly. 2017-10-11 16:21:23 -05:00
Stephen Houston c234be9485 Luncher: Don't manually apply min sized aspect - The edje aspect set call handles this. 2017-10-11 14:08:15 -05:00
Stephen Houston 213bb6ba32 Luncher: Keep aspect on previews - don't force max sizes.
This fixes T6074 T6075
2017-10-11 14:03:57 -05:00
Mike Blumenkrantz 28ff209159 recreate x11 root pointer when changing application<->enlightenment theme
force new visual to be applied immediately instead of requiring a compositor
restart
2017-10-09 07:09:38 -04:00
Mike Blumenkrantz fd68c99b64 always use e cursor theme for canvas pointers
canvas pointer = wl compositor pointer = always use e theme since there is no
loader for x11 cursors
2017-10-09 07:09:38 -04:00
Mike Blumenkrantz caab810b39 check for non-wl compositor when forcing application cursors onto pointers
comp_type is not set during initial pointer creation on startup but will be set at
the point of xwl startup, so use a check which will succeed

fix T6157
ref 2b8c70fe98
2017-10-09 07:09:38 -04:00
Mike Blumenkrantz 03982a1408 Revert "do not apply enlightenment cursor theme for xwayland clients"
This reverts commit 80abcc5600.

sort of worked, sort of irrelevant
2017-10-09 07:09:38 -04:00
Carsten Haitzler b60ff200e9 e sys - handle phantom wakeups from sleep on some devices
this laptop wakes from suspend if you plug or unplug it while
suspended. this leads to bad things. fix nthis by checking lid state
and resuspending if this happens.

@fix
2017-10-07 20:28:24 +09:00
Mike Blumenkrantz eba50312b4 use e_client_unfullscreen() to handle xdg-shell unfullscreen requests
ensure that previous window states get accurately reapplied when unfullscreening,
e.g., maximize
2017-10-06 11:36:53 -04:00
Mike Blumenkrantz d7a08ed74e block relative motion event sending when pointer is outside input area
stop sending events to xwl clients at all times
2017-10-05 12:26:19 -04:00
Mike Blumenkrantz 80abcc5600 do not apply enlightenment cursor theme for xwayland clients
wayland always uses the client's cursor, so maintain that consistency
2017-10-05 11:42:24 -04:00
Mike Blumenkrantz b49e968d74 move cursor theme options into separate frame 2017-10-05 11:28:41 -04:00
Mike Blumenkrantz f0ab6a74f5 do not show cursor theme options in wayland compositor mode
this isn't how wayland works, so don't let users footgun themselves
2017-10-05 11:25:07 -04:00
Mike Blumenkrantz 99cfdbffda move 'show cursor' option in mouse settings inside frame 2017-10-05 11:20:18 -04:00
Mike Blumenkrantz 474845bc6f Revert "disable option for mouse to use Application theme if we are running in Wayland"
This reverts commit 9e3b8b7528.

this only affects runtime in wayland-only environments while not preventing the option
from taking effect, meaning it affects nobody and prevents nothing
2017-10-05 11:15:54 -04:00
Mike Blumenkrantz 2b8c70fe98 set default cursor on root window for xwl pointer
ref T5593

 #TheDisappointer
2017-10-04 14:09:35 -04:00
Mike Blumenkrantz 8121f20a03 handle x11 shaped input under xwayland 2017-10-03 14:59:47 -04:00
Mike Blumenkrantz b686f3871d add max size input rects for wl clients on creation
according to spec, surfaces begin with infinite input area
2017-10-03 14:40:36 -04:00
Mike Blumenkrantz 9983172f32 set comp object alpha state when applying native surface
ensure that alpha is set accurately for the native surface
2017-10-03 14:40:03 -04:00
Mike Blumenkrantz 4d76f409f8 block gadget configuration unconditionally while desklock is active 2017-10-03 13:52:44 -04:00
Mike Blumenkrantz 031b0bdc60 deduplicate global gadget handler variables
ref T6125, T4648
2017-10-03 13:50:16 -04:00
Mike Blumenkrantz d7060c7c6f redo bryce eventing
post events are way harder and I don't know why I didn't do this in the
first place?

fix T5974
2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 990c0f1005 do ecore-x shutdown on xwayland shutdown 2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 6f186db24b clamp expanding gadget size to 0 to prevent sizing overflows
if the expanded size is negative then the size should be 0 and the gadget is
not visible
2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 7c726172e4 handle gadget site layouts using accurate parent geometry 2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 42d707909e simplify focus on commit block for wl clients
none of this applies to popups
2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 001085f349 do not set E_Client->take_focus for popup wl clients 2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 984a1facd9 pass keys through xkbcommon under wayland lockscreen
ensure that key states are retained when unlocking
2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 4ae2145330 move gadget editor help text onto the editor popup
ref T4648
2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 2d2ad13537 add comp object function to get the content of a util_add object 2017-10-03 12:39:03 -04:00
Mike Blumenkrantz b873f9bd45 defer wl startup apps until after xwayland init completes
startup apps may require x11 connections, so ensure this is available

fix T6122
2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 129bb14d2d don't show xwayland clients unconditionally on commit
ensure that the client's desk is visible

fix T6024
2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 1d5977c02a do not unnecessarily rescale clients
this function is mainly for rescaling maximized/fullscreen clients to fit new
dimensions, so don't call on other clients since this can trigger unwanted resize
 events
2017-09-28 13:03:37 -04:00
Mike Blumenkrantz 15ea006eb5 block client rescales during render updates
this guarantees misrenders
2017-09-28 13:03:37 -04:00
Mike Blumenkrantz 80349d417d Revert "do not perform client moves during comp updates"
This reverts commit def2b0c5fc.

breaks some resize directions
2017-09-28 13:03:37 -04:00
Stephen Houston fdbf49af1b Sysinfo: Cpuclock, Netstatus, and Thermal now use progressbars in the popups to unify and match all sysinfo gadgets. 2017-09-27 17:19:47 -05:00
Stephen 'Okra' Houston bb4d69519f E Exe: Semi revert 2082bb51d3. The ref count was off to begin with. 2017-09-26 22:11:21 -05:00
Stephen 'Okra' Houston 2082bb51d3 E Exe: Since we no longer ref clients in the phony cb, don't free them after reffing them in instance_client_add. 2017-09-26 22:01:15 -05:00
Derek Foreman a85a602a39 Revert "Set close on exec for stdin"
This reverts commit 40e8bb044c.

EFL master solves this properly
EFL stable currently has a bug that solves this accidentally

so there's a window of about 3 commits in git where it's a problem,
and nobody should run those commits in production :)

This fix caused some problems when restarting E, as stdin would
cloexec and then the following startup would try to set cloexec
on an invalid fd and generate an err that generated a cri because
of an invalid log domain.

Someone should probably figure out the log domain thing.
2017-09-26 14:19:24 -05:00
Derek Foreman f4f08ee99a Stop queuing wl_buffer release events
Now we just kick them out immediately.
2017-09-26 11:41:19 -05:00
Mike Blumenkrantz 1f650605a0 emit E_EVENT_EXEC_NEW_CLIENT with phony exes
partially fix T6071
2017-09-26 12:26:18 -04:00
Mike Blumenkrantz 576c8d0864 use client geometry for visibility effect geometry, not comp object geometry
clients may defer object geometry setting, resulting in unreliable values here
2017-09-26 12:26:18 -04:00
Mike Blumenkrantz 00c968d63c use correct env vars for connman proxy setting
https://curl.haxx.se/docs/manual.html
2017-09-26 12:26:18 -04:00
Mike Blumenkrantz 3b319b5ef9 don't do full client rescale on x11 hint change if not maximized/fullscreen
regular windows don't get moved here, only resized if hints change

fix T6072
2017-09-26 12:26:18 -04:00
Mike Blumenkrantz fb572c4c9d fix proxy_excludes handling for connman in previous commit 2017-09-26 12:26:18 -04:00
Leif Middelschulte 67ca168f6f support proxy settings provided by Connman.
Summary:
This implements support for Connman's proxy configuration.
The 'all_proxy', 'http_proxy', 'https_proxy' environment
variables are set to the first value of the 'proxy_servers' set.

The 'no_proxy' environment variable is set to a concatenated string
of all the 'proxy_exclude' values.

Reviewers: zmike!

Subscribers: cedric

Maniphest Tasks: T5442

Differential Revision: https://phab.enlightenment.org/D4833

modified by zmike
2017-09-26 12:26:18 -04:00
Mike Blumenkrantz 8d55575bcf remove input-only client fastpath to resize crashes
ref T6023
2017-09-26 12:26:18 -04:00
Mike Blumenkrantz def2b0c5fc do not perform client moves during comp updates
this can trigger zone changes, which triggers resizes, which is bad

ref T6023
2017-09-26 12:26:18 -04:00
Derek Foreman 51c492fcad use safer ecore_exe flags that close stdin/out/err more often
commit b9d166f804 introduced
safer exe functions that both prevent a child from having E's
stdin/stdout/stderr and ensure the child's fd 0 (and 1 and 2) are
"valid" file descriptors (to work around some buggy software that
assumes 0 is an invalid file descriptor)

This commit uses the safer functions when launching child programs from
the desktop menu as well.

ref T5606
@fix
2017-09-25 10:10:49 -05:00
Carsten Haitzler b9d166f804 use safer ecore_exe flags that close stdin/out/err if possible
this is specifically needed for wayland but is relevant to x with
startx too ... dont let processes that e runs like apps inherit
stdin/out/err as it may be a tty and thus allow apps to do nasty
things with that tty.

@fix
2017-09-23 23:10:35 +09:00
Derek Foreman 40e8bb044c Set close on exec for stdin
ref T5606
2017-09-22 21:02:32 -05: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 5694d7af96 add action router action to route specific key presses to specified clients 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
Mike Blumenkrantz 92614d0c69 store the currently active key binding as an accessible variable 2017-09-21 13:31:01 -04:00
Mike Blumenkrantz 8cc46fb201 make e_bindings_modifiers_from_ecore() an externally usable function 2017-09-21 13:31:01 -04:00
Mike Blumenkrantz 11a08ebc30 don't perform zone updates on client resize
zone updates should probably only happen on client moves, not resizes

ref T6023
2017-09-21 13:31:01 -04:00
Chidambar Zinnoury 0666cd7249 e menu: Fix missing realize when using key-activation to the right.
See commit 474463ef6c, SVN r39698.
2017-09-19 12:50:39 +02:00
Marcel Hollerbach 49788a495d meson: wizard also link_with here 2017-09-19 08:58:24 +02:00
Carsten Haitzler 320d689c9d tiling - ensure notification struct is 0'd before use
this should fix the last 3 crashdumps reported in T6023

@fix
2017-09-19 07:56:29 +09:00
Chidambar Zinnoury 0adec92696 e about: Year++. 2017-09-18 22:57:06 +02:00
Marcel Hollerbach d3e2fd1fd0 meson: wl_drm uses elput 2017-09-18 11:20:56 +02:00
Marcel Hollerbach a69528a01f meson: teamwork uses emile 2017-09-18 11:20:43 +02:00
Marcel Hollerbach 488fd0ad04 meson: specify that modules have unresolved apis
those are presented when they are loaded into e
2017-09-18 11:15:07 +02:00
Mike Blumenkrantz 6a53fe8f93 remove fdo interfaces from music control dbus xml 2017-09-15 13:36:44 -04:00
Mike Blumenkrantz c478d4aaf4 fix meson wayland build without drm 2017-09-15 13:33:54 -04:00
Mike Blumenkrantz 62acd53a96 avoid div by 0 in gadget layout
CID 1381165
2017-09-15 12:16:48 -04:00
Mike Blumenkrantz 50473083d1 remove futile null check
CID 1381166
2017-09-15 12:08:42 -04:00
Mike Blumenkrantz 98dbaa9090 fix clickable edge binding activation with other mouse buttons
check for the button specified in the binding, not whether the event
contains a click

fix T4510
2017-09-14 15:00:50 -04:00
Mike Blumenkrantz 00daafac10 flag zone/edge mouse binding activation with ON_HOLD
ensure multiple bindings aren't triggered by the same event
2017-09-14 14:59:14 -04:00
Mike Blumenkrantz 283a1cd620 handle unmovable gadgets in gadget move action
a gadget which refuses to create a duplicate of itself can be considered
immobile

fix T5998
2017-09-14 14:38:14 -04:00
Mike Blumenkrantz 49e2a31cfc block recursive mouse eventing in bryce action handlers
ensure that only the outermost event adds a post callback to avoid
triggering actions multiple times
2017-09-14 14:37:12 -04:00
Mike Blumenkrantz ccd374e6a2 add some hidden boxes to use as gadget popup hover parents
boxes get resized with zone useful geometry to ensure the content is always
on screen and visible

fix T5945
2017-09-14 14:00:39 -04:00
Mike Blumenkrantz 9727710647 hide clients again after show in idler if clients are on hidden desk
clients need initial show to correctly handle mirror visibility but should
then be hidden again

ref 0ee8cc896e
fix T6024
2017-09-14 12:45:45 -04:00