Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/application/StarMainApplication_sdl.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2025-01-25 12:29:55 +1100
committerKae <80987908+Novaenia@users.noreply.github.com>2025-01-25 12:29:55 +1100
commit2c2211c91a22ef675982d725798c662f8a230e70 (patch)
tree12510121a261401cd03a0247abee8bc0459cdc84 /source/application/StarMainApplication_sdl.cpp
parenta7aa6679397563b144c016ef8712bf438cfa63df (diff)
change clipboard.setText to only require window focus
Diffstat (limited to 'source/application/StarMainApplication_sdl.cpp')
-rw-r--r--source/application/StarMainApplication_sdl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/application/StarMainApplication_sdl.cpp b/source/application/StarMainApplication_sdl.cpp
index 557e02d..e0dfd37 100644
--- a/source/application/StarMainApplication_sdl.cpp
+++ b/source/application/StarMainApplication_sdl.cpp
@@ -521,6 +521,10 @@ private:
SDL_SetClipboardText(text.utf8Ptr());
}
+ bool isFocused() const override {
+ return (SDL_GetWindowFlags(parent->m_sdlWindow) & (SDL_WINDOW_INPUT_FOCUS | SDL_WINDOW_MOUSE_FOCUS)) != 0;
+ }
+
void setTargetUpdateRate(float targetUpdateRate) override {
parent->m_updateTicker.setTargetTickRate(targetUpdateRate);
}