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

Unified Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views.cc

Issue 224903022: Linux: App windows with frame: none now have resize handles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change comments now that I better understand the situation. Created 6 years, 8 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 | « no previous file | chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
index 03279efb1001b56bb74767c7b3d09266cd17f7f1..3d8da6e6e48244bf7413f9c2ddabfaefd7f4b915 100644
--- a/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views.cc
@@ -332,11 +332,14 @@ void ChromeNativeAppWindowViews::InitializePanelWindow(
}
void ChromeNativeAppWindowViews::InstallEasyResizeTargeterOnContainer() const {
- aura::Window* root_window = widget()->GetNativeWindow()->GetRootWindow();
+ aura::Window* window = widget()->GetNativeWindow();
gfx::Insets inset(kResizeInsideBoundsSize, kResizeInsideBoundsSize,
kResizeInsideBoundsSize, kResizeInsideBoundsSize);
- root_window->SetEventTargeter(scoped_ptr<ui::EventTargeter>(
- new wm::EasyResizeWindowTargeter(root_window, inset, inset)));
+ // Add the EasyResizeWindowTargeter on the window, not its root window. The
+ // root window does not have a delegate, which is needed to handle the event
+ // in Linux.
+ window->SetEventTargeter(scoped_ptr<ui::EventTargeter>(
+ new wm::EasyResizeWindowTargeter(window, inset, inset)));
}
apps::AppWindowFrameView*
@@ -671,7 +674,7 @@ void ChromeNativeAppWindowViews::InitializeWindow(
extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
NULL));
-#if defined(OS_WIN)
+#if !defined(OS_CHROMEOS)
if ((IsFrameless() || has_frame_color_) &&
chrome::GetHostDesktopTypeForNativeWindow(widget()->GetNativeWindow()) !=
chrome::HOST_DESKTOP_TYPE_ASH) {
« no previous file with comments | « no previous file | chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698