diff options
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r-- | src/gui/gui.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 9441677a6..dda067644 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -32,6 +32,7 @@ #include "gui/widgets/mouseevent.h" #include "gui/widgets/window.h" +#include "client.h" #include "configuration.h" #include "dragdrop.h" #include "keydata.h" @@ -446,13 +447,8 @@ void Gui::draw() int mouseX, mouseY; const uint8_t button = SDL_GetMouseState(&mouseX, &mouseY); -#ifdef USE_SDL2 - // +++ need check also is window have mouse focus SDL_GetMouseFocus - if (mMouseCursors && mCustomCursor && mMouseCursorAlpha > 0.0f) -#else - if ((SDL_GetAppState() & SDL_APPMOUSEFOCUS || button & SDL_BUTTON(1)) + if ((client->getMouseFocused() || button & SDL_BUTTON(1)) && mMouseCursors && mCustomCursor && mMouseCursorAlpha > 0.0f) -#endif { Graphics *g2 = static_cast<Graphics*>(mGraphics); const Image *const image = dragDrop.getItemImage(); |