浏览代码

gdk: Ignore focus loss events caused by text input showing the OSK

Ethan Lee 3 月之前
父节点
当前提交
67f796ebde
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/gdk/SDL_gdk.cpp

+ 1 - 1
src/core/gdk/SDL_gdk.cpp

@@ -105,7 +105,7 @@ bool GDK_RegisterChangeNotifications(void)
         SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, "[GDK] in RegisterAppConstrainedChangeNotification handler");
         SDL_VideoDevice *_this = SDL_GetVideoDevice();
         if (_this) {
-            if (constrained) {
+            if (constrained && !((_this->windows) && _this->windows->text_input_active)) {
                 SDL_SetKeyboardFocus(NULL);
             } else {
                 SDL_SetKeyboardFocus(_this->windows);