From 9c4a7eb845126f068aaac0173453e803e5ea6bf8 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Wed, 26 Aug 2026 17:24:51 -0400 Subject: Add flag for when to expect POINTER_MOVE Signed-off-by: Andrew Opalach --- src/window.h | 3 ++- src/window_glfm.c | 2 +- src/window_win32.c | 6 ++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/window.h b/src/window.h index 66d4f38..cee8f21 100644 --- a/src/window.h +++ b/src/window.h @@ -72,7 +72,8 @@ struct stl_monitor { enum { STELA_WINDOW_VSYNC = 1, - STELA_WINDOW_WALLPAPER = 1 << 1 + STELA_WINDOW_WALLPAPER = 1 << 1, + STELA_WINDOW_SUPPORTS_POINTER_MOVE = 1 << 2 }; struct stl_window { diff --git a/src/window_glfm.c b/src/window_glfm.c index ad8baec..7fdb26a 100644 --- a/src/window_glfm.c +++ b/src/window_glfm.c @@ -141,7 +141,7 @@ static u32 parse_intent(ANativeActivity *activity, JNIEnv *jni) al_array_push(global.args, main_arg); } } else { - str arg = AL_STR_NULL; + str arg = AL_STR_EMPTY; if (is_http) { jobject path = glfm__callJavaMethod(jni, uri, "toString", "()Ljava/lang/String;", diff --git a/src/window_win32.c b/src/window_win32.c index e1cf137..adc6e26 100644 --- a/src/window_win32.c +++ b/src/window_win32.c @@ -984,6 +984,8 @@ static bool window_win32_create_window(struct stl_window *window, u32 width, u32 return false; } + stl_window_created(&w32->w, width, height, flags); + #define HID_USAGE_PAGE_GENERIC ((USHORT)0x01) #define HID_USAGE_GENERIC_MOUSE ((USHORT)0x02) RAWINPUTDEVICE Rid[1]; @@ -993,14 +995,14 @@ static bool window_win32_create_window(struct stl_window *window, u32 width, u32 Rid[0].hwndTarget = w32->Window; if (!RegisterRawInputDevices(Rid, 1, sizeof(Rid[0]))) { log_warn("Failed to register raw input mouse."); + } else { + w32->w.flags |= STELA_WINDOW_SUPPORTS_POINTER_MOVE; } #ifdef STELA_DRAG_AND_DROP DragAcceptFiles(w32->Window, TRUE); #endif - stl_window_created(&w32->w, width, height, flags); - w32->Closed = FALSE; w32->Decorated = TRUE; w32->UserDecorated = TRUE; -- cgit v1.2.3-101-g0448