mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
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:
parent
750cb70f69
commit
a4fe1ad960
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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 "<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/begin_move</key>
|
||||
<applyto>/apps/metacity/window_keybindings/begin_move</applyto>
|
||||
|
@ -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 },
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user