diff options
author | Pierre Ossman <ossman@cendio.se> | 2011-11-21 14:03:31 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2011-11-21 14:03:31 +0000 |
commit | 29e4a1652eb635cc27b0d0f2fbcc75a116e995ee (patch) | |
tree | defe4b00264e800d0123e3c3d6e24e7a4b20e5e4 /vncviewer | |
parent | 701ad68d0dccd6d409d480435eadbaf689cfad41 (diff) | |
download | tigervnc-29e4a1652eb635cc27b0d0f2fbcc75a116e995ee.tar.gz tigervnc-29e4a1652eb635cc27b0d0f2fbcc75a116e995ee.zip |
Reindent some code that had grown a bit unstructured.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4812 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer')
-rw-r--r-- | vncviewer/DesktopWindow.cxx | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx index 41abf6be..d2975dc0 100644 --- a/vncviewer/DesktopWindow.cxx +++ b/vncviewer/DesktopWindow.cxx @@ -167,13 +167,15 @@ void DesktopWindow::resizeFramebuffer(int new_w, int new_h) #ifdef HAVE_FLTK_FULLSCREEN if (!fullscreen_active()) { #endif - if ((w() == viewport->w()) && (h() == viewport->h())) - size(new_w, new_h); - else { - // Make sure the window isn't too big + if ((w() == viewport->w()) && (h() == viewport->h())) + size(new_w, new_h); + else { + // Make sure the window isn't too big. We do this manually because + // we have to disable the window size restriction (and it isn't + // entirely trustworthy to begin with). if ((w() > new_w) || (h() > new_h)) size(__rfbmin(w(), new_w), __rfbmin(h(), new_h)); - } + } #ifdef HAVE_FLTK_FULLSCREEN } #endif @@ -218,19 +220,18 @@ int DesktopWindow::handle(int event) switch (event) { #ifdef HAVE_FLTK_FULLSCREEN case FL_FULLSCREEN: - if (event == FL_FULLSCREEN) { - 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 - // the WM, this is a bit of a problem. In practice, it seems to - // work to change the size limits after we have recieved the - // FL_FULLSCREEN event, at least with my Metacity. - size_range(100, 100, 0, 0); - } + 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 + // the WM, this is a bit of a problem. In practice, it seems to + // work to change the size limits after we have recieved the + // FL_FULLSCREEN event, at least with my Metacity. + size_range(100, 100, 0, 0); } if (!fullscreenSystemKeys) |