If we've explicitly requested a position (using -geometry) then we were
still triggering legacy full-screen request logic. This is very counter
intuitive as having a position that doesn't align with a monitor should
disqualify us for that.
It turns out that at least marco (and probably everything
metacity-derived) ends up ignoring the requested position and we go back
to triggering the legacy logic again.
Work around this by assuming that the window manager will adjust our
initial position and don't consider that in the workaround logic.
Fl::screen_xywh(sx, sy, sw, sh, i);
- if ((sx == x) && (sy == y) && (sw == w) && (sh == h)) {
- vlog.info(_("Adjusting window size to avoid accidental full-screen request"));
- // Assume a panel of some form and adjust the height
- h -= 40;
- }
+ // We can't trust x and y if the window isn't mapped as the
+ // window manager might adjust those numbers
+ if (shown() && ((sx != x) || (sy != y)))
+ continue;
+
+ if ((sw != w) || (sh != h))
+ continue;
+
+ vlog.info(_("Adjusting window size to avoid accidental full-screen request"));
+ // Assume a panel of some form and adjust the height
+ h -= 40;
}
}
}