Patches for grabbing - #39
Open
SumiTomohiko wants to merge 4 commits into
Open
Conversation
In the previous version, ScreenView._grabPointerTime was later than timestamp of ButtonPress event. motif did not work because of it. As seen in lib/Xm/DragC.c in the motif source tree, motif gives a last event timestamp to XGrabPointer(). When a user pressed the left button, the X server and motif worked in this order: 1. The X server sent a ButtonPress event. 2. The X server updated the _grabPointerTime in the ScreenView. 3. motif called XGrabPointer() with the timestamp given in the step 1. 4. The X server called ScreenView.processGrabPointerRequest(). In the step 4, the X server responsed "invalid time" in comparing the timestamp at the step 2 with the timestamp at the step 3 (which is same as the timestamp at the step 1). This patch fixes the X server to use same timestamp in the step 1 and 2.
The man page of XGrabKeyboard(3) is saying: XGrabKeyboard overrides any active keyboard grab by this client. : : If the keyboard is actively grabbed by some other client, XGrabKeyboard fails and returns AlreadyGrabbed. This patch fixes keyboard grabbing to test if the client is a grabbing owner or not.
Author
|
xshisen can reproduce this bug. The menu in xshisen does not work for this bug. |
This code does not support ReplayPointer, ReplayKeyboard, AsyncBoth and SyncBoth. I read the manpage[1] and the source code of the X server[2] to write this code, but honestly I do not know if this implementation is correct. [1] https://tronche.com/gui/x/xlib/input/XAllowEvents.html [2] https://www.x.org/releases/X11R7.7/src/xserver/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I fixed two problems on grabbing. Please read the commit log.