After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 594066 - Allow a window manager to inherit keybindings from another window manager
Allow a window manager to inherit keybindings from another window manager
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] Keybinding
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks: 594067
 
 
Reported: 2009-09-03 18:43 UTC by Owen Taylor
Modified: 2009-10-29 12:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow a window manager to inherit keybindings from another window manager (7.26 KB, patch)
2009-09-03 18:43 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2009-09-03 18:43:25 UTC
Note on patch: this was developed and tested against GNOME 2.26 and
then rebase to master. (My gnome-shell test system is still running
2.26 waiting for some video driver fixes in Fedora Rawhide.) There
were some trivial conflicts related to the GladeXML => GtkBuilder
conversion, so it does need to be checked to make sure it compiles.
Comment 1 Owen Taylor 2009-09-03 18:43:26 UTC
Created attachment 142432 [details] [review]
Allow a window manager to inherit keybindings from another window manager

Mutter shares most (currently all) its keybindings with Metacity, and uses
the same /apps/metacity GConf keys. For 2.28, the schemas stay in Metacity;
the eventual plan is to have a gnome-wm-data package.

This patch allows a window manager to put a _GNOME_WM_KEYBINDINGS property
on its _NET_SUPPORTING_WM_CHECK window to provide a comma separated list of
window manager names to use for keybinding lookup instead of _NET_WM_NAME.
Comment 2 Owen Taylor 2009-09-03 19:06:01 UTC
See bug 594067 for the Mutter part of this and a note about why the same treatment isn't needed for gnome-window-properties.
Comment 3 Jens Granseuer 2009-09-04 11:13:09 UTC
Not sure if it's a really problem, but the old code seems to be very careful about trapping all X calls while the patch doesn't.
Comment 4 Owen Taylor 2009-09-04 15:01:38 UTC
(In reply to comment #3)
> Not sure if it's a really problem, but the old code seems to be very careful
> about trapping all X calls while the patch doesn't.

I don't see that - I factored the internals of:

 wm_common_get_current_window_manager()

into a new function:

 wm_common_get_window_manager_property()

The new function inherits all of the (necessary) error trapping of the old code.

And then my code just calls that twice.
Comment 5 Matthias Clasen 2009-09-04 16:44:53 UTC
I notice 

+  result = wm_common_get_window_manager_property (atom);
+  if (result)
+    return result;
+  else
+    return g_strdup (WM_COMMON_UNKNOWN);

But  I don't see the corresponding code in wm_common_get_current_window_manager being removed ?


Other than that, patch looks fine to me. As Owen says, all the error trapping is still there.
Comment 6 Owen Taylor 2009-09-12 18:21:04 UTC
Forgot about for this for a little bit; now pushed, with the fix that Matthias
pointed out. (Thanks!)

Attachment 142432 [details] pushed as a01e8da - Allow a window manager to inherit keybindings from another window manager
Comment 7 Bastien Nocera 2009-10-29 12:20:30 UTC
FWIW, that code was broken.

You check for keybindings being NULL in wm-common, but it's never NULL, but set to "Unknown" when the property couldn't be gotten to. See bug 600021.