From 07cbf841be9a8a50e0842213086114fdd2cbbc06 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 11 Sep 2018 14:33:20 +0200 Subject: [PATCH] Fix multi-head placement of overlay (again) We should be looking at the physical monitor layout, not the current RFB layout. The latter might not be in sync with the local monitors. --- vncviewer/DesktopWindow.cxx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx index a8e17fce..d070b648 100644 --- a/vncviewer/DesktopWindow.cxx +++ b/vncviewer/DesktopWindow.cxx @@ -365,20 +365,13 @@ void DesktopWindow::draw() // Overlay (if active) if (overlay) { int ox, oy, ow, oh; - int sx, sy, sw; + int sx, sy, sw, sh; // Make sure it's properly seen by adjusting it relative to the // primary screen rather than the entire window - if (fullscreen_active()) { - ScreenSet layout; - - layout = cc->cp.screenLayout; - - assert(layout.num_screens() >= 1); - - sx = layout.begin()->dimensions.tl.x; - sy = layout.begin()->dimensions.tl.y; - sw = layout.begin()->dimensions.width(); + if (fullscreen_active() && fullScreenAllMonitors) { + assert(Fl::screen_count() >= 1); + Fl::screen_xywh(sx, sy, sw, sh, 0); } else { sx = 0; sy = 0; -- 2.39.5