Browse Source

Improve full-screen workaround on connect

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.
tags/v1.12.90
Pierre Ossman 2 years ago
parent
commit
3b0ad53b75
1 changed files with 11 additions and 5 deletions
  1. 11
    5
      vncviewer/DesktopWindow.cxx

+ 11
- 5
vncviewer/DesktopWindow.cxx View File

@@ -635,11 +635,17 @@ void DesktopWindow::resize(int x, int y, int w, int h)

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;
}
}
}

Loading…
Cancel
Save