Commit 0d969695 authored by Bret Sepulveda's avatar Bret Sepulveda Committed by Commit Bot

Fix system menu not appearing when clicking the corner of popup windows.

On Windows the system menu is expected to appear on a single left-click
to the top-left corner of the window, and a double click is expected to
close the window. The Views window icon added by custom titlebar was
intercepting the click and so the WM_NCLBUTTONDOWN message was not
getting DefWindowProc'ed. This patch fixes this by disabling event
handling on that icon, as it isn't supposed to do anything.

Bug: 828429
Change-Id: I1ee0cfe38707479948b51eed48da83639964a7ae
Reviewed-on: https://chromium-review.googlesource.com/1011544Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550472}
parent e192695d
...@@ -109,6 +109,10 @@ GlassBrowserFrameView::GlassBrowserFrameView(BrowserFrame* frame, ...@@ -109,6 +109,10 @@ GlassBrowserFrameView::GlassBrowserFrameView(BrowserFrame* frame,
window_icon_ = new TabIconView(this, nullptr); window_icon_ = new TabIconView(this, nullptr);
window_icon_->set_is_light(true); window_icon_->set_is_light(true);
window_icon_->set_id(VIEW_ID_WINDOW_ICON); window_icon_->set_id(VIEW_ID_WINDOW_ICON);
// Stop the icon from intercepting clicks intended for the HTSYSMENU region
// of the window. Even though it does nothing on click, it will still
// prevent us from giving the event back to Windows to handle properly.
window_icon_->set_can_process_events_within_subtree(false);
AddChildView(window_icon_); AddChildView(window_icon_);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment