diff options
author | Hugo Lundin <hugo@lundin.dev> | 2021-07-15 13:32:19 +0200 |
---|---|---|
committer | Hugo Lundin <hugo@lundin.dev> | 2021-07-16 16:09:46 +0200 |
commit | a182475db57b3da5edf3d10542086397ee022dcd (patch) | |
tree | e997801ded31217a9a9b21f40151fe02717a7bdb /vncviewer | |
parent | 0d43b96d1c2385fc8202462cf170d7ac7da5d2f7 (diff) | |
download | tigervnc-a182475db57b3da5edf3d10542086397ee022dcd.tar.gz tigervnc-a182475db57b3da5edf3d10542086397ee022dcd.zip |
Explicitly choose current monitor
There are no guarantees from the WM that calling `fullscreen_screens`
with all monitor indices set to `-1` results in the window's current
monitor being used. Because FullScreenMode uses the word "current"
we want to explicitly ask the WM to use that monitor.
Diffstat (limited to 'vncviewer')
-rw-r--r-- | vncviewer/DesktopWindow.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx index 0b957d39..0fe08707 100644 --- a/vncviewer/DesktopWindow.cxx +++ b/vncviewer/DesktopWindow.cxx @@ -885,9 +885,10 @@ void DesktopWindow::fullscreen_on() bool all_monitors = !strcasecmp(fullScreenMode, "all"); bool selected_monitors = !strcasecmp(fullScreenMode, "selected"); - if (not selected_monitors and not all_monitors) - fullscreen_screens(-1, -1, -1, -1); - else { + if (not selected_monitors and not all_monitors) { + int n = Fl::screen_num(x(), y(), w(), h()); + fullscreen_screens(n, n, n, n); + } else { int top, bottom, left, right; int top_y, bottom_y, left_x, right_x; |