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 123819 - Panels move when moving applets
Panels move when moving applets
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: general
2.4.x
Other Linux
: High normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-10-04 09:07 UTC by Jani Alinikula
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Should fix the bug. (1.57 KB, patch)
2003-11-28 09:54 UTC, Arvind S N
none Details | Review
one more try (1.29 KB, patch)
2003-11-28 10:45 UTC, Arvind S N
none Details | Review

Description Jani Alinikula 2003-10-04 09:07:13 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.
Comment 1 Vincent Untz 2003-10-09 12:53:42 UTC
Could this be because the focus is given to panel after having moved
the applet for the first time ?
Comment 2 Jani Alinikula 2003-10-11 06:32:47 UTC
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.
Comment 3 Vincent Untz 2003-11-14 16:09:24 UTC
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.
Comment 4 Arvind S N 2003-11-14 17:01:50 UTC
Vincent: It still happens on 2.5.1 :)
Comment 5 Arvind S N 2003-11-28 09:54:18 UTC
Created attachment 21885 [details] [review]
Should fix the bug.
Comment 6 Arvind S N 2003-11-28 10:05:10 UTC
okay, i managed to break the middle button move of the panel with this
patch :/
Comment 7 Arvind S N 2003-11-28 10:45:04 UTC
Created attachment 21888 [details] [review]
one more try
Comment 8 Mark McLoughlin 2003-12-04 15:17:02 UTC
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 ?
Comment 9 Arvind S N 2003-12-16 12:09:46 UTC
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.
Comment 10 Mark McLoughlin 2003-12-16 13:25:34 UTC
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.