diff options
author | Cosimo Cecchi <anarki@lilik.it> | 2008-03-03 01:58:54 +0000 |
---|---|---|
committer | Thomas James Alexander Thurman <tthurman@src.gnome.org> | 2008-03-03 01:58:54 +0000 |
commit | a8c3d1614f91d02271c9dc9f03309ee27405bd0a (patch) | |
tree | ffb318d6c21cb76d9326aed6c6d4f395d09af835 /src/ui | |
parent | ac10c309ea7925ed58a3c722e876995dec256584 (diff) | |
download | metacity-a8c3d1614f91d02271c9dc9f03309ee27405bd0a.tar.gz |
Add ability to vertically and horizontally maximise using the mouse, by
2008-03-03 Cosimo Cecchi <anarki@lilik.it>
Add ability to vertically and horizontally maximise
using the mouse, by clicking the titlebar in various
ways. A very similar patch was received from Jason Ribero.
Thanks also go to Tony Houghton and Carlo Wood, who
both submitted patches which solved this differently.
Closes #358674.
* src/include/common.h (MetaActionTitlebar): new values
for the new actions
* src/core/core.c (meta_core_maximize_{vertic|horizont}ally):
new functions.
* src/ui/frames.c (meta_frame_titlebar_event): handle the
new action values
* src/core/window.h: new macros (for regularity, not really
necessary)
* src/core/prefs.c (symtab_titlebar_action): new string
representations of the action values
* src/metacity.schemas.in: documentation
svn path=/trunk/; revision=3619
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/frames.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ui/frames.c b/src/ui/frames.c index ef7e0099..093af921 100644 --- a/src/ui/frames.c +++ b/src/ui/frames.c @@ -1249,6 +1249,32 @@ meta_frame_titlebar_event (MetaUIFrame *frame, } break; + case META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_HORIZONTALLY: + { + meta_core_get (gdk_display, frame->xwindow, + META_CORE_GET_FRAME_FLAGS, &flags, + META_CORE_GET_END); + + if (flags & META_FRAME_ALLOWS_MAXIMIZE) + { + meta_core_toggle_maximize_horizontally (gdk_display, frame->xwindow); + } + } + break; + + case META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_VERTICALLY: + { + meta_core_get (gdk_display, frame->xwindow, + META_CORE_GET_FRAME_FLAGS, &flags, + META_CORE_GET_END); + + if (flags & META_FRAME_ALLOWS_MAXIMIZE) + { + meta_core_toggle_maximize_vertically (gdk_display, frame->xwindow); + } + } + break; + case META_ACTION_TITLEBAR_MINIMIZE: { meta_core_get (gdk_display, frame->xwindow, |