commit ede128d
Devine Lu Linvega
·
2025-03-16 17:26:21 +0000 UTC
parent 7e58da1
Added mouse update on leave event
1 files changed,
+3,
-2
+3,
-2
1@@ -165,6 +165,7 @@ emu_event(void)
2 XButtonPressedEvent *e = (XButtonPressedEvent *)&ev;
3 mouse_up(0x1 << (e->button - 1));
4 } break;
5+ case LeaveNotify:
6 case MotionNotify: {
7 XMotionEvent *e = (XMotionEvent *)&ev;
8 mouse_pos(e->x / uxn_screen.scale, e->y / uxn_screen.scale);
9@@ -211,7 +212,7 @@ display_init(void)
10 window = XCreateSimpleWindow(display, RootWindow(display, 0), 0, 0, WIDTH, HEIGHT, 1, 0, 0);
11 display_hidecursor();
12 display_floating(display, window);
13- XSelectInput(display, window, ButtonPressMask | ButtonReleaseMask | PointerMotionMask | ExposureMask | KeyPressMask | KeyReleaseMask);
14+ XSelectInput(display, window, ButtonPressMask | ButtonReleaseMask | PointerMotionMask | ExposureMask | KeyPressMask | KeyReleaseMask | LeaveWindowMask);
15 XStoreName(display, window, "uxn11");
16 XSetClassHint(display, window, &class);
17 XMapWindow(display, window);
18@@ -267,7 +268,7 @@ main(int argc, char **argv)
19 {
20 int i = 1;
21 if(argc == 2 && argv[1][0] == '-' && argv[1][1] == 'v')
22- return !fprintf(stdout, "Uxn11 - Varvara Emulator, 14 Mar 2025.\n");
23+ return !fprintf(stdout, "Uxn11 - Varvara Emulator, 16 Mar 2025.\n");
24 else if(argc == 1)
25 return !fprintf(stdout, "usage: %s [-v] file.rom [args..]\n", argv[0]);
26 else if(!display_init())