Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: chrome/views/window/window_win.cc

Issue 53120: Review Request: fix issue 5724, 5738 -- wrong position of system menu (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/views/window/custom_frame_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/views/window/window_win.cc
===================================================================
--- chrome/views/window/window_win.cc (revision 12538)
+++ chrome/views/window/window_win.cc (working copy)
@@ -415,9 +415,11 @@
// to get a system menu. We also can't take the return value of this
// function. We need to call it *again* to get a valid HMENU.
//::GetSystemMenu(GetNativeView(), TRUE);
+ UINT flags = TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RETURNCMD;
+ if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT)
+ flags |= TPM_RIGHTALIGN;
HMENU system_menu = ::GetSystemMenu(GetNativeView(), FALSE);
- int id = ::TrackPopupMenu(system_menu,
- TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RETURNCMD,
+ int id = ::TrackPopupMenu(system_menu, flags,
point.x(), point.y(), 0, GetNativeView(), NULL);
ExecuteSystemMenuCommand(id);
}
@@ -493,7 +495,7 @@
force_hidden_ = true;
::ShowWindow(GetNativeView(), SW_RESTORE);
force_hidden_ = false;
-
+
// We respond to this in response to WM_DWMCOMPOSITIONCHANGED since that is
// the only thing we care about - we don't actually respond to WM_THEMECHANGED
// messages.
« no previous file with comments | « chrome/views/window/custom_frame_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698