add minimize window binding

2002-05-24  Havoc Pennington  <hp@pobox.com>

	* src/metacity.schemas: add minimize window binding

	* src/keybindings.c (handle_minimize_window): add minimize keybinding
This commit is contained in:
Havoc Pennington 2002-05-25 02:30:00 +00:00 committed by Havoc Pennington
parent 750cb70f69
commit a4fe1ad960
5 changed files with 44 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2002-05-24 Havoc Pennington <hp@pobox.com>
* src/metacity.schemas: add minimize window binding
* src/keybindings.c (handle_minimize_window): add minimize keybinding
2002-05-24 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_show): change how focusing windows

View File

@ -74,6 +74,10 @@ static void handle_close_window (MetaDisplay *display,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding);
static void handle_minimize_window (MetaDisplay *display,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding);
static void handle_begin_move (MetaDisplay *display,
MetaWindow *window,
XEvent *event,
@ -177,6 +181,7 @@ static const MetaKeyHandler window_handlers[] = {
{ META_KEYBINDING_TOGGLE_MAXIMIZE, handle_toggle_maximize, NULL },
{ META_KEYBINDING_TOGGLE_SHADE, handle_toggle_shade, NULL },
{ META_KEYBINDING_CLOSE, handle_close_window, NULL },
{ META_KEYBINDING_MINIMIZE, handle_minimize_window, NULL },
{ META_KEYBINDING_BEGIN_MOVE, handle_begin_move, },
{ META_KEYBINDING_BEGIN_RESIZE, handle_begin_resize, },
{ META_KEYBINDING_TOGGLE_STICKY, handle_toggle_sticky, },
@ -1603,6 +1608,16 @@ handle_close_window (MetaDisplay *display,
meta_window_delete (window, event->xkey.time);
}
static void
handle_minimize_window (MetaDisplay *display,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding)
{
if (window)
meta_window_minimize (window);
}
static void
handle_begin_move (MetaDisplay *display,
MetaWindow *window,

View File

@ -229,6 +229,27 @@ you set
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/window_keybindings/minimize</key>
<applyto>/apps/metacity/window_keybindings/minimize</applyto>
<owner>metacity</owner>
<type>string</type>
<default>disabled</default>
<locale name="C">
<short>Minimize a window</short>
<long>
The keybinding used to minimize a window.
The format looks like "&lt;Control&gt;a" or "&lt;Shift&gt;&lt;Alt&gt;F1.
The parser is
fairly liberal and allows lower or upper case, and also
abbreviations such as "&lt;Ctl&gt;" and "&lt;Ctrl&gt;". 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/begin_move</key>
<applyto>/apps/metacity/window_keybindings/begin_move</applyto>

View File

@ -829,6 +829,7 @@ static MetaKeyPref window_bindings[] = {
{ META_KEYBINDING_TOGGLE_FULLSCREEN, 0, 0 },
{ META_KEYBINDING_TOGGLE_MAXIMIZE, 0, 0 },
{ META_KEYBINDING_TOGGLE_SHADE, 0, 0 },
{ META_KEYBINDING_MINIMIZE, 0, 0 },
{ META_KEYBINDING_CLOSE, 0, 0 },
{ META_KEYBINDING_BEGIN_MOVE, 0, 0 },
{ META_KEYBINDING_BEGIN_RESIZE, 0, 0 },

View File

@ -90,6 +90,7 @@ void meta_prefs_set_num_workspaces (int n_workspaces);
#define META_KEYBINDING_TOGGLE_FULLSCREEN "toggle_fullscreen"
#define META_KEYBINDING_TOGGLE_MAXIMIZE "toggle_maximized"
#define META_KEYBINDING_TOGGLE_SHADE "toggle_shaded"
#define META_KEYBINDING_MINIMIZE "minimize"
#define META_KEYBINDING_CLOSE "close"
#define META_KEYBINDING_BEGIN_MOVE "begin_move"
#define META_KEYBINDING_BEGIN_RESIZE "begin_resize"