Toplevel keybindings
- From: Mark McLoughlin <mark skynet ie>
- To: desktop-devel-list gnome org
- Subject: Toplevel keybindings
- Date: 07 Feb 2003 14:35:22 +1300
Hi,
The new toplevel widget currently binds some of metacity's
window keybindings to similar functions on the panel.
+ activate_window_menu: popup the panel context menu. Same
thing as Ctrl-F10.
+ toggle_maximized: toggle between expanded/un-expanded.
+ maximize: expand the panel.
+ unmaximize: un-expand the panel.
+ toggle_shaded: toggle the panel between hidden/un-hidden. If
you have autohide enabled this does autohiding type
behaviour, otherwise its does hiding in a similar way to
doing it with the hide buttons.
+ begin_move:
+ begin_resize: move/resize the panel in similar ways to the
way you can move/resize windows using the keyboard with
metacity.
So there's a few questions about this:
1) Does it make sense to overload the window keybindings with
similar functions on panels. It may lead to user confusion,
but I think it will just make learning the panel bindings
easier and also free us of the burden of coming up with new
key sequences for these operations.
2) Are the activate_window_menu and toggle_shaded bindings
similar enough to popping up the context menu and hiding
the panel similar enough to warrant the overloading. I
think the others definetly make sense.
3) Are there any other operations which would benefit from
keybindings like this. They don't neccessarily need to have
equivalent ones in metacity.
4) We're tying ourselves closely here to metacity. Maybe we
should only do this if metacity is running (this is what
the keybindings dialog does).
To test this out with the "new-toplevel" branch you need the
attached patch for metacity.
Cheers,
Mark.
Index: keybindings.c
===================================================================
RCS file: /cvs/gnome/metacity/src/keybindings.c,v
retrieving revision 1.76
diff -u -p -r1.76 keybindings.c
--- keybindings.c 21 Jan 2003 22:40:25 -0000 1.76
+++ keybindings.c 6 Feb 2003 23:42:23 -0000
@@ -1017,6 +1017,14 @@ meta_window_grab_keys (MetaWindow *wind
{
if (window->all_keys_grabbed)
return;
+
+ if (window->type == META_WINDOW_DOCK)
+ {
+ if (window->keys_grabbed)
+ ungrab_all_keys (window->display, window->xwindow);
+ window->keys_grabbed = FALSE;
+ return;
+ }
if (window->keys_grabbed)
{
Index: window.c
===================================================================
RCS file: /cvs/gnome/metacity/src/window.c,v
retrieving revision 1.264
diff -u -p -r1.264 window.c
--- window.c 25 Jan 2003 16:58:43 -0000 1.264
+++ window.c 6 Feb 2003 23:42:52 -0000
@@ -5366,6 +5366,8 @@ recalc_window_type (MetaWindow *window)
/* update stacking constraints */
meta_window_update_layer (window);
+
+ meta_window_grab_keys (window);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]