浏览代码

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 年前
父节点
当前提交
3b0ad53b75
共有 1 个文件被更改,包括 11 次插入5 次删除
  1. 11
    5
      vncviewer/DesktopWindow.cxx

+ 11
- 5
vncviewer/DesktopWindow.cxx 查看文件

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

正在加载...
取消
保存