[gnome-shell] panel: Only consider St.Widgets for corner buttons



commit d0a587d42f93c8065daa2a9ec2a461f39050815b
Author: Philippe Troin <phil+gitlabgnome-commits fifi org>
Date:   Thu May 9 10:47:23 2019 -0700

    panel: Only consider St.Widgets for corner buttons
    
    We cannot syncronize styles with plain Clutter.Actors, so don't return
    them when looking for corner buttons.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1047

 js/ui/panel.js | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index fd499f8633..df8fe11603 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -533,6 +533,9 @@ class PanelCorner extends St.DrawingArea {
         if (index < 0)
             return null;
 
+        if (!(children[index] instanceof St.Widget))
+            return null;
+
         if (!children[index].has_style_class_name('panel-menu') &&
             !children[index].has_style_class_name('panel-button'))
             return this._findRightmostButton(children[index]);
@@ -558,6 +561,9 @@ class PanelCorner extends St.DrawingArea {
         if (index == children.length)
             return null;
 
+        if (!(children[index] instanceof St.Widget))
+            return null;
+
         if (!children[index].has_style_class_name('panel-menu') &&
             !children[index].has_style_class_name('panel-button'))
             return this._findLeftmostButton(children[index]);


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