From 1d03cbcc70e6275a96da1fa7f6afc89a5e8335f9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20=C3=85strand?= Date: Mon, 1 Aug 2011 10:34:38 +0000 Subject: [PATCH] More fullscreen fixes: Do not try to change size in fullscreen mode even if viewport is same as window size. However, after exiting fullscreen mode, the window size needs to be updated. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4610 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- vncviewer/DesktopWindow.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx index 102e0b1c..a7373ffc 100644 --- a/vncviewer/DesktopWindow.cxx +++ b/vncviewer/DesktopWindow.cxx @@ -152,19 +152,19 @@ void DesktopWindow::resizeFramebuffer(int new_w, int new_h) // If we're letting the viewport match the window perfectly, then // keep things that way for the new size, otherwise just keep things // like they are. +#ifdef HAVE_FLTK_FULLSCREEN + if (!fullscreen_active()) { +#endif if ((w() == viewport->w()) && (h() == viewport->h())) size(new_w, new_h); else { -#ifdef HAVE_FLTK_FULLSCREEN - if (!fullscreen_active()) { -#endif // Make sure the window isn't too big if ((w() > new_w) || (h() > new_h)) size(__rfbmin(w(), new_w), __rfbmin(h(), new_h)); + } #ifdef HAVE_FLTK_FULLSCREEN - } -#endif } +#endif viewport->size(new_w, new_h); @@ -210,6 +210,7 @@ int DesktopWindow::handle(int event) fullScreen.setParam(fullscreen_active()); if (!fullscreen_active()) { size_range(100, 100, viewport->w(), viewport->h()); + size(viewport->w(), viewport->h()); } else { // We need to turn off the size limitations for proper // fullscreen support, but in case fullscreen is activated via -- 2.39.5