Don't like ads? PRO users don't see any ads ;-)
Guest

restore_panel_drag.patch

By: a guest on Oct 20th, 2012  |  syntax: Diff  |  size: 1.80 KB  |  hits: 87  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Description: Restore panel dragging
  2.  In Gnome 2 the user could drag a panel to any edge of the screen.
  3.  In Gnome 3's panel the user must use a modifier (i.e. alt) in
  4.  combination with the mouse button (LMB) to drag the panel.
  5.  This patch reverts the behaviour allowing dragging by use of the
  6.  mouse alone
  7.  .
  8.  gnome-panel (3.4.1-3solusos1) two; urgency=low
  9.  .
  10.    * New patch for panel dragging
  11. Author: Ikey Doherty <ikey@solusos.com>
  12.  
  13. ---
  14. Reviewed-By: Ikey Doherty <ikey@solusos.com>
  15. Last-Update: <2012-05-27>
  16.  
  17. --- gnome-panel-3.4.1.orig/gnome-panel/panel-toplevel.c
  18. +++ gnome-panel-3.4.1/gnome-panel/panel-toplevel.c
  19. @@ -2940,7 +2940,6 @@ panel_toplevel_button_press_event (GtkWi
  20.                                    GdkEventButton *event)
  21.  {
  22.         PanelToplevel *toplevel;
  23. -       guint          modifiers;
  24.         GtkWidget     *event_widget;
  25.  
  26.         g_return_val_if_fail (PANEL_IS_TOPLEVEL (widget), FALSE);
  27. @@ -2953,13 +2952,14 @@ panel_toplevel_button_press_event (GtkWi
  28.         if (toplevel->priv->animating)
  29.                 return FALSE;
  30.  
  31. -       modifiers = event->state & gtk_accelerator_get_default_mod_mask ();
  32. -
  33. -       /* Get the mouse-button modifier from metacity so that only intentional
  34. -        * moves are considered. We don't this for non-expanded panels since we
  35. -        * only have the handles that the user can grab. */
  36. -       if (toplevel->priv->expand &&
  37. -           modifiers != panel_bindings_get_mouse_button_modifier_keymask ())
  38. +       /**
  39. +        * Check if the toplevel (panel) is expanded or not. If it's not, we should bail.
  40. +        * Otherwise we end up dragging a panel up and down the screen and breaks all kinds
  41. +        * of stuff.
  42. +        * HACKED: I took out the modifier stuff so that you don't need to use a key combo
  43. +        * to drag the toplevel (panel)
  44. +        */
  45. +       if (toplevel->priv->expand != TRUE)
  46.                 return FALSE;
  47.  
  48.         gdk_window_get_user_data (event->window, (gpointer)&event_widget);