[gnome-shell/gnome-42] ibusCandidatePopup: Prevent it from covering screenshot UI



commit 87e1e02b38e49176c74dac3c357f3cbfd8e7f74a
Author: Alynx Zhou <alynx zhou gmail com>
Date:   Mon Jul 4 11:59:43 2022 +0800

    ibusCandidatePopup: Prevent it from covering screenshot UI
    
    If we only raise screenshot UI to top, ibusCandidatePopup can still
    cover screenshot UI because each time ibusCandidatePopup updates it's
    visibility it will raise it to top and this also happens if we open
    screenshot UI via keybinding. This commit fixes it by only raising it
    above keyboardBox, because keyboardBox is above all entries in modal
    dialogs.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2331>
    (cherry picked from commit 67a1d3b2622a8c0f00c68fca85d44af8b6fd9904)

 js/ui/ibusCandidatePopup.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/ibusCandidatePopup.js b/js/ui/ibusCandidatePopup.js
index 330830b2ea..346c4ea6e9 100644
--- a/js/ui/ibusCandidatePopup.js
+++ b/js/ui/ibusCandidatePopup.js
@@ -324,7 +324,12 @@ class IbusCandidatePopup extends BoxPointer.BoxPointer {
         if (isVisible) {
             this.setPosition(this._dummyCursor, 0);
             this.open(BoxPointer.PopupAnimation.NONE);
-            this.get_parent().set_child_above_sibling(this, null);
+            // We shouldn't be above some components like the screenshot UI,
+            // so don't raise to the top.
+            // The on-screen keyboard is expected to be above any entries,
+            // so just above the keyboard gets us to the right layer.
+            const { keyboardBox } = Main.layoutManager;
+            this.get_parent().set_child_above_sibling(this, keyboardBox);
         } else {
             this.close(BoxPointer.PopupAnimation.NONE);
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]