From 533f490806919fd5d67dba3e05b4e38ca157ad7c Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Sat, 19 Oct 2013 23:48:29 +0200 Subject: [PATCH] Add Grab requests - GrabPointer, UngrabPointer, GrabButton, UngrabButton, ChangeActivePointerGrab, GrabKeyboard, UngrabKeyboard, GrabKey and UngrabKey --- lib/corereqs.js | 62 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/lib/corereqs.js b/lib/corereqs.js index 5525fe6..ef41230 100644 --- a/lib/corereqs.js +++ b/lib/corereqs.js @@ -466,6 +466,68 @@ module.exports = { } ], + GrabPointer: [ + function(wid, ownerEvents, mask, pointerMode, keybMode, confineTo, cursor, time) { + return [ 'CCSLSCCLLL', [ 26, ownerEvents, 6, wid, mask, pointerMode, keybMode, + confineTo, cursor, time] ]; + }, + function(buf, status) { + return status; + } + ], + + UngrabPointer: [ + function(time) { + return [ 'CxSL', [ 27, 2, time] ]; + } + ], + + GrabButton: [ + function(wid, ownerEvents, mask, pointerMode, keybMode, confineTo, cursor, button, modifiers) { + return [ 'CCSLSCCLLCxS', [ 28, ownerEvents, 6, wid, mask, pointerMode, keybMode, confineTo, + cursor, button, modifiers ] ]; + } + ], + + UngrabButton: [ + function(wid, button, modifiers) { + return [ 'CCSLSxx', [ 29, button, 3, wid, modifiers ] ]; + } + ], + + ChangeActivePointerGrab: [ + function(cursor, time, mask) { + return [ 'CxSLLSxx', [ 30, 4, cursor, time, mask ] ]; + } + ], + + GrabKeyboard: [ + function(wid, ownerEvents, time, pointerMode, keybMode) { + return [ 'CCSLLCCxx', [ 31, ownerEvents, 4, wid, time, pointerMode, keybMode ] ]; + }, + function(buf, status) { + return status; + } + ], + + UngrabKeyboard: [ + function(time) { + return [ 'CxSL', [ 32, 2, time ] ]; + } + ], + + GrabKey: [ + function(wid, ownerEvents, modifiers, key, pointerMode, keybMode) { + return [ 'CCSLSCCCxxx', [ 33, ownerEvents, 4, wid, modifiers, key, pointerMode, keybMode ] ]; + } + ], + + UngrabKey: [ + function(wid, key, modifiers) { + return [ 'CCSLSxx', [ 34, key, 3, wid, modifiers ] ]; + } + ], + QueryPointer: [ [ 'CxSL', [38, 2] ], function(buf, sameScreen) {