mirror of
https://github.com/danbulant/node-x11
synced 2026-06-24 17:21:47 +00:00
Fix some event names
- ButtonPress, ButtonRelease, MotionNotify and EnterNotify
This commit is contained in:
parent
69825534f6
commit
1e36e5d426
1 changed files with 3 additions and 3 deletions
|
|
@ -254,7 +254,7 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw)
|
||||||
var values = raw.unpack('LLLssssSC');
|
var values = raw.unpack('LLLssssSC');
|
||||||
//event.raw = values;
|
//event.raw = values;
|
||||||
// TODO: use unpackTo???
|
// TODO: use unpackTo???
|
||||||
event.name = [,,'KeyPress', 'KeyRelease', 'MouseDown', 'MouseUp', 'MouseMove'][type]
|
event.name = [,,'KeyPress', 'KeyRelease', 'ButtonPress', 'ButtonRelease', 'MotionNotify'][type]
|
||||||
event.time = extra;
|
event.time = extra;
|
||||||
event.keycode = code;
|
event.keycode = code;
|
||||||
event.root = values[0];
|
event.root = values[0];
|
||||||
|
|
@ -266,8 +266,8 @@ XClient.prototype.unpackEvent = function(type, seq, extra, code, raw)
|
||||||
event.y = values[6];
|
event.y = values[6];
|
||||||
event.buttons = values[7];
|
event.buttons = values[7];
|
||||||
event.sameScreen = values[8];
|
event.sameScreen = values[8];
|
||||||
} else if (type == 7) { //EnterWindow
|
} else if (type == 7) { //EnterNotify
|
||||||
event.name = 'EnterWindow'
|
event.name = 'EnterNotify'
|
||||||
var values = raw.unpack('LLLssssSC');
|
var values = raw.unpack('LLLssssSC');
|
||||||
event.root = values[0]
|
event.root = values[0]
|
||||||
event.wid = values[1]
|
event.wid = values[1]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue