Commit Graph

166 Commits

Author SHA1 Message Date
Mike Blumenkrantz bfeeae6adf fix handling of x11 ICCCM WithdrawnState
according to ICCCM 4.1.4:
Only the client can effect a transition into or out of the Withdrawn state

withdrawn windows cannot be shown under any circumstances. the best that can
be done is to try mapping the window and hope it decides to appear.

to prevent any inadvertent showing of the window before it leaves the
withdrawn state, we play games with the E_Client->ignored flag in order
to skip client evals until we get notified that maybe we want to stop
skipping those evals

ref T2745

also includes 0e3cc2f533
2015-09-25 22:40:15 -04:00
Mike Blumenkrantz 53e0c56f5e fully support _GTK_FRAME_EXTENTS
gtk apps set an atom which provides information about the area
where non-window content (eg. shadows) may be drawn; this area
must not be used in placement calculations.

the easiest method for implementing this functionality was to add
a case to the compositor geometry interceptors which effectively
flip the client struct geometry values such that the E_Client->client
is outside of the more commonly used E_Client->x/y/w/h

fix T2744
2015-09-24 16:42:24 -04:00
Mike Blumenkrantz e4d065370b move focus setting on restart into desk restore function
the focused client on restart needs to be set after desk states
have been restored in order to avoid focusing the wrong client
2015-09-21 20:06:31 -04:00
Mike Blumenkrantz a108d8ec6a only lower x11 layer windows for layers which have windows during init 2015-09-21 16:55:03 -04:00
Carsten Haitzler b79fde5de7 e comp - set rects to null to silence compiler warning
even though n is 0 and we don't use rects, compiler doesn't know, so
to avoid noise - set to null so we can focus on warnings of real errors.
2015-09-11 13:01:16 -04:00
Mike Blumenkrantz 258680e60c fix x11 compositor to use damage events
it seems that since the first version of the enlightenment compositor
in e17, damage events in x11 have never been used correctly. using
the event struct members will only give the bounding box/area instead
of the damaged regions; the real regions must be explicitly fetched
from the server

this removes the need for a lot of hacks which were added over the years
to make override windows render correctly, and also probably reduces
rendering overhead slightly
2015-09-07 11:17:17 -04:00
Mike Blumenkrantz a8f301748c track focus time for x11 canvas focus, unset client focus on x11 canvas focus-in
in the case that the canvas window has just had focus set on it, apply this focus
and ensure that no client retains focus

this resolves a race condition where focusing the compositor canvas <-> client
extremely quickly would result in a client trying to steal focus when it was
not actually focused

a notable (but trivial) side effect is that now when flipping desks at high speed while using
mouse-based focus policies, the user is almost guaranteed to end on a desk which
has open windows on it
2015-08-21 16:45:57 -04:00
Mike Blumenkrantz 094fc3c15c add full damage for x11 override clients on resize configure event
it seems that the reported damage events upon resizing an override window
are not accurate, and so we must force a full damage here while avoiding a
render queue in order to ensure that the full contents of the override will
be rendered in the next frame

fix T2045
2015-08-21 16:43:44 -04:00
Mike Blumenkrantz 19caf62872 reject x11 NotifyVirtual and NotifyInferior mouse in events more accurately
these events are valid when moving from parent<->child window

fix T2674
2015-08-18 17:23:51 -04:00
Mike Blumenkrantz bbecf27c97 reject x11 NotifyVirtual and NotifyInferior mouse in events
these are triggered "in passing" when mouse in events occur and do
not necessarily indicate that the mouse has entered this specific window

failing to reject such events can cause mouse-based focus policies to
attempt to set focus onto windows which are not visible, resulting in
an infinite loop where no window is actually focused
2015-07-27 13:29:06 -04:00
Mike Blumenkrantz 7203abf8a3 allow x11 mouse wheel events to check ev->event_window for possible client match
in the event that these windows are different, event_window is the parent of window
which may or may not be explicitly tracked by an E_Client, so the wheel events here
should be sent to the parent as is done in mouse button events

fix T2604
2015-07-27 13:27:57 -04:00
Mike Blumenkrantz a0ac666b47 improve x11 compatibility with efl versions earlier than 1.15
canvas grabs changed completely in 1.15, and so it's required that
x11 grab handling also have special runtime cases for this

for such versions the compositor must:
* always grab the internal client window instead of the parent
* always ungrab the window when it has focus
2015-07-24 13:19:11 -04:00
Mike Blumenkrantz 510660e157 use runtime check for determining x11 compositor grab behavior
this should fix the case of users not recompiling enlightenment after
upgrading their efl version
2015-07-24 13:00:16 -04:00
Mike Blumenkrantz 73102c7048 simulate modal windows for badly behaved x11 clients
it seems that some clients, eg. libreoffice, don't set the modal window
property on child dialogs. instead of fighting for focus, set up the child
as a modal on the parent and then avoid the whole issue

fix T2594
2015-07-21 18:35:47 -04:00
Mike Blumenkrantz ef18cc3f93 ensure clients possess comp_data before dereferencing it during x11 stacking
ref T2566
2015-07-21 14:36:33 -04:00
Mike Blumenkrantz a6990c69a8 never use new clients for stacking part 2: the secret of the stacking
a client with this flag set here is unreliable to use as a stacking
reference since it has yet to be stacked and can be located anywhere
in the window stack.

fixes internal window stacking on startup
2015-07-15 16:26:06 -04:00
Mike Blumenkrantz 3dfb5e07af only trigger client mouse-in from x11 mouse move event if client+desk are visible
ref T2566
2015-07-15 16:24:50 -04:00
Mike Blumenkrantz 75df7e0943 only unset e MANAGED atom on non-shutdown
broken during a bad rebase of 4f8af72fe3
2015-07-15 15:19:24 -04:00
Mike Blumenkrantz b8ee271011 always set x11 override client geometry on startup
this geometry isn't something we can change later, so apply it now.
also fixes an ACK when trying to show input_only clients early
2015-07-10 13:10:41 -04:00
Mike Blumenkrantz 4f8af72fe3 move grabinput focus fix timer to x11 compositor and fix it to Work Better
see inline comments about x11 focus eventing for details

fix T2547
2015-07-08 12:49:06 -04:00
Mike Blumenkrantz eef5efe8c3 move E_Client->mouse.in to E_Client->mouse_in to avoid abi breakage 2015-07-07 13:15:45 -04:00
Mike Blumenkrantz 62da0f32bf do not apply x11 focus grabs to internal clients if efl version > 1.14
due to recent changes in ecore-input-evas, mouse events are propagated
differently; specifically, there are now "more" events than there previously were.
as a result, grabs on internal wins are no longer necessary, though they probably
never were necessary after the elm conversion

see 5cb6cdbc5e1a13ea0262e155983b494e6519abde in efl
2015-07-02 12:35:21 -04:00
Mike Blumenkrantz 632bdd84a7 fix build break from last commit 2015-07-02 12:34:55 -04:00
Mike Blumenkrantz 0c518414e1 reject x11 replay clicks when event window != client window 2015-07-01 18:02:26 -04:00
Mike Blumenkrantz 26c291c02d only ungrab x11 windows when appropriate focus options are set 2015-07-01 16:50:01 -04:00
Mike Blumenkrantz b0df36d595 ensure x11 focus grabs are applied on client init when needed 2015-07-01 15:57:39 -04:00
Mike Blumenkrantz 00904480d5 straggler ungrab of x11 parent window from previous commit 2015-07-01 15:33:34 -04:00
Mike Blumenkrantz f1fdb26d20 redo all x11 client mouse grabbing for focus
I did an audit of this and it seemed that it no longer served the purpose
for which it was originally intended. specifically, this is for enforcing
click: raise/focus options, and so grabs must be in play on client windows
only when they are not focused to ensure that we get mouse events and can
then focus them. the grabs must then be removed once the window has focus
to avoid spurious mouse eventing
2015-07-01 15:32:06 -04:00
Mike Blumenkrantz 87f4a69612 use client window for x11 button ungrabbing
ref afb62b4989
2015-06-30 18:49:26 -04:00
Carsten Haitzler d7f384f092 e passive window grabs - fix side-effect leave/enter events on clients
when you have click to focus we have a passive grab set up. somewhere
that window changed to the parent window instead of the client. this
leads to a side effect of a leave and enter event on clients for every
click. generally clients are ok with this, but some seem to have buggy
event handling. these enter/leave events are a side effect of the
passive grab even though we allow/replay the event.

this fixes that by placing passive grabs on the client window itself
instead of the parent.

@fix
2015-06-30 18:46:07 -04:00
Mike Blumenkrantz cf332e874c trigger client mouse-in on x11 mouse movement for non-action clients
this should fix the case of mouse-based focus policies trying to reapply
focus after another client has stolen it away without the pointer leaving
the window
2015-06-29 16:08:47 -04:00
Mike Blumenkrantz a416f96c12 check for possible parent window on x11 mouse button events
in the case of different window <-> event_window, window is a child window
of event_window, and thus checking event_window here is valid (and necessary)
2015-06-29 16:04:33 -04:00
Mike Blumenkrantz 84ba19d576 stop rejecting possibly-valid x11 focus events
fixes case where window assumes focus without wm interaction
2015-06-29 16:04:26 -04:00
Mike Blumenkrantz faf4ec630c force xwindow stacking to obey nocomp policy and stack below current nocomp
fix T2277
2015-05-18 13:22:26 -04:00
Mike Blumenkrantz d3d4cbd616 use stderr messages when failing to init X compositor
can't show error dialogs when we're about to exit, may as well print something useful

fix T2182
2015-03-06 15:02:20 -05:00
Mike Blumenkrantz 2d4929e68e rename extremely frustratingly-named E_Screen_Limits enum and members
this came in a patch that I take full responsibility for not adequately reviewing at the time.
the names are confusing and counterintuitive, and it does not properly include the client namespace.

backported to avoid future backport conflicts
2015-02-18 18:56:18 -05:00
Carsten Haitzler 257118514e e - client list update after adding to client list - fix netwm bug
this fixes T2029
2015-02-12 23:14:59 -05:00
Carsten Haitzler 20cf69893e maximization bug affecting libreoffice and others - fix
the problem is something changes window gravity... what i don't know,
but hey - just forcibly move window to 0,0 which is where we expect it
anyway when resizing.

@fix
2015-02-12 23:14:52 -05:00
Mike Blumenkrantz 0d32652545 check focus after X nocomp end
fix T1768
2015-01-08 18:23:46 -05:00
Mike Blumenkrantz f53936eaba don't set gravity on client windows during X move/resize
fix T1940
2015-01-03 00:44:17 -05:00
Mike Blumenkrantz 0d2001013f redo shaped client checks to use shape flags instead of rect pointer, fix shapeless clients
according to the shape extension protocol, the number of rectangles returned should be checked to determine a client's shape. if 0 is returned, the client has no shape, meaning that it either should not be drawn or should have no input region. this improves behavior with various client window types such as tooltips

ref T1820
2014-12-07 20:18:27 -05:00
Mike Blumenkrantz e0969644d6 fix X crash when trying to apply desktop window profile to client without desk 2014-12-07 20:18:27 -05:00
Mike Blumenkrantz f9370f013e fix internal window border changing 2014-11-03 17:04:14 -05:00
Mike Blumenkrantz 351bde444c manually break out of nocomp
in the event that there was only one window open and it was closed, this would permanently break the compositor

fix T1665
2014-09-16 11:07:08 -04:00
Mike Blumenkrantz ec1cd25cfe rename E19* defines/texts to just E so they don't need to keep being updated 2014-09-09 12:30:50 -04:00
Mike Blumenkrantz 6318fd042b add short path to ensure ConfigureNotify event after request
fix T1485
2014-09-05 15:01:52 -04:00
Mike Blumenkrantz 44545b53a9 don't break nocomp for client activate requests 2014-09-01 10:30:53 -04:00
Mike Blumenkrantz e949fcc077 only use pixmap size shortcut on non-internal clients
this gets broken pretty easily since we resize all over the place
2014-09-01 10:30:53 -04:00
Mike Blumenkrantz 7b8ad92604 set X pixmap size on client init 2014-08-28 13:30:07 -04:00
Chris Michael 28b512d5a7 fix X compositor to use e_pointer_window_new
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-28 11:01:46 -04:00