Commit Graph

394 Commits

Author SHA1 Message Date
Carsten Haitzler c13fa73866 e - make some comment notes on broken lock display on saver etc.
we have some visual glitches i'm on a mission to fix... and the above
is one of those. timeout for lock should begin after screen has gone
black first.
2017-07-11 16:57:14 +09:00
Carsten Haitzler 3fc786413c e - fix desklock + grabs with hiding pointer on screen powerdown/up 2017-07-11 16:57:14 +09:00
Carsten Haitzler e90f63b25b Revert "move x11 suspend window grabbing to comp_x, ungrab on resume"
This reverts commit 7bc179da5a.

this now totally broke the glitch fix and it now animates in reverse
on suspend and does nothng on resume... testing might be a good idea
beforehand...
2017-07-11 09:00:05 +09:00
Mike Blumenkrantz 7bc179da5a move x11 suspend window grabbing to comp_x, ungrab on resume
ref d0c5fb465b
2017-07-10 09:49:34 -04:00
Carsten Haitzler d0c5fb465b support connected standby (non-s3 sleep/freeze) that new lpatops sport
this requires we have to force dpms on to reduce power. to avoid
glitches with the pointer staying around in x we need to support
suspending it too so it hides cleanly like the screen dims or undims.
also use the new powersave freeze mode to do this.

note that i've tested this on s3 supporting laptops and non-s3 and it
"works for me". it may require more testing and work. there is more to
power saving than just this as well but for now that's out of scope as
you have to mess with linux device autosuspend timeouts and a bunch
more (wowlan ... blahblah).

i need to find the source of the intermittent wakeups too in e. there
is a long lived timeout (8-ish seconds?) but more specifically e keeps
waking up from fd's and then reading /sys stuff about battery - some
event is causing us to do this... maybe to suspend this or make
battery checking very rare when in freeze mode (or screen off) etc.

so this fixes some glitches as well as supports a new way of sleeping
"alive" when hardware literally doesnt support normal s3 sleep... so
kind of a fix with a feature.
2017-07-10 10:18:50 +09:00
Mike Blumenkrantz 44693a1852 only unredirect clients during comp update after 3 failures
tfw your conditional is backwards
2017-06-30 10:25:18 -04:00
Mike Blumenkrantz 63f3fe949c block "user" client resizes during comp client updating phase
resizing objects triggers clip resizes and further event feeding which
can propagate mouse events such that clients try to resize themselves
during the update phase, resulting in illegal compositor behavior
2017-06-24 12:34:12 -04:00
Mike Blumenkrantz 2716802ec9 set pass events on shape debug rects 2017-06-23 17:49:43 -04:00
Mike Blumenkrantz 1cbddb6d8f avoid refocusing deleted wl clients during comp input ungrabbing
this is an error
2017-04-14 11:48:43 -04:00
Mike Blumenkrantz 4eb60da0b3 make SHAPE_DEBUG activate with E_SHAPE_DEBUG env var
this is useful for debugging and the option to recompile is not always
available
2017-04-14 11:48:43 -04:00
Mike Blumenkrantz 118a70730f handle nested compositor delete requests
the previous implementation of this using ee callbacks broke during
elm integration since elm overrides all of those callbacks
2017-03-17 13:16:59 -04:00
Mike Blumenkrantz 05ef0b0280 call e_randr2_shutdown in comp shutdown
this should always be called, not just in comp_x
2017-03-10 15:55:06 -05:00
Mike Blumenkrantz cc434190ad call wl/x compositor shutdown functions directly during comp shutdown 2017-03-10 15:55:06 -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 98ab29ea3c add event for xwayland init 2017-02-24 14:15:38 -05:00
Carsten Haitzler ccf3a6f5fe e comp - quiet some warnings for casts that are ok
add soem void 8 casts for casts that are ok alignment-wise but that
generate warnings
2017-02-12 16:25:35 +09:00
Carsten Haitzler eb8f2a68b0 e comp - fix stupid cast to from eina rect* to char* to eina rect* again
just causes warnings and makes no sense...
2017-02-12 16:25:35 +09:00
Derek Foreman 1fe5b56500 Replace some ecore_time_get users with ecore_loop_time_get
I'm confident these sites can use loop time safely, and they're
frequent callers.
2017-02-10 15:18:19 -06: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 e2f8d2ba69 implement pointer-constraints v1
xwayland nyi
2017-02-03 15:13:45 -05:00
Mike Blumenkrantz 3e6f2f1fa7 add workarounds for ctxpopup geometry for use in input shape tiling
ref T4687
2016-10-26 10:28:30 -04:00
Mike Blumenkrantz ef33638c42 create substruct for E_Comp to put canvas objects into
allow adding/removing objects in the future without breaking abi
2016-10-25 12:01:17 -04:00
Mike Blumenkrantz 7dc0930c8a add new flag for zone edge objects to allow shape cutting while repeating events
fixes case where edge binding would (possibly) trigger but then not allow input
to any canvas objects at the screen edge
2016-10-17 11:18:46 -04:00
Mike Blumenkrantz 7cbca19705 print object type in shape debug if name does not exist 2016-10-02 09:34:48 -04:00
Mike Blumenkrantz 528cdd2614 remove more useless E_Comp struct members 2016-09-09 11:38:08 -04:00
Mike Blumenkrantz 94f6b03ec3 remove E_Comp->name
this served no purpose
2016-09-09 11:38:08 -04:00
Mike Blumenkrantz 2f7e22ccf4 move new version of e_comp_top_window_at_xy_get() to dnd, restore old version
this resolves pointer-based focus issues introduced while attempting to
fix dnd-related bugs

ref a4a2f6b09e
ref 1a982fd72a
2016-08-08 11:31:28 -04:00
Carsten Haitzler e9246a336b Revert "Fix getting top object in comp canvas"
This reverts commit a4a2f6b09e.

No. you broke dnd AGAIN. try:

1. in X11 dnd to something that DOEs NOT accept xdnd. try xev. what e
will do is ignore the window and drop ONTO THe DESKTOP BG underneath
because it skips the window as if it were not there at all. this
involves losing files and finding them clustered on your desktop bg
where drops "diod nothing"
2. this seems to lead the the dnd hanging and not stopping on mouse
release. i need to right clikc to convince it to stop.
3. there's the case for xdnd clients that refuse the drop too - test
that!

this fixes this. try the above tests before working on this.
2016-08-06 13:24:26 +09:00
Derek Foreman a4a2f6b09e Fix getting top object in comp canvas
Correctly return the top non-repeating event window

ref 1a982fd72a
2016-07-26 15:17:36 -05:00
Carsten Haitzler 1a982fd72a e - fix dnd problems coming from getting top object in comp canvas
so getting top object was broken. it didnt account for repeat event
objects that would be included. so get the full l,ist and walk them
top to bottom for the first one thats a client. THAT is the correct
thing to do. this would affect both x11 and wayland.

@fix
2016-07-21 17:01:21 +09:00
Mike Blumenkrantz 07ed7a1433 force mouse-in again during comp ungrab if client previously had mouse-in
unfocus performs a mouse-out, so this is necessary in order to allow events
to reach the client again after a grab ends
2016-06-01 13:11:20 -04:00
Mike Blumenkrantz f25b2ab434 toggle compositor canvas focus during init
this sets the toplevel focus flag in elm, allowing widgets on the compositor
canvas to receive focus in wayland compositors
2016-05-11 13:33:31 -04:00
Mike Blumenkrantz 69370250d1 don't refocus deleted clients during wl compositor grab 2016-05-03 20:27:02 -04:00
Mike Blumenkrantz 7f20ff52c9 reapply client focus after input grab, only handle focus for wayland compositors
this was looking too weird

ref 4a73e9f29a
2016-04-01 06:56:47 -04:00
Mike Blumenkrantz 4a73e9f29a explicitly manage client focus when setting/unsetting input grabs
clients cannot retain focus during a compositor grab, so ensure that
they do not think they have focus in such cases

fix T3338
2016-03-31 11:21:31 -04:00
Marcel Hollerbach 19db5f256c e_xkb: init before e_comp_wl init
for the case e_xkb gets initialized, we need to init it before ecore_drm
is called, otherwise ecore_drm will create his own context and keymap,
which will be overriden a few moment later when e_xkb is initializied.
So by calling e_comp_wl_input_keymap_set before ecore_drm_init the
correct context and keymap is set and no useless elements are created.

The mainproblem is that the comp_type is set when the compositor is
already running, so we have to pass the type at the init to the e_xkb
to tell for which kind of compositor we are running.
2016-03-24 20:54:03 +01:00
Mike Blumenkrantz 885d24eeab unify client post_updates management code into single function 2016-03-14 14:27:15 -04:00
Mike Blumenkrantz e1035aef81 Revert "e comp: fix crashes on exit/restart when e_comp is NULL"
This reverts commit 26a7ba3a58.

this can only occur if something forces an event flush during shutdown.
in this case, whatever is triggering the event flush is a bug, not the
dereferencing of a pointer which is guaranteed to exist for the normal
lifetime of the process
2016-02-25 15:05:24 -05:00
Carsten Haitzler 26a7ba3a58 e comp: fix crashes on exit/restart when e_comp is NULL
when we are shutting down i seem to get into a state where e_comp is
null yet we are still processing events. this fixes that and checks.
2016-02-05 18:35:49 +09:00
Chris Michael d09b1030b8 check siginfo si_code to verify that SIGUSR2 comes from user
When VT switching away and back, the kernel uses SIGUSR1 and SIGUSR2
to notify us of a vt switch event. That same signal was being trapped
here to toggle display of the 'fps' window. If we check the signal's
si_code, we can tell if this signal came from the kernel (as in vt
switch) or from the user (as is sent in 'kill'). This fixes the issue
of VT-switching back and forth under DRM would cause the compositor
'fps' display to appear.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-21 11:28:31 -05:00
Mike Blumenkrantz d12c5f9474 automatically attempt to create a wayland x11 output during comp init
at this point an x11 compositor has already failed to be created, so trying
to use x11 is safe and probably desired
2016-01-18 15:01:23 -05:00
Mike Blumenkrantz 352d023d76 use more correct defines for enabling wl output modules during comp init 2016-01-18 14:54:18 -05:00
Mike Blumenkrantz 4d717df870 if available, use wl output (nested) for wayland compositor creation
this defaults to using a nested compositor as the first choice:
harmless if it fails to create an output
2016-01-18 14:52:53 -05:00
Mike Blumenkrantz 3d3484739c call ecore_wl2_shutdown() in wl compositor delete callback
shutdown/restart crash--
2015-12-23 12:25:42 -05:00
Mike Blumenkrantz 982a4d249b move comp canvas resize callback to monitor elm win geometry
elm win intercepts this callback in order to maintain internal sizing
for use with elm widgets on the compositor canvas, so it's necessary to
get the callback from this object in order to accurately update the canvas
during resizes
2015-12-10 11:53:56 -05:00
Mike Blumenkrantz ae0e6c73a8 disable redirection toggling for the nocomp client
#ThisBreaksTheCompositor!
2015-12-07 18:16:12 -05:00
Carsten Haitzler bc8cfec356 e comp - set e_comp to null on shutdown so others dont access junk
e backlight was accessing e_comp implicitly during shutdown and comp
is shut down before backlight (that is correct as comp relies on
backlight). this fixes that

@fix
2015-12-07 19:52:38 +09:00
Mike Blumenkrantz 33b1f3842c Revert "clamp client to ABOVE layer when ending nocomp"
This reverts commit 8c6bbe0d44.

This Breaks Everything™.
2015-11-10 13:34:02 -05:00
Mike Blumenkrantz 8c6bbe0d44 clamp client to ABOVE layer when ending nocomp
should fix case where an "Always on Top" window toggles fullscreen
2015-11-10 12:59:26 -05:00
Mike Blumenkrantz 945f9506cf enforce fullscreen client stacking during nocomp end IFF client is fullscreen
previous behavior would result in the nocomp window becoming stuck at a fullscreen
layer when ending nocomp, even if the client was no longer fullscreen

fix T2827
2015-11-09 13:20:50 -05:00