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 70482 - moving applets, icons, etc. in panel does not always work
moving applets, icons, etc. in panel does not always work
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: panel
1.5.x
Other Linux
: High normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
: 72626 74017 74995 76623 76926 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-02-04 09:49 UTC by Mirco Müller
Modified: 2015-03-24 13:00 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
Proposed patch (1.89 KB, patch)
2002-03-19 13:45 UTC, Shivram U
none Details | Review

Description Mirco Müller 2002-02-04 09:49:48 UTC
For some (e.g. volume-control) applets moving them around the panel with
the middle mouse button does not work.
Comment 1 Mark McLoughlin 2002-02-06 13:56:58 UTC
Okay, this is a known bug.

The problem is to do with press/release events getting across the
plug/socket boundary ... I put event forwarding into BonoboPlug/Socket
but that only seemed to half fix the problem.

This only happens with out of process applets.
Comment 2 Mirco Müller 2002-02-21 02:23:07 UTC
I found out something new today... btw I am using a full/fresh Gnome2
install from CVS (as of 19.02.2002). When I change the properties of a
launcher/icon in the panel via the context-menu "Properties..." and
hit "Close" in the properties-window afterwards the modified
launcher/icon cannot be moved anymore. Neither with the middle mouse
button nor with the move-command from the context-menu (because I
cannot "access"/"get hold of" the laucher/icon anymore). It is still
visible in teh panel but it is not clickable anymore. I have to move
other, still intact launchers/icons in the panel, around a bit to get
the modified launcher/icon accessable again. I hope my explaination is
making sense. Otherwise email me.
Comment 3 Gediminas Paulauskas 2002-02-26 19:16:00 UTC
*** Bug 72624 has been marked as a duplicate of this bug. ***
Comment 4 Gediminas Paulauskas 2002-02-26 19:19:06 UTC
*** Bug 72626 has been marked as a duplicate of this bug. ***
Comment 5 Luis Villa 2002-03-18 21:03:33 UTC
*** Bug 74995 has been marked as a duplicate of this bug. ***
Comment 6 Shivram U 2002-03-19 13:44:10 UTC
Ok the problem is with gdk_pointer_grab(). Since the applet is an out 
of process applet, on a button press the applet grabs the pointer. So 
in the panel when we try to grab the pointer XGrabPointer() call 
fails with return code AlreadyGrabbed. I am attaching a patch which 
does the following.
In bonobo-plug.c, where we forward the button press/release events 
(bonobo_plug_button_press), if ungrab_pointer flag (which has been 
added) is set then after the XSendEvent() XUngrabPointer() is called. 
This fixes the problem. An alternative could be that before we call 
gdk_pointer_grab() in panel-widget.c we check if the applet to be 
dragged is an out of process applet. If so we traverse down to the 
bonobo-socket which in turn sends a message to the bonobo-plug to 
ungrab the pointer the applet has grabbed. This approach may be 
cleaner because the ungrabbing the pointer by the applet is a 
requirement of the panel and not for the applets as such. However the 
patch i have uploaded would not cause any problem. If an app which 
contains the applets doesnt really require the ungrabbing feature a 
method can be added which sets the flag. Ofcourse if the flag is not 
needed and forward_events flags should suffice then the flag itself 
may be removed.
Comment 7 Shivram U 2002-03-19 13:45:23 UTC
Created attachment 7244 [details] [review]
Proposed patch
Comment 8 Shivram U 2002-03-19 13:46:18 UTC
The patch also fixes bug #74017
Comment 9 Luis Villa 2002-03-19 17:06:39 UTC
Shivram: please make sure to update the keywords in the future :) 
Comment 10 Mark McLoughlin 2002-03-21 15:31:51 UTC
*** Bug 74017 has been marked as a duplicate of this bug. ***
Comment 11 Kevin Vandersloot 2002-03-27 14:18:30 UTC
*** Bug 76623 has been marked as a duplicate of this bug. ***
Comment 12 Mark McLoughlin 2002-03-28 14:30:50 UTC
Shivram: thanks for looking into this. So its a pointer grab that's
causing the problem? Hmm, I need to think about this ...

About your patch, there's no need for that flag because it can never
be false and I don't think we should be just doing it for button2

Whether we should be doing it at all is another thing.

Removing the sun_patches keyword since we're not going to use that
patch
Comment 13 Kevin Vandersloot 2002-03-30 21:19:36 UTC
*** Bug 76926 has been marked as a duplicate of this bug. ***
Comment 14 Shivram U 2002-04-01 14:31:45 UTC
Oh the flag was only to indicate, the flexiblity that can be provided.
Without a function to actually set the flag the flag is absolutely 
useless. Ofcourse this is similar to the forward_events flags, which 
always true, i think. Hmmm i maybe wrong here. Is there someway when 
we can actually ask the applet to ungrab its pointer, just before we 
grab the pointer in the panel. Just a thought :-)
Comment 15 Mark McLoughlin 2002-04-02 09:31:01 UTC
Fixed in libbonoboui CVS