From 0dc20f913c9e4e9d21e5becd712330874d74a12b Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sat, 8 Aug 2015 11:03:07 +0000 Subject: [PATCH] Mapster32: call AppGrabMouse() on show/retract OSD like in the game. This is necessary to hide the mouse cursor in some settings (such as with the debug build under Xfce). DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@5321 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/build.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index 988874c7d..ade115f67 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -552,6 +552,11 @@ void M32_DrawRoomsAndMasks(void) } } +void M32_OnShowOSD(int32_t shown) +{ + AppGrabMouse((!shown) + 2); +} + int32_t app_main(int32_t argc, const char **argv) { #ifdef STARTUP_SETUP_WINDOW @@ -620,7 +625,7 @@ int32_t app_main(int32_t argc, const char **argv) NULL, NULL, NULL, NULL, NULL, COMMON_clearbackground, BGetTime, - NULL + M32_OnShowOSD ); OSD_SetParameters(0,2, 0,0, 4,0); @@ -738,6 +743,7 @@ int32_t app_main(int32_t argc, const char **argv) updatesector(pos.x,pos.y,&cursectnum); setkeypresscallback(&m32_keypresscallback); + M32_OnShowOSD(0); // make sure the desktop's mouse cursor is hidden if (cursectnum == -1) {