Revision: 5003
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=5003&view=rev
Author:   ossman_
Date:     2012-10-11 09:17:19 +0000 (Thu, 11 Oct 2012)
Log Message:
-----------
We need to be more careful about activating maximized mode when in
full screen, otherwise we'll mess things up.

Modified Paths:
--------------
    trunk/vncviewer/DesktopWindow.cxx

Modified: trunk/vncviewer/DesktopWindow.cxx
===================================================================
--- trunk/vncviewer/DesktopWindow.cxx   2012-10-03 12:21:54 UTC (rev 5002)
+++ trunk/vncviewer/DesktopWindow.cxx   2012-10-11 09:17:19 UTC (rev 5003)
@@ -581,11 +581,18 @@
 void DesktopWindow::maximizeWindow()
 {
 #if defined(WIN32)
-  WINDOWPLACEMENT wp;
-  wp.length = sizeof(WINDOWPLACEMENT);
-  GetWindowPlacement(fl_xid(this), &wp);
-  wp.showCmd = SW_MAXIMIZE;
-  SetWindowPlacement(fl_xid(this), &wp);
+  // We cannot use ShowWindow() in full screen mode as it will
+  // resize things implicitly. Fortunately modifying the style
+  // directly results in a maximized state once we leave full screen.
+#ifdef HAVE_FLTK_FULLSCREEN
+  if (fullscreen_active()) {
+    WINDOWINFO wi;
+    wi.cbSize = sizeof(WINDOWINFO);
+    GetWindowInfo(fl_xid(this), &wi);
+    SetWindowLongPtr(fl_xid(this), GWL_STYLE, wi.dwStyle | WS_MAXIMIZE);
+  } else
+#endif
+    ShowWindow(fl_xid(this), SW_MAXIMIZE);
 #elif defined(__APPLE__)
   // OS X is somewhat strange and does not really have a concept of a
   // maximized window, so we can simply resize the window to the workarea.

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Tigervnc-commits mailing list
Tigervnc-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to