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

Side by Side Diff: chrome/browser/ui/gtk/browser_window_gtk.cc

Issue 7484035: Reapplies r91761. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/gtk/browser_window_gtk.h" 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include <dlfcn.h> 9 #include <dlfcn.h>
10 #include <string> 10 #include <string>
(...skipping 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after
2073 int win_x, win_y; 2073 int win_x, win_y;
2074 gdk_window_get_origin(GTK_WIDGET(window_)->window, &win_x, &win_y); 2074 gdk_window_get_origin(GTK_WIDGET(window_)->window, &win_x, &win_y);
2075 2075
2076 GdkWindowEdge edge; 2076 GdkWindowEdge edge;
2077 gfx::Point point(static_cast<int>(event->x_root - win_x), 2077 gfx::Point point(static_cast<int>(event->x_root - win_x),
2078 static_cast<int>(event->y_root - win_y)); 2078 static_cast<int>(event->y_root - win_y));
2079 bool has_hit_edge = GetWindowEdge(point.x(), point.y(), &edge); 2079 bool has_hit_edge = GetWindowEdge(point.x(), point.y(), &edge);
2080 2080
2081 // Ignore clicks that are in/below the browser toolbar. 2081 // Ignore clicks that are in/below the browser toolbar.
2082 GtkWidget* toolbar = toolbar_->widget(); 2082 GtkWidget* toolbar = toolbar_->widget();
2083 if (!GTK_WIDGET_VISIBLE(toolbar)) { 2083 if (!gtk_widget_get_visible(toolbar)) {
2084 // If the toolbar is not showing, use the location of web contents as the 2084 // If the toolbar is not showing, use the location of web contents as the
2085 // boundary of where to ignore clicks. 2085 // boundary of where to ignore clicks.
2086 toolbar = render_area_vbox_; 2086 toolbar = render_area_vbox_;
2087 } 2087 }
2088 gint toolbar_y; 2088 gint toolbar_y;
2089 gtk_widget_get_pointer(toolbar, NULL, &toolbar_y); 2089 gtk_widget_get_pointer(toolbar, NULL, &toolbar_y);
2090 bool has_hit_titlebar = !IsFullscreen() && (toolbar_y < 0) 2090 bool has_hit_titlebar = !IsFullscreen() && (toolbar_y < 0)
2091 && !has_hit_edge; 2091 && !has_hit_edge;
2092 if (event->button == 1) { 2092 if (event->button == 1) {
2093 if (GDK_BUTTON_PRESS == event->type) { 2093 if (GDK_BUTTON_PRESS == event->type) {
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
2361 // are taken from the WMs' source code. 2361 // are taken from the WMs' source code.
2362 return (wm_name == "Blackbox" || 2362 return (wm_name == "Blackbox" ||
2363 wm_name == "compiz" || 2363 wm_name == "compiz" ||
2364 wm_name == "Compiz" || 2364 wm_name == "Compiz" ||
2365 wm_name == "e16" || // Enlightenment DR16 2365 wm_name == "e16" || // Enlightenment DR16
2366 wm_name == "Metacity" || 2366 wm_name == "Metacity" ||
2367 wm_name == "Mutter" || 2367 wm_name == "Mutter" ||
2368 wm_name == "Openbox" || 2368 wm_name == "Openbox" ||
2369 wm_name == "Xfwm4"); 2369 wm_name == "Xfwm4");
2370 } 2370 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_toolbar_gtk.cc ('k') | chrome/browser/ui/gtk/crypto_module_password_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698