aboutsummaryrefslogtreecommitdiffstats
path: root/src/game.c
diff options
context:
space:
mode:
authornathan <nathansmith@disroot.org>2025-11-17 09:23:10 +0000
committernathan <nathansmith@disroot.org>2025-11-17 09:23:10 +0000
commit04655283852b1b332ae9f8610aca20a553b3791f (patch)
treec329b9fc3c2a8c1b647cb3148f316515c9135e5e /src/game.c
parentbbfc3fffc0e5f28681ebfb9fc0fd47777fded191 (diff)
downloadFindThings-04655283852b1b332ae9f8610aca20a553b3791f.tar.gz
FindThings-04655283852b1b332ae9f8610aca20a553b3791f.tar.bz2
FindThings-04655283852b1b332ae9f8610aca20a553b3791f.zip
Better window focus
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game.c b/src/game.c
index 317f96b..4818e79 100644
--- a/src/game.c
+++ b/src/game.c
@@ -60,8 +60,7 @@ FocusCommand testFloatingWindowCallback(FloatingWindow* window, Game* game)
}
// Button test.
- if (GuiButton((Rectangle){x + 10.0, y + 50.0, 40.0, 20.0}, "A")
- && window->hasFocus)
+ if (GuiButton((Rectangle){x + 10.0, y + 50.0, 40.0, 20.0}, "A"))
{
puts("hi");
}
@@ -255,10 +254,12 @@ void enableGameCursor(Game* game)
{
game->isCursorEnabled = true;
EnableCursor();
+ enableWindowManager(&game->wm);
}
void disableGameCursor(Game* game)
{
game->isCursorEnabled = false;
DisableCursor();
+ disableWindowManager(&game->wm);
}