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
This commit is contained in:
Philippe Troin 2019-05-09 10:47:23 -07:00 committed by Florian Müllner
parent 2bb8e1be9b
commit d0a587d42f

View File

@ -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]);