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

Unified Diff: chrome/browser/gtk/browser_window_gtk.cc

Issue 246029: Linux: Raise window after click on titlebar or border. (Closed)
Patch Set: only raise after click on titlebar or border Created 11 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_window_gtk.cc
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index 176eb98b665057aa54f449a4a06df1dc377f2c8b..b61782916ac586ca7cc030981fe2e4c6f7d998da 100644
--- a/chrome/browser/gtk/browser_window_gtk.cc
+++ b/chrome/browser/gtk/browser_window_gtk.cc
@@ -1975,6 +1975,11 @@ gboolean BrowserWindowGtk::OnButtonPressEvent(GtkWidget* widget,
browser->last_click_position_ = gfx::Point(static_cast<int>(event->x),
static_cast<int>(event->y));
+ // Raise the window after a click on either the titlebar or the border to
+ // match the behavior of most window managers.
+ if (has_hit_titlebar || has_hit_edge)
+ gdk_window_raise(GTK_WIDGET(browser->window_)->window);
+
if (has_hit_titlebar) {
// We want to start a move when the user single clicks, but not start a
// move when the user double clicks. However, a double click sends the
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698