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 569162 - Impossible to move the panel when the modifier is <Super>
Impossible to move the panel when the modifier is <Super>
Status: RESOLVED DUPLICATE of bug 624572
Product: gnome-panel
Classification: Other
Component: panel
git master
Other All
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-26 09:02 UTC by Eric Piel
Modified: 2010-07-18 10:14 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Eric Piel 2009-01-26 09:02:57 UTC
Please describe the problem:
Latest version of gnome-panel requires to hold the same modifier as metacity for moving the panel (instead of using the middle button). This works fine when <Ctrl> or <Alt> is selected, but with <Super>, it does not work (although it works fine for metacity.

I cannot move my panel anymore.

Steps to reproduce:
1. In gnome-window-properties, select "Super (Windows logo)" as the moving key
2. Try to move the panel while holding Super.

Actual results:
Nothing special

Expected results:
The panel moves

Does this happen every time?


Other information:
Comment 1 Robbert 2009-03-29 12:26:17 UTC
I can confirm this bug. 
Comment 2 Peter Giles 2009-08-07 15:48:55 UTC
I too can confirm this.

The reason it is a pain in the neck is that Super+click is the only combination that isn't needed by other apps I use all day long.  ctrl+click is pretty universally used for selecting multiple items in applications, and alt+click is needed by Eclipse Mylyn.

So my workaround: every time I log in, I open System->Preferences->Windows (okay, I put a shortcut on the panel so I don't have to dig into the menus) and set my movement key to alt, move my panels where I want them (they don't stick where I want 'em because of issues with multihead / nVidia's twinview), then set it back to super and close the "Windows" control.  Clunky ;-(
Comment 3 Robbert 2009-08-07 16:43:10 UTC
I've commented out the following lines in panel-toplevel.c (line 3239-3254 in version 2.26.0)

	/* Get the mouse-button modifier from metacity so that only intentional
	 * moves are considered. We don't this for non-expanded panels since we
	 * only have the handles that the user can grab. */
	if ((toplevel->priv->expand || toplevel->priv->attached) &&
	    (event->state & gtk_accelerator_get_default_mod_mask ()) != panel_bindings_get_mouse_button_modifier_keymask ())
		return FALSE;

This disables the requirement for having to press the 'moving key'. I think the cause of the bug also lies in these few lines code, but I can't quite figure it out at this time.
Comment 4 sammy 2009-09-30 20:47:59 UTC
Hi,

Is anyone looking at this?? I realize that may not be the most critical problem, but it's still very annoying.
I didn't want to disable modifier key so I tried to have a look at the code. I found out that the following code:

	if (toplevel->priv->expand)
		g_message("expand is true");
	if (toplevel->priv->attached)
		g_message("attached is true");


	g_message("event-state: %d", event->state);
	g_message("gtk_accelerator_get_default_mod_mask: %d", gtk_accelerator_get_default_mod_mask());
	g_message("panel_bindings_get_mouse_button_modifier_keymask: %d", panel_bindings_get_mouse_button_modifier_keymask ());

	/* Get the mouse-button modifier from metacity so that only intentional
	 * moves are considered. We don't this for non-expanded panels since we
	 * only have the handles that the user can grab.*/
	if ((toplevel->priv->expand || toplevel->priv->attached) &&
	    (event->state & gtk_accelerator_get_default_mod_mask ()) != panel_bindings_get_mouse_button_modifier_keymask ()) 
		return FALSE;


results in this for Super:
** Message: expand is true
** Message: event-state: 80
** Message: gtk_accelerator_get_default_mod_mask: 469762061
** Message: panel_bindings_get_mouse_button_modifier_keymask: 67108864

and this for Alt:
** Message: expand is true
** Message: event-state: 24
** Message: gtk_accelerator_get_default_mod_mask: 469762061
** Message: panel_bindings_get_mouse_button_modifier_keymask: 8


So my conclusions are that gtk_accelerator_get_default_mod_mask () always returns 469762061 (0001 1100 000 000 000 000 000 1101) and that Super key is equal to event-state 80 (0101 0000). A logical AND between them is of course 0 and the function will return false => no movement.
Does any one know why event state is 80 and if that could be incorrect? Is there any conversion between X keys and gdk?
Comment 5 Christian Thalinger 2010-02-17 07:52:57 UTC
I wonder if this one will ever be fixed...
Comment 6 sammy 2010-02-17 09:49:39 UTC
This issue was fixed after upgrading to Ubuntu 9.10 with gnome 2.28
Comment 7 Robbert 2010-02-17 10:00:46 UTC
It still doesn't work for <super> on my Ubuntu 9.10 installation with Gnome 2.28.1. It does works fine however with <Ctrl> and <Alt>, but it worked that way as well in the original bug report.
Comment 8 sammy 2010-02-17 11:23:03 UTC
That's strange. I thought that when I installed 9.10 all the gnome files where replaced with new ones. But maybe I kept my modified gnome-panel.
Comment 9 Christian Thalinger 2010-02-17 11:25:07 UTC
I'm on 2.28.2 and still have this problem.
Comment 10 Vincent Untz 2010-02-19 13:51:38 UTC
Is this happening with both compiz and metacity? Or just one of them?
Comment 11 Robbert 2010-02-20 11:14:04 UTC
It is happening with both Compiz and Metacity here.
Comment 12 Christian Thalinger 2010-02-20 12:13:30 UTC
(In reply to comment #11)
> It is happening with both Compiz and Metacity here.

Same for me.
Comment 13 Christian Thalinger 2010-05-10 06:58:25 UTC
Any news on that one?
Comment 14 Vincent Untz 2010-07-18 10:14:16 UTC
There's a patch in bug 624572.

*** This bug has been marked as a duplicate of bug 624572 ***