Create the system menu entries earlier to play nice with any system-wide
additions.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3765 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/win/vncviewer/CConn.cxx b/win/vncviewer/CConn.cxx
index d5eadc4..5be15e8 100644
--- a/win/vncviewer/CConn.cxx
+++ b/win/vncviewer/CConn.cxx
@@ -723,21 +723,6 @@
// Show the window
window = new DesktopWindow(this);
- window->setName(cp.name());
- window->setShowToolbar(options.showToolbar);
- window->setSize(cp.width, cp.height);
- applyOptions(options);
-
- // Save the server's current format
- serverDefaultPF = cp.pf();
-
- // Calculate the full-colour format to use
- calculateFullColourPF();
-
- // Request the initial update
- vlog.info("requesting initial update");
- formatChange = encodingChange = requestUpdate = true;
- requestNewUpdate();
// Update the window menu
HMENU wndmenu = GetSystemMenu(window->getHandle(), FALSE);
@@ -758,6 +743,23 @@
AppendMenu(wndmenu, MF_STRING, IDM_OPTIONS, _T("&Options..."));
AppendMenu(wndmenu, MF_STRING, IDM_INFO, _T("Connection &Info..."));
AppendMenu(wndmenu, MF_STRING, IDM_ABOUT, _T("&About..."));
+
+ // Set window attributes
+ window->setName(cp.name());
+ window->setShowToolbar(options.showToolbar);
+ window->setSize(cp.width, cp.height);
+ applyOptions(options);
+
+ // Save the server's current format
+ serverDefaultPF = cp.pf();
+
+ // Calculate the full-colour format to use
+ calculateFullColourPF();
+
+ // Request the initial update
+ vlog.info("requesting initial update");
+ formatChange = encodingChange = requestUpdate = true;
+ requestNewUpdate();
}
void