diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-03-25 19:45:58 +0000 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-03-25 19:45:58 +0000 |
commit | 4604ee1caf00fe1a8c095119c1046e7f625e1f0b (patch) | |
tree | 2141c5a502ffd09ea415a690ea11afb5970ba992 /src | |
parent | 1aa382f08aadb0d4392b139204cb88df3685ab7e (diff) | |
download | mana-4604ee1caf00fe1a8c095119c1046e7f625e1f0b.tar.gz mana-4604ee1caf00fe1a8c095119c1046e7f625e1f0b.tar.bz2 mana-4604ee1caf00fe1a8c095119c1046e7f625e1f0b.tar.xz mana-4604ee1caf00fe1a8c095119c1046e7f625e1f0b.zip |
Allow mouse focus click-through
This is generally expected on Linux, where it feels annoying that the
initial click just focuses the window.
On macOS it's a little bit different, since applications can be specific
about which elements are directly clickable and which aren't, but in
general it feels better to me when the UI can be interacted with
directly.
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/client.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 465ba0e8..14547870 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,5 @@ include(FindPkgConfig) -pkg_check_modules(SDL2 REQUIRED sdl2>=2.0.1 SDL2_image SDL2_mixer SDL2_net SDL2_ttf) +pkg_check_modules(SDL2 REQUIRED sdl2>=2.0.5 SDL2_image SDL2_mixer SDL2_net SDL2_ttf) FIND_PACKAGE(PhysFS REQUIRED) FIND_PACKAGE(CURL REQUIRED) FIND_PACKAGE(LibXml2 REQUIRED) diff --git a/src/client.cpp b/src/client.cpp index eac55c83..7d887436 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -248,6 +248,8 @@ Client::Client(const Options &options): } atexit(SDL_Quit); + SDL_SetHint(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, "1"); + ResourceManager *resman = ResourceManager::getInstance(); if (!resman->setWriteDir(mLocalDataDir)) |