diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-07 18:03:10 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-07 18:03:10 +0000 |
commit | f290f3e46ee27cf48b9b6dbc0f35c0d8af6d0c00 (patch) | |
tree | 8dae765dd58f43d8bf6237309f9c4be80729f0f0 /chrome/browser/gtk/browser_window_gtk.h | |
parent | b48ff00372fd5e1d384d8ce0addca715affc1ce7 (diff) | |
download | chromium_src-f290f3e46ee27cf48b9b6dbc0f35c0d8af6d0c00.zip chromium_src-f290f3e46ee27cf48b9b6dbc0f35c0d8af6d0c00.tar.gz chromium_src-f290f3e46ee27cf48b9b6dbc0f35c0d8af6d0c00.tar.bz2 |
Fix a bug where we don't maximize on titlebar double click in KWin.
GTK+ sends the following events on double click:
GDK_BUTTON_PRESS
GDK_BUTTON_RELEASE
GDK_BUTTON_PRESS
GDK_2BUTTON_PRESS
GDK_BUTTON_RELEASE
If we start a gtk_window_begin_move_drag on the second GDK_BUTTON_PRESS, the call to gtk_window_maximize fails. To work around this, we keep track of the last click and if it's going to be a double click, we don't call gtk_window_begin_move_drag.
BUG=18401
Review URL: http://codereview.chromium.org/165102
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22736 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/browser_window_gtk.h')
-rw-r--r-- | chrome/browser/gtk/browser_window_gtk.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.h b/chrome/browser/gtk/browser_window_gtk.h index acb1d66..c5e0ed3 100644 --- a/chrome/browser/gtk/browser_window_gtk.h +++ b/chrome/browser/gtk/browser_window_gtk.h @@ -352,6 +352,11 @@ class BrowserWindowGtk : public BrowserWindow, // this will always be true. bool is_active_; + // Keep track of the last click time and the last click position so we can + // filter out extra GDK_BUTTON_PRESS events when a double click happens. + guint32 last_click_time_; + gfx::Point last_click_position_; + DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk); }; |