! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Menu items in sub-menus doesn't react on click
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Mike Massonnet editbugs 2007-11-05 06:06:19 CET
If I compile xfdesktop without monitoring support[1], I can only activate the menu items inside a sub-menu by hitting Enter.  It works hardly never with the mouse (it worked like one or two times, weird).  All the items in the root menu are working fine with the mouse however.

[1] --disable-desktop-menu-dir-monitor

I followed your advice and looked inside libxfcegui4, but I couldn't get the lib to print its debugging output even that I compiled with --enable-debug=full.
Comment 1 Mike Massonnet editbugs 2007-11-05 06:26:11 CET
Err, actually it does that with or without monitoring.
Comment 2 Jean-François Wauthy editbugs 2007-11-05 07:27:38 CET
I can confirm that
Comment 3 Brian J. Tarricone (not reading bugmail) 2007-11-05 09:54:40 CET
Sorry guys, but it works fine here.  Unless you can do some debugging on your own, I don't think I can help.
Comment 4 Jean-François Wauthy editbugs 2007-11-05 10:40:35 CET
maybe it's gtk related ? (I'm using 2.12.1)
Comment 5 Mike Massonnet editbugs 2007-11-05 11:23:43 CET
I have GTK 2.12.1 as well, and I have found a funny trick.

Open the menu with a keybind or from command line (xfdesktop --menu), and tada the mouse clicks are always working.

I had like to try another window manager, but right now is not the moment :)
Comment 6 Mike Massonnet editbugs 2007-11-08 22:58:39 CET
I comment here in case I forget about it…

The menu in the panel works without problem with the left mouse clicks.  The problem is only in the desktop applications menu, and as said only the items inside sub-menus.  As an update, I have found out that I can activate these items by right click furthermore of <enter>, and that left and middle clicks don't (should be MOUSE0 and 1 in gtk).
Comment 7 Brian J. Tarricone (not reading bugmail) 2007-11-08 23:10:18 CET
Sorry, still works fine for me here.  All mouse buttons work, keyboard control works.  You can try adding some printfs to lbixfcegui4/xfce-appmenuitem.c, _command_activate_cb() to see if it's getting called.  Otherwise I dunno...
Comment 8 Mike Massonnet editbugs 2007-11-09 00:35:06 CET
(In reply to comment #6)
> As an update, I have found out that I can activate these
> items by right click furthermore of <enter>, and that left and middle clicks
> don't (should be MOUSE0 and 1 in gtk).

And I forgot about another thing, if I run xfdesktop --menu the left click works just perfect.  So there is a weirdness hidden in some byte, the right click is keeping some hostages.

I will comment again after some printf in libxfcegui4.
Comment 9 Brian J. Tarricone (not reading bugmail) 2007-11-09 03:25:40 CET
Do you see a similar problem with the windowlist?

This is a hack, but try: xfce-desktop.c, line 1089 -- change 'button' to '0'.  See if that works.  If it does, something funky is going on.

In that case, put a printf() right before that line that prints out the value of 'button' and let me know what it prints out, and which button you actually pressed.
Comment 10 Mike Massonnet editbugs 2007-11-09 05:44:33 CET
(In reply to comment #9)
> Do you see a similar problem with the windowlist?

No.

> This is a hack, but try: xfce-desktop.c, line 1089 -- change 'button' to '0'. 
> See if that works.  If it does, something funky is going on.
> 
> In that case, put a printf() right before that line that prints out the value
> of 'button' and let me know what it prints out, and which button you actually
> pressed.

button is 3 when I click the desktop, and 0 if I call xfdesktop --menu.  By replacing button with 0 it just works <tm>.
Comment 11 Brian J. Tarricone (not reading bugmail) 2007-11-09 06:49:04 CET
So it works if you change 'button' to be '0' all the time in the function call?  Damn, that's retarded.  The idea is that if you want to pop up a menu that isn't in direct response to a mouse event, you pass '0'.  Otherwise, if you have an actual event structure, you pass GdkEventButton::button (which is what I'm doing -- button 3 == right mouse button, so that's correct).  Something is broken, though, and I don't know what.

Mike, you're using the same version of gtk as I am... so weird.  I committed this hack, so I guess this is closed for now, tho I'm not happy about it.

Bug #3652

Reported by:
Mike Massonnet
Reported on: 2007-11-05
Last modified on: 2009-07-14

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
1 user

Version

Attachments

Additional information