mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
add maximize and unmaximize keybinding setting. Partly fixes bug# 78999.
2002-08-21 Deepa Natarajan <deepa.natarajan@wipro.com> * src/keybindings.c, src/metacity.schemas.in, src/prefs.[ch]: add maximize and unmaximize keybinding setting. Partly fixes bug# 78999.
This commit is contained in:
parent
0ac034ad4c
commit
c39a03ad59
@ -1,3 +1,9 @@
|
||||
2002-08-21 Deepa Natarajan <deepa.natarajan@wipro.com>
|
||||
|
||||
* src/keybindings.c, src/metacity.schemas.in, src/prefs.[ch]:
|
||||
add maximize and unmaximize keybinding setting. Partly fixes
|
||||
bug# 78999.
|
||||
|
||||
2002-08-20 Steve Fox <drfickle@k-lug.org>
|
||||
|
||||
* metacity.spec.in: Add so that the spec file gets auto-updated
|
||||
|
@ -66,6 +66,14 @@ static void handle_toggle_maximize (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding);
|
||||
static void handle_maximize (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding);
|
||||
static void handle_unmaximize (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding);
|
||||
static void handle_toggle_shade (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
@ -233,6 +241,8 @@ static const MetaKeyHandler window_handlers[] = {
|
||||
{ META_KEYBINDING_WINDOW_MENU, handle_activate_menu, NULL },
|
||||
{ META_KEYBINDING_TOGGLE_FULLSCREEN, handle_toggle_fullscreen, NULL },
|
||||
{ META_KEYBINDING_TOGGLE_MAXIMIZE, handle_toggle_maximize, NULL },
|
||||
{ META_KEYBINDING_MAXIMIZE, handle_maximize, NULL },
|
||||
{ META_KEYBINDING_UNMAXIMIZE, handle_unmaximize, NULL },
|
||||
{ META_KEYBINDING_TOGGLE_SHADE, handle_toggle_shade, NULL },
|
||||
{ META_KEYBINDING_CLOSE, handle_close_window, NULL },
|
||||
{ META_KEYBINDING_MINIMIZE, handle_minimize_window, NULL },
|
||||
@ -2445,6 +2455,32 @@ handle_toggle_maximize (MetaDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_maximize (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
if (window)
|
||||
{
|
||||
if (window->has_maximize_func)
|
||||
meta_window_maximize (window);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_unmaximize (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
if (window)
|
||||
{
|
||||
if (window->maximized)
|
||||
meta_window_unmaximize (window);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_toggle_shade (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
|
@ -187,6 +187,46 @@ you set
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/window_keybindings/maximize</key>
|
||||
<applyto>/apps/metacity/window_keybindings/maximize</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<default><Alt>F10</default>
|
||||
<locale name="C">
|
||||
<short>Maximize a window</short>
|
||||
<long>
|
||||
The keybinding used to maximize a window
|
||||
The format looks like "<Control>a" or "<Shift><Alt>F1.
|
||||
The parser is
|
||||
fairly liberal and allows lower or upper case, and also
|
||||
abbreviations such as "<Ctl>" and "<Ctrl>". If you set
|
||||
the option to the special string "disabled", then there
|
||||
will be no keybinding for this action.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/window_keybindings/unmaximize</key>
|
||||
<applyto>/apps/metacity/window_keybindings/unmaximize</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<default><Alt>F5</default>
|
||||
<locale name="C">
|
||||
<short>Unmaximize a window</short>
|
||||
<long>
|
||||
The keybinding used to unmaximize a window.
|
||||
The format looks like "<Control>a" or "<Shift><Alt>F1.
|
||||
The parser is
|
||||
fairly liberal and allows lower or upper case, and also
|
||||
abbreviations such as "<Ctl>" and "<Ctrl>". If you set
|
||||
the option to the special string "disabled", then there
|
||||
will be no keybinding for this action.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/window_keybindings/toggle_shaded</key>
|
||||
<applyto>/apps/metacity/window_keybindings/toggle_shaded</applyto>
|
||||
|
@ -874,6 +874,8 @@ static MetaKeyPref window_bindings[] = {
|
||||
{ META_KEYBINDING_WINDOW_MENU, 0, 0 },
|
||||
{ META_KEYBINDING_TOGGLE_FULLSCREEN, 0, 0 },
|
||||
{ META_KEYBINDING_TOGGLE_MAXIMIZE, 0, 0 },
|
||||
{ META_KEYBINDING_MAXIMIZE, 0, 0 },
|
||||
{ META_KEYBINDING_UNMAXIMIZE, 0, 0 },
|
||||
{ META_KEYBINDING_TOGGLE_SHADE, 0, 0 },
|
||||
{ META_KEYBINDING_MINIMIZE, 0, 0 },
|
||||
{ META_KEYBINDING_CLOSE, 0, 0 },
|
||||
|
@ -107,6 +107,8 @@ void meta_prefs_set_num_workspaces (int n_workspaces);
|
||||
#define META_KEYBINDING_WINDOW_MENU "activate_window_menu"
|
||||
#define META_KEYBINDING_TOGGLE_FULLSCREEN "toggle_fullscreen"
|
||||
#define META_KEYBINDING_TOGGLE_MAXIMIZE "toggle_maximized"
|
||||
#define META_KEYBINDING_MAXIMIZE "maximize"
|
||||
#define META_KEYBINDING_UNMAXIMIZE "unmaximize"
|
||||
#define META_KEYBINDING_TOGGLE_SHADE "toggle_shaded"
|
||||
#define META_KEYBINDING_MINIMIZE "minimize"
|
||||
#define META_KEYBINDING_CLOSE "close"
|
||||
|
Loading…
Reference in New Issue
Block a user