@@ -183,7 +183,7 @@ public class Gala.ShellClientsManager : Object {
183183 panel_windows[window]. set_hide_mode (hide_mode);
184184 }
185185
186- public void make_centered (Meta .Window window ) requires (!is_positioned_window (window )) {
186+ public void make_centered (Meta .Window window ) requires (!is_itself_positioned (window )) {
187187 positioned_windows[window] = new WindowPositioner (window, wm, (ref x, ref y) = > {
188188 unowned var display = wm. get_display ();
189189 var monitor_geom = display. get_monitor_geometry (display. get_primary_monitor ());
@@ -196,7 +196,7 @@ public class Gala.ShellClientsManager : Object {
196196 window. unmanaging. connect_after ((_window) = > positioned_windows. remove (_window));
197197 }
198198
199- public void make_monitor_label (Meta .Window window , int monitor_index ) requires (!is_positioned_window (window )) {
199+ public void make_monitor_label (Meta .Window window , int monitor_index ) requires (!is_itself_positioned (window )) {
200200 if (monitor_index < 0 || monitor_index > wm. get_display (). get_n_monitors ()) {
201201 warning (" Invalid monitor index provided: %d " , monitor_index);
202202 return ;
@@ -221,8 +221,12 @@ public class Gala.ShellClientsManager : Object {
221221 window. unmanaging. connect_after ((_window) = > positioned_windows. remove (_window));
222222 }
223223
224+ private bool is_itself_positioned (Meta .Window window ) {
225+ return (window in positioned_windows) || (window in panel_windows);
226+ }
227+
224228 public bool is_positioned_window (Meta .Window window ) {
225- bool positioned = (window in positioned_windows) || (window in panel_windows );
229+ bool positioned = is_itself_positioned (window);
226230 window. foreach_ancestor ((ancestor) = > {
227231 if (ancestor in positioned_windows || ancestor in panel_windows) {
228232 positioned = true ;
0 commit comments