diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-01 00:35:16 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-01 00:35:16 +0000 |
commit | bc10d9d99a26a7da6df8e359604bae90fa772e44 (patch) | |
tree | 8fd4c70adf1a85d669b0eab4f47679b4c7cb2935 /chrome/common/gtk_util.h | |
parent | 47a4216e91764c7284582112408626ccaf8d9583 (diff) | |
download | chromium_src-bc10d9d99a26a7da6df8e359604bae90fa772e44.zip chromium_src-bc10d9d99a26a7da6df8e359604bae90fa772e44.tar.gz chromium_src-bc10d9d99a26a7da6df8e359604bae90fa772e44.tar.bz2 |
GTK: add middle click and right click functionality to maximize button.
If the user right clicks on the maximize button, it will horizontally maximize the window, and if the user middle clicks on the maximize button it will vertically maximize the window.
At least on kde, the window manager supports more complicated behavior, e.g. right clicking on a window that is horizontally maximized will return it to its former size. It seems to keep track of multiple restored rects. However, we're not well equipped to replicate this behavior, so I just didn't add it. If the user wants it, they can disable the custom frame.
BUG=28881
Review URL: http://codereview.chromium.org/455012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33389 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/gtk_util.h')
-rw-r--r-- | chrome/common/gtk_util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/common/gtk_util.h b/chrome/common/gtk_util.h index 384ac1f..7c10ce3 100644 --- a/chrome/common/gtk_util.h +++ b/chrome/common/gtk_util.h @@ -116,6 +116,11 @@ bool IsScreenComposited(); // Enumerates the top-level gdk windows of the current display. void EnumerateTopLevelWindows(x11_util::EnumerateWindowsDelegate* delegate); +// Set that clicking the button with the given mouse buttons will cause a click +// event. +void SetButtonClickableByMouseButtons(GtkWidget* button, + bool left, bool middle, bool right); + // Set that a button causes a page navigation. In particular, it will accept // middle clicks. Warning: only call this *after* you have connected your // own handlers for button-press and button-release events, or you will not get |