diff options
author | Constantin Kaplinsky <const@tightvnc.com> | 2006-05-17 10:45:57 +0000 |
---|---|---|
committer | Constantin Kaplinsky <const@tightvnc.com> | 2006-05-17 10:45:57 +0000 |
commit | c2f020f68a666b1f7b90584237eba1aff4947dcb (patch) | |
tree | dbb1debd7bf0886ec4cabc96b7f0270c38e58ec5 /vncviewer | |
parent | 318eb4ae6ae936c5f07fdb751b7b7b2b0d58d8ae (diff) | |
download | tigervnc-c2f020f68a666b1f7b90584237eba1aff4947dcb.tar.gz tigervnc-c2f020f68a666b1f7b90584237eba1aff4947dcb.zip |
Fixed a problem with not updating the system menu when it's opened by right-clicking the title bar. Otherwise, the "Show toolbar" option would not always show correct toolbar state.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/merge-with-vnc-4.1.1@557 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer')
-rw-r--r-- | vncviewer/DesktopWindow.cxx | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx index 47ddf7d8..eee55ff1 100644 --- a/vncviewer/DesktopWindow.cxx +++ b/vncviewer/DesktopWindow.cxx @@ -490,6 +490,12 @@ DesktopWindow::processMessage(UINT msg, WPARAM wParam, LPARAM lParam) { kbd.releaseAllKeys(callback); break; + // -=- If the menu is about to be shown, make sure it's up to date + + case WM_INITMENU: + callback->refreshMenu(true); + break; + // -=- Handle the extra window menu items // Pass system menu messages to the callback and only attempt @@ -524,13 +530,7 @@ DesktopWindow::processMessage(UINT msg, WPARAM wParam, LPARAM lParam) { setFullscreen(false); break; - // If the menu is about to be shown, make sure it's up to date - case SC_KEYMENU: - case SC_MOUSEMENU: - callback->refreshMenu(true); - break; - - }; + } break; // Treat all menu commands as system menu commands @@ -553,6 +553,11 @@ DesktopWindow::processMessage(UINT msg, WPARAM wParam, LPARAM lParam) { // If MenuKey is being released then pop-up the menu if ((msg == WM_KEYDOWN)) { // Make sure it's up to date + // + // NOTE: Here we call refreshMenu only to grey out Move and Size + // menu items. Other things will be refreshed once again + // while processing the WM_INITMENU message. + // callback->refreshMenu(false); // Show it under the pointer |