aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vncviewer/DesktopWindow.cxx21
1 files changed, 13 insertions, 8 deletions
diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx
index 2bf63b8f..d54a92b3 100644
--- a/vncviewer/DesktopWindow.cxx
+++ b/vncviewer/DesktopWindow.cxx
@@ -222,14 +222,6 @@ DesktopWindow::DesktopWindow(int w, int h, const char *name,
// Adjust layout now that we're visible and know our final size
repositionWidgets();
- if (delayedFullscreen) {
- // Hack: Fullscreen requests may be ignored, so we need a timeout for
- // when we should stop waiting. We also really need to wait for the
- // resize, which can come after the fullscreen event.
- Fl::add_timeout(0.5, handleFullscreenTimeout, this);
- fullscreen_on();
- }
-
// Throughput graph for debugging
if (vlog.getLevel() >= LogWriter::LEVEL_DEBUG) {
memset(&stats, 0, sizeof(stats));
@@ -947,6 +939,19 @@ int DesktopWindow::fltkDispatch(int event, Fl_Window *win)
}
break;
+ case FL_SHOW:
+ // In this particular place, FL_SHOW means an actual MapNotify,
+ // which means we can continue enabling initial fullscreen.
+ if (dw->delayedFullscreen) {
+ // Hack: Fullscreen requests may be ignored, so we need a
+ // timeout for when we should stop waiting. We also really need
+ // to wait for the resize, which can come after the fullscreen
+ // event.
+ Fl::add_timeout(0.5, handleFullscreenTimeout, dw);
+ dw->fullscreen_on();
+ }
+ break;
+
case FL_RELEASE:
// We usually fail to grab the mouse if a mouse button was
// pressed when we gained focus (e.g. clicking on our window),