瀏覽代碼

LibGUI: Close EmojiDialog on active window change

This patch makes EmojiDialog be closed whenever the focus moves away
from it just like the CommandPalette.
Olivier De Cannière 3 年之前
父節點
當前提交
dbad617351
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Userland/Libraries/LibGUI/EmojiInputDialog.cpp

+ 5 - 0
Userland/Libraries/LibGUI/EmojiInputDialog.cpp

@@ -92,6 +92,11 @@ EmojiInputDialog::EmojiInputDialog(Window* parent_window)
             }
             }
         }
         }
     }
     }
+
+    on_active_window_change = [this](bool is_active_window) {
+        if (!is_active_window)
+            close();
+    };
 }
 }
 
 
 void EmojiInputDialog::event(Core::Event& event)
 void EmojiInputDialog::event(Core::Event& event)