mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-06-17 14:22:00 +00:00
x11: use QUIT_KEY constant instead of direct code
For consistency in the evdev, sdl and x11 input drivers.
This commit is contained in:
+2
-1
@@ -32,6 +32,7 @@
|
|||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
|
|
||||||
#define ACTION_MODIFIERS (MODIFIER_SHIFT|MODIFIER_ALT|MODIFIER_CTRL)
|
#define ACTION_MODIFIERS (MODIFIER_SHIFT|MODIFIER_ALT|MODIFIER_CTRL)
|
||||||
|
#define QUIT_KEY 0x18 /* KEY_Q */
|
||||||
|
|
||||||
static Display *display;
|
static Display *display;
|
||||||
static Window window;
|
static Window window;
|
||||||
@@ -57,7 +58,7 @@ static int x11_handler(int fd) {
|
|||||||
case KeyRelease:
|
case KeyRelease:
|
||||||
if (event.xkey.keycode >= 8 && event.xkey.keycode < (sizeof(keyCodes)/sizeof(keyCodes[0]) + 8)) {
|
if (event.xkey.keycode >= 8 && event.xkey.keycode < (sizeof(keyCodes)/sizeof(keyCodes[0]) + 8)) {
|
||||||
if ((keyboard_modifiers & ACTION_MODIFIERS) == ACTION_MODIFIERS && event.type == KeyRelease) {
|
if ((keyboard_modifiers & ACTION_MODIFIERS) == ACTION_MODIFIERS && event.type == KeyRelease) {
|
||||||
if (event.xkey.keycode == 0x18)
|
if (event.xkey.keycode == QUIT_KEY)
|
||||||
return LOOP_RETURN;
|
return LOOP_RETURN;
|
||||||
else {
|
else {
|
||||||
grabbed = !grabbed;
|
grabbed = !grabbed;
|
||||||
|
|||||||
Reference in New Issue
Block a user