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 108166 - Menu panel switches to drag'n'drop
Menu panel switches to drag'n'drop
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
2.2.x
Other Linux
: Normal normal
: Medium fix
Assigned To: gtk-bugs
gtk-bugs
: 124599 134917 172630 173131 313565 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-03-12 07:22 UTC by xavier.bestel
Modified: 2014-03-24 02:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description xavier.bestel 2003-03-12 07:22:40 UTC
Sometimes, when using the menu of the menu panel, the menu switches to
"drag and drop mode", i.e. instead of highlighting the current item, the
cursor has a cross shape and drags something.

How to reproduce: click on the "Applications" menu with the left mouse
button, and never release it.
Open a big submenu (I'm using the "Internet" submenu) and wander up and
down in the submenu a few times (still without releasing the left mouse
button). Eventually the menu will switch to "drag and drop" mode.

This bug has been observed in all 2.x releases.
Comment 1 Owen Taylor 2003-03-12 13:07:36 UTC
Are your sure your mouse isn't generating some release/press
events while you have it held?
Comment 2 Soren Sandmann Pedersen 2003-03-12 15:07:16 UTC
If it is, then my mouse is too. I am seeing this with a Microsoft
mouse, and I _think_ I saw it with the Logitec mouse I used before. I
have never been able to reproduce it reliably, though.
Comment 3 xavier.bestel 2003-03-13 16:55:26 UTC
At first I thought it was my mouse. Then I changed it for a new one.
Now I'm pretty sure it's not.
Comment 4 Owen Taylor 2003-05-19 23:20:51 UTC
If someone can reproduce, the way to debug would be to 
put a break in gtk_drag_begin() and see why it gets triggered.
Comment 5 xavier.bestel 2003-05-29 16:47:33 UTC


  • #0 gtk_drag_begin
    from /usr/lib/libgtk-x11-2.0.so.0
  • #1 _gtk_drag_source_handle_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #2 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #3 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #4 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #6 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #7 gtk_widget_send_expose
    from /usr/lib/libgtk-x11-2.0.so.0
  • #8 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #9 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #10 _gdk_events_queue
    from /usr/lib/libgdk-x11-2.0.so.0
  • #11 g_get_current_time
    from /usr/lib/libglib-2.0.so.0
  • #12 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #13 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #14 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #15 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #16 main
  • #17 __libc_start_main
    from /lib/libc.so.6

Comment 6 Elijah Newren 2003-06-16 16:47:39 UTC
Bug 115263 (and its duplicates) may be a duplicate of this bug, but
I'm not sure.
Comment 7 Soren Sandmann Pedersen 2003-08-25 03:12:07 UTC
- If this was the mouse generating spurious press/release events
  you would generally expect to see random activations of menu items,
  not drags.

- The backtrace doesn't make sense to me. 

  _gdk_drag_source_handle_event() doesn't call gdk_drag_begin().
  Is this a case of libtool removing the wrong symbols?

  Xavier, if you compiled gtk+ yourself, could you try re-generating
  the backtrace with the line

     LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'

  in gtk+'s configure.in changed to

     LIBTOOL_EXPORT_OPTIONS=#'-export-symbols-regex "^[[^_]].*"'

  ?
Comment 8 Soren Sandmann Pedersen 2003-09-09 12:48:12 UTC
Reproduction instructions:

Click on "Applications"
Click on "Help"
[Close the resulting help viewer]
Press and hold on "Applications"
Drag down to help.

The panel will switch to drag mode.
Comment 9 Soren Sandmann Pedersen 2003-09-09 12:49:19 UTC
Backtrace:

  • #0 gtk_drag_begin_internal
    at gtkdnd.c line 1838
  • #1 gtk_drag_source_event_cb
    at gtkdnd.c line 2943
  • #2 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 82
  • #3 g_closure_invoke
    at gclosure.c line 437
  • #4 signal_emit_unlocked_R
    at gsignal.c line 2466
  • #5 g_signal_emit_valist
    at gsignal.c line 2235
  • #6 g_signal_emit
    at gsignal.c line 2269
  • #7 gtk_widget_event_internal
    at gtkwidget.c line 3518
  • #8 gtk_propagate_event
    at gtkmain.c line 2268
  • #9 gtk_main_do_event
    at gtkmain.c line 1503
  • #10 gdk_event_dispatch
  • #11 g_main_dispatch
    at gmain.c line 1746
  • #12 g_main_context_dispatch
    at gmain.c line 2294
  • #13 g_main_context_iterate
    at gmain.c line 2375
  • #14 g_main_loop_run
    at gmain.c line 2595
  • #15 gtk_main
    at gtkmain.c line 1093
  • #16 main
  • #17 __libc_start_main
    from /lib/tls/libc.so.6

Comment 10 Soren Sandmann Pedersen 2003-09-09 12:50:12 UTC
Additional information:

(gdb) print event->type
$12 = GDK_MOTION_NOTIFY


(gdb) print *site
$14 = {start_button_mask = 768, target_list = 0x82b06c8,
  actions = GDK_ACTION_COPY, icon_type = GTK_IMAGE_EMPTY, icon_data = {
    pixmap = {pixmap = 0x0}, pixbuf = {pixbuf = 0x0}, stock = {
      stock_id = 0x0}}, icon_mask = 0x0, colormap = 0x0, state = 0, x
= 143,
  y = 16}


(gdb) print event->motion
$15 = {type = GDK_MOTION_NOTIFY, window = 0x82be9d0, send_event = 0 '\0',
  time = 5392983, x = 39, y = 7, axes = 0x0, state = 256, is_hint = 0,
  device = 0x80da600, x_root = 444, y_root = 534}


(gdb) print *widget
$16 = {object = {parent_instance = {g_type_instance = {g_class =
0x8170420},
      ref_count = 6, qdata = 0x82b1b58}, flags = 2164704},
  private_flags = 3600, state = 2 '\002', saved_state = 0 '\0', name =
0x0,
  style = 0x81da940, requisition = {width = 73, height = 20},
allocation = {
    x = 0, y = 440, width = 222, height = 20}, window = 0x82b4de0,
  parent = 0x82a2250}
Comment 11 Soren Sandmann Pedersen 2003-09-09 12:58:00 UTC
Note the difference between the x,y in event->motion and the x,y in
site. 

The problem is that clicking on a menu item generates a press event, 
but no corresponding release event. This means that site->state
doesn't get properly reset by the code in the BUTTON_RELEASE branch
of the switch in gtk_drag_source_event_cb().

So the problem is probably somewhere in the menu event code. (Why do
I have this feeling of deja vu?)
Comment 12 Owen Taylor 2003-10-17 14:00:58 UTC
*** Bug 124599 has been marked as a duplicate of this bug. ***
Comment 13 Soren Sandmann Pedersen 2003-10-30 20:03:12 UTC
I can't reproduce this anymore with recent HEAD. 

Kris, do you think this could have been fixed by the table menu patch?
Comment 14 Kristian Rietveld 2003-10-30 20:55:06 UTC
Hmm, I didn't really touch the event handling code in GtkMenu* apart
from the keynav parts.
Comment 15 xavier.bestel 2003-11-05 07:46:12 UTC
FWIW, I still observe this bug with GNOME2.4 (GTK+2.2)
Comment 16 Chase Covello 2003-11-12 04:59:28 UTC
I can confirm this behavior on Gnome 2.4.0, Gentoo Linux, gcc 3.2.3
20030422. It's always reproducible per Søren's instructions.
Comment 17 Soren Sandmann Pedersen 2003-11-12 11:51:04 UTC
A useful thing for someone to do would be to find out if

  - it is still reproducible with HEAD gtk+

  - if not, exactly when did it stop happening
Comment 18 Soren Sandmann Pedersen 2004-02-19 13:39:24 UTC
It is still reproducible with current HEAD, but for a while it didn't
happen for some reason. The problem that Owen explains in bug 93085 is
almost certainly also what causes this bug.
Comment 19 Owen Taylor 2004-02-19 14:15:57 UTC
Bug 92085 actually.
Comment 20 mrroach 2004-02-20 18:32:07 UTC
*** Bug 134917 has been marked as a duplicate of this bug. ***
Comment 21 Chase Covello 2004-05-05 00:57:01 UTC
This bug is no longer reproduceable as of gtk+ 2.6.1. I believe it still existed
in 2.6.0.
Comment 22 xavier.bestel 2004-05-05 08:15:11 UTC
There's no such thing as gtk+ 2.6.1 yet. I assume you mean gtk+ 2.4.1 (or is it
gnome 2.6.1 ?)
Comment 23 Chase Covello 2004-05-05 08:50:48 UTC
Oops, that's gtk+ 2.4.1 with gnome 2.6.1.
Comment 24 Elijah Newren 2004-06-19 18:43:36 UTC
Mass changing gtk+ bugs with target milestone of 2.4.2 to target 2.4.4, as
Matthias said he was trying to do himself on IRC and was asking for help with. 
If you see this message, it means I was successful at fixing the borken-ness in
bugzilla :)  Sorry for the spam; just query on this message and delete all
emails you get with this message, since there will probably be a lot.
Comment 25 Vincent Noel 2004-10-01 19:58:41 UTC
In comment 18, it should read bug 92085.
Comment 26 csh 2005-03-08 06:24:43 UTC
This problem persists in Gnome 2.8.3.

Easily reproducible.
Comment 27 Vincent Untz 2005-04-09 08:36:28 UTC
*** Bug 173131 has been marked as a duplicate of this bug. ***
Comment 28 Soren Sandmann Pedersen 2005-06-10 15:22:25 UTC
*** Bug 172630 has been marked as a duplicate of this bug. ***
Comment 29 Guillaume Desmottes 2005-08-18 15:28:33 UTC
*** Bug 313565 has been marked as a duplicate of this bug. ***
Comment 30 Matthias Clasen 2014-03-24 02:22:58 UTC
closign out ancient bugs