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
This commit is contained in:
Cosimo Cecchi
2008-03-03 01:58:54 +00:00
committed by Thomas James Alexander Thurman
parent ac10c309ea
commit a8c3d1614f
8 changed files with 123 additions and 12 deletions

View File

@@ -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,