Commit 12188c8a authored by Chase Douglas's avatar Chase Douglas Committed by Peter Hutterer

Use touch state when querying pointer through core protocol

QueryPointer is part of the core protocol. As such, it knows nothing
about touch devices. Touches are converted to button 1 press, pointer
motion, and button 1 release for core clients, so we should ensure the
pointer state mask has button 1 set when XQueryPointer is used.
Signed-off-by: default avatarChase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 32ece7c0
......@@ -5098,8 +5098,7 @@ ProcQueryPointer(ClientPtr client)
memset(&rep, 0, sizeof(xQueryPointerReply));
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
rep.mask = mouse->button ? (mouse->button->state) : 0;
rep.mask |= XkbStateFieldFromRec(&keyboard->key->xkbInfo->state);
rep.mask = event_get_corestate(mouse, keyboard);
rep.length = 0;
rep.root = (GetCurrentRootWindow(mouse))->drawable.id;
rep.rootX = pSprite->hot.x;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment