New Input::Event::FOCUS, rename keycode to code

This patch introduces keyboard-focus events to the 'Input::Event' class
and changes the name 'Input::Event::keycode' to 'code'. The 'code'
represents the key code for PRESS/RELEASE events, and the focus state
for FOCUS events (0 - unfocused, 1 - focused).

Furthermore, nitpicker has been adapted to deliver FOCUS events to its
clients.

Fixes #609
This commit is contained in:
Norman Feske
2013-01-12 23:34:49 +01:00
parent 267817c2c5
commit af66043b79
20 changed files with 115 additions and 92 deletions

View File

@@ -159,14 +159,14 @@ class Timer_thread : public Thread<4096>
_mx = e.ax();
_my = e.ay();
ev.assign(e.type() == Input::Event::PRESS ? Event::PRESS : Event::RELEASE,
e.ax(), e.ay(), e.keycode());
e.ax(), e.ay(), e.code());
_evqueue.add(&ev);
}
if (e.type() == Input::Event::MOTION) {
_mx = e.ax();
_my = e.ay();
ev.assign(Event::MOTION, e.ax(), e.ay(), e.keycode());
ev.assign(Event::MOTION, e.ax(), e.ay(), e.code());
_evqueue.add(&ev);
}
}