-
-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
forward input grabs to the client #139
Comments
2014-02-03 14:22:08: antoine uploaded file
|
For some background, see: A High-Level Overview of Grabs and X11 Input Event Processing As per Window Entry/Exit Events and Grab Processing, the [/attachment/ticket/139/pointer-grab-stub.patch] allows us to see when the client application requests a pointer grab and when it releases it. We get those events on the composite helper because it recursively selects Anyway, once we get one of those events, we can keep track of which window is meant to get all input, and make sure we deliver the events there. We can also forward the grab state to the client, which can try to honour it... For example, with gtk: gtk.gdk.pointer_grab and gtk.gdk.pointer_ungrab For the keyboard, the events would be: Input Focus Events. (I think keyboard grabs are a lot less important than pointer grabs) |
2014-02-03 15:54:16: antoine uploaded file
|
2014-02-03 16:00:30: antoine commented
|
2014-02-04 04:56:15: totaam uploaded file
|
Much cleaner implementation merged in r5346 (will make it easier to test): instead of coopting the composite helper, we create a new helper class, better able to track what we want. |
2014-02-07 20:36:37: maxmylyn commented
|
All the issues with Alt-Tabbing away are due to the fact we don't grab the keyboard, and until I can figure out how to get keyboard grab events from the X11 server, it will remain this way. Which only leaves:
Is this by clicking? (the other sentences mention click or alt-tab explicitly, this one does not) How does this differ from the positive results posted above it? Note: I have now reverted r5176 in r5396 (see #490), please re-test to ensure that the behaviour has not regressed. |
Update: the keyboard grabs don't do anything on win32 - AFAICT there is no such thing, so I have come up with an ugly hack as an alternative:
This solves the Alt-Tab problem for me. AFAIK, this should only leave one question to answer from comment:9 |
2014-02-13 18:36:35: maxmylyn commented
|
It's worse than I thought... Running a well behaved application in the client with
And on the server with
Showing that we detect the loss of focus client side with the So all is working well and I am closing this ticket, feel free to re-open if I've missed anything. The problem with chrome is different and I am moving it to #519 |
2014-04-20 09:07:27: totaam uploaded file
|
AFAICT, the problem is that we cannot reliably determine the window which owns the grab by watching the focus The solution adopted in the patch attached:
For reference, here are the docs on Normal Focus Events and Focus Events While Grabbed and Focus Events Generated by Grabs |
Applied in r6133. The crashes were due to a call to This is a server side only fix, which will not be backported to v0.12 because it is too intrusive. Grabs will remain disabled for v0.12x. Please re-test, especially on OSX and platforms I tend to test less (though I did test this quite a bit with XP as client). Applications useful to test with (many at once is even better):
|
2014-04-21 23:11:37: afarr commented
|
Apart from the obvious one (Firefox crashing - which I will investigate further), which ones are regressions? FYI: the debug string for grabs is: |
2014-04-23 00:17:55: afarr commented
|
afarr: the quoted " |
2014-04-24 12:25:19: totaam uploaded file
|
2014-04-24 12:28:56: totaam commented
|
2014-04-24 16:10:06: totaam uploaded file
|
Things left to do:
|
2014-04-25 09:49:40: totaam commented
|
2014-04-25 09:55:14: totaam uploaded file
|
Much improved in r6170: removed the helper class, use the actual window grab id from the event. In order to catch all grabs, I think we need to modify the X11 server (ouch), as it shortcuts and skips sending grab events when the window with the grab is the current one (see |
Just found out that the chrome drop down menus do set:
Which is better than nothing, and when choosing the window to use as parent we could also prefer the currently focused window (which is generally the browser window which generated the menu) |
I tried adding this patch to the Xorg server to be able to get grab notifications (added all the code before the
We get almost too many events (passive button grabs fire for example). Useful for debugging. |
Re-assign. Also some new pointers / examples:
|
2014-08-21 00:07:54: afarr commented
|
Found Find X.org pointer grab owner which is interesting: You can do this by pressing the XF86LogGrabInfo key |
2015-07-31 01:06:55: afarr commented
|
2016-07-31 17:05:16: ironiridis commented
|
This is now in trunk, see #1229#comment:10. Note: this is somewhat different from the original intent of this ticket (changed ticket title to reflect that): we don't (yet?) detect and forward when an application requests a grab, we just trigger it ourselves from a keyboard shortcut instead. Pure client side only, the server is not involved in any way and is not even aware that a grab is in effect client side. @ironiridis: does this work for you? |
2016-08-01 22:49:03: ironiridis commented
|
Should be something like (paths may vary):
Otherwise you will be using the system installed version.
Please attach the client output with @ironiridis: can we move this to #1229, I want to keep #139 for the not-yet-implemented server grabs forwarding. |
Important: the shortcuts have just been changed, see r13169 |
2016-08-02 13:50:20: ironiridis commented
Replied at #1229#comment:13. |
As far as I am aware, we can only detect application requesting X11 server grabs by intercepting the API call using library tricks (ie: LD_PRELOAD), and we don't want to go down that route. |
Perhaps we will be able to receive grabs events after all! |
Issue migrated from trac ticket # 139
component: core | priority: minor | resolution: wontfix
2012-06-04 14:37:48: ahuillet created the issue
The text was updated successfully, but these errors were encountered: