GNOME Bugzilla – Bug 123819
Panels move when moving applets
Last modified: 2004-12-22 21:47:04 UTC
When moving an applet from top panel to bottom panel and back, the bottom panel strangely moves to top, just below the top panel. Also happens when moving from bottom panel to up and back. Steps: 1. Drag and drop an applet with middle button from top panel to bottom panel 2. Drag and drop the same applet with middle button from bottom panel to top panel 3. Move mouse pointer 4. The bottom panel jumps to top of the screen Happens every time, with panel 2.4.0 built with garnome 0.27.1.
Could this be because the focus is given to panel after having moved the applet for the first time ?
Yes, the focus is given to the panel. But when I click on panel to focus it manually and then drag an applet, the panel doesn't move. And when moving an applet, the dragging shouldn't apply to the panel at the same time anyway. It makes no sense.
Jani: can you still reproduce? Can you try upgrading to gnome-panel 2.4.1 or HEAD? It works here and this might have been fixed as a consequence of another bugfix.
Vincent: It still happens on 2.5.1 :)
Created attachment 21885 [details] [review] Should fix the bug.
okay, i managed to break the middle button move of the panel with this patch :/
Created attachment 21888 [details] [review] one more try
Okay, this patch doesn't make sense either. A button2 press on an applet is supposed to make the applet move and a button2 press on a panel is supposed to make the panel move. Therefore, if you get a an applet gets a button2 press it should handle it by moving and not allow the event to be propogated. Otherwise the event goes up to the panel and the panel handles it. So, the only sensible place to stop the propogation of a button2 press is the place where you make it move the panel - i.e in panel_widget_applet_event(). Nowhere else makes sense. How exactly are you reproducing this ?
a) Have 2 panels (top and bottom) b) On the bottom panel have an applet (eg. mini-commander) c) use the middle button to drag it to the top panel. d) now drag it again from the top panel to the bottom panel Result: The top panel moves towards the bottom panel.
Okay, I've fixed this on HEAD. The problem was that the button_press handler was not the last in the chain and its return value was getting overidden by other handlers. 2003-12-16 Mark McLoughlin <mark@skynet.ie> Fix occassional problem where button 2 clicking on an applet caused both the applet and the panel to be moved. See bug #123819. * panel-widget.c: (panel_widget_applet_button_press_event), (panel_widget_applet_button_release_event), (panel_widget_applet_motion_notify_event), (panel_widget_applet_key_press_event): split these out from panel_widget_applet_event(). (bind_top_applet_events): make the button_press handler the last in the chain so we stop the propogation of the event.