On Sun, 2008-02-10 at 17:11 -0400, William Lachance wrote:
> 
> On Sun, 2008-02-10 at 22:09 +1300, Matthew Paul Thomas wrote:
> > The panel could copy this behavior: Alt+dragging could move the
> > panel, 
> > while normal dragging does nothing. That way people would be much
> > less 
> > likely to move the panel by mistake.
> 
> FYI, I'm working on this solution (which is even better than anything
> suggested so far: thanks Matthew). Annoyingly, it seems as if I'll need
> to modify metacity in order to make this work. I'll keep everyone
> updated on my progress...

Ok, the two attached patches make it so you need to hold the ALT key
(actually mod1) down to move the panel. Some modification of metacity
was required, not yet sure if said modifications are in the appropriate
place (I'll try to get ahold of the metacity developers to see what they
think).

Things I'm still wondering about:
1. Metacity has a special gconf setting
(/apps/metacity/general/mouse_button_modifier) so that the user can
specify which key they'd like to use as a modifier for making just the
window move. Should gnome-panel respect this setting, even though it's
only supposed to apply to metacity?
2. In the spirit of removing modes, would it also be reasonable to
remove the "locked" mode on each panel applet... and make it so _they_
can only be moved with the mouse when the modifier key is pressed?
3. Am I asking these questions in the appropriate forum? As an
unaffiliated developer, I'd be just as happy to do this work upstream.
Unfortunately, there's no GNOME mailing list for panel issues that I
know of (and I don't get nearly the same level of feedback through
bugzilla).
4. Finally, I'll reiterate my original question: how _does_ one get a
patch into the Ubuntu gnome packages? ;)

-- 
William Lachance <[EMAIL PROTECTED]>
Index: src/core/display.c
===================================================================
--- src/core/display.c	(revision 3500)
+++ src/core/display.c	(working copy)
@@ -4900,8 +4900,11 @@
       while (tmp != NULL)
         {
           MetaWindow *w = tmp->data;
-          meta_display_grab_focus_window_button (display, w);
-          meta_display_grab_window_buttons (display, w->xwindow);
+          if (w->type != META_WINDOW_DOCK)
+            {
+              meta_display_grab_focus_window_button (display, w);
+              meta_display_grab_window_buttons (display, w->xwindow);
+            }
           tmp = tmp->next;
         }
 
Index: src/core/window.c
===================================================================
--- src/core/window.c	(revision 3500)
+++ src/core/window.c	(working copy)
@@ -646,8 +646,11 @@
     meta_window_ensure_frame (window);
 
   meta_window_grab_keys (window);
-  meta_display_grab_window_buttons (window->display, window->xwindow);
-  meta_display_grab_focus_window_button (window->display, window);
+  if (window->type != META_WINDOW_DOCK)
+    {
+      meta_display_grab_window_buttons (window->display, window->xwindow);
+      meta_display_grab_focus_window_button (window->display, window);
+    }
 
   if (window->type == META_WINDOW_DESKTOP ||
       window->type == META_WINDOW_DOCK)
Index: gnome-panel/panel-toplevel.c
===================================================================
--- gnome-panel/panel-toplevel.c	(revision 10713)
+++ gnome-panel/panel-toplevel.c	(working copy)
@@ -3179,6 +3179,9 @@
 
 	toplevel = PANEL_TOPLEVEL (widget);
 
+        if ((event->state & gtk_accelerator_get_default_mod_mask ()) != GDK_MOD1_MASK)
+            return FALSE;
+
 	if (event->button != 1 && event->button != 2)
 		return FALSE;
 

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
ubuntu-desktop mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop

Reply via email to