-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Grabs are ignored in Qt #3957
Comments
Just like the bug report you linked to, your version is out of date. |
Confirmed on |
FYI: grabs cannot be forwarded as the window manager (xpra) does not receive the events from the X11 server that would allow it to forward them. |
I see, that is unfortunate. I arrived to the same conclusion after reading X code - no introspection features that would enable direct grab forwarding. The only option left for Xpra would be to speculate when and which client grabbed the devices. This could be achieved by watching out for abnormal FocusIn and FocusOut events and a lot of other painful guessing. |
Reopening, because I found |
Also, xGrabKeyboardReq->grabWindow is not the originator, but what the originator grabbed. It is not very clear to me how this works but the Req seems to be a sub-structure that does not contain information about the originator. Maybe some field of XRecordInterceptData, which contains xGrabKeyboardReq in its |
I had not thought of using the record extension! |
The commit above adds a simple test tool exercising the Cython record extension module. WAYLAND_DISPLAY= DISPLAY=:100 python3 ./xpra/x11/bindings/record_tool.py
found XRecord extension version 1.13
start of X11 record data
from-client event type=ChangeActivePointerGrab {'cursor': 12582952, 'event-mask': 12, 'time': 94900809}
from-client event type=UngrabKey {'window': 1100, 'key': 0, 'modifiers': 32768}
from-client event type=ChangeActivePointerGrab {'cursor': 12582952, 'event-mask': 12, 'time': 94901262}
from-client event type=UngrabKey {'window': 1100, 'key': 0, 'modifiers': 32768}
from-client event type=ChangeActivePointerGrab {'cursor': 12582952, 'event-mask': 12, 'time': 94901614}
from-client event type=UngrabKey {'window': 1100, 'key': 0, 'modifiers': 32768} This code could easily be executed in a separate thread - or the file descriptor could be added to @faszkany as you pointed out, most events have a So at this point, I am a bit stuck as I don't see a way of using this data reliably. Any ideas? |
Setting up individual RCs is indeed unfeasible due to X not providing client enumeration and callback (e.g. client finalizer) features. However, to my best understanding, Xpra doesn't need to identify the originator client (as grabs are effectively locks), and could use a single dummy client on the Xpra client-end to forward grabs. Please correct me if this isn't possible or straightforward and I will figure out something else. Unfortunately, reliably checking grab state without side-effects is difficult on X, as the only core protocol requests available are the interfering grabs themselves. Pairs of the grabs and ungrabs could still be used with the SYNC extension to ensure they are processed back-to-back. This could be used to poll grab state, because we always know when a grab starts, only the end is ambiguous. I also had the idea of creating trapping mechanisms with fake X Input devices and windows, where a grab change would immediately make the X server send an event notifying of the changes related to the window. This might not work, as the way grabs interact with MPX is still a mystery to me. X11 is infinitely complex and there should be other ways as well, for now I will put together Xephyr PoCs of these and post the results later. |
You're probably right, I am juggling with too many things at the same time and not doing any of them well enough! My concern was with the data that will need to be provided to the client side to forward that grab and have it behave as expected.
Do we really care that much?
Clever! The big downside is that this would be another back channel via the device mechanism, with all the code + setup + packaging + configuration that entails.
I am usually capable of taking PoC code and beating it into shape. |
Not heard back. |
Describe the bug
Grabs do not get forwarded or get ignored
To Reproduce
Steps to reproduce the behavior:
xpra start :2
xpra attach ssh://user@host:port/2
rofi -show run
, Qt inqtcreator
and othersSystem Information (please complete the following information):
Additional context
grabs getting ignored, same as #3506 described. tested with Qt, dmenu, rofi
the Xpra server is running inside Xephyr, but this should not influence the described behavior.
the Qt issue is mostly visible in dropdowns, which should grab the keyboard.
dmenu and rofi also very visibly misbehave.
The text was updated successfully, but these errors were encountered: