Description of problem: First of all, this is NOT the unpressable button bug, though it may also be GTK related. It is also not cured by the GDK_NATIVE_WINDOW workaround. Since upgrading to Fedora 12, The context menu in eclipse is not working reliably. Often, when I single right-click in the editor window, the context menu pops up, but instead of staying on screen, it executes whatever is next to the cursor when the menu pops up, then disappears Needless to say, this makes using eclipse incredibly annoying. To reproduce, you have to position the cursor before clicking around the middle of the screen, so that the when the popup menu appears, the cursor is positoned over a directly selectable (not submenu) menu option to reproduce this. Try to move the cursor up and down between right clicks a few lines to achieve the right relative postion of the cursor and the menu to trigger the bug. My theory is that when I right-click, the popup menu appears somewhat UNDER the cursor, and when I release the button It interprets this as if I was holding down the RMB to bring up the menu, then selecting the menu option by releasing RMB. Also, if move the mouse slightly left while clicking the RMB, the bug does not trigger, the popup menu shows up as it should. This happens both on the eclipse shipped with Fedora, and on eclipse downloaded from eclipse.org. I have installed a Fedora 11 VM to try to reproduce the bug there, with the latest eclipse.org eclipse, but the popup menu worked as expected there, this bug is new as of F12. Version-Release number of selected component (if applicable): eclipse-platform-3.5.1-4.fc12.x86_64 How reproducible: always Steps to Reproduce: 1. Start eclipse 2. Open a program file in the editor 3. To reproduce, you have to position the cursor before clicking around the middle of the screen, so that the when the popup menu appears, the cursor is postioned on a directly selectable (not submenu) menu option to reproduce this. Try to move the cursor up and down between right clicks a few lines to achieve the right relative postion of the cursor and the menu to trigger the bug. Actual results: Context menu pops up, select whatever option is under the cursos, the disappears Expected results: Context menu pops up, and stays on screen until I select an option Additional info:
I've tried to repoduce this on my other F12 machine, and bug does not appear here. The only difference I can think of is that this machine (where the bug is not reproducible) uses the binary nvidia X drivers, while the other machine (where the bug alway shows up) uses the default open source ati driver from Fedora. It seems that the menu here does not appear under the mouse cursor, but a few pixels to the right of it (as it should).
I can't reproduce either but I don't have any machines with the binary Nvidia drivers. It may be worth seeing if you can reproduce it with other Gtk apps or a smaller SWT example. Perhaps try one of the snippets under "Menu" here: http://www.eclipse.org/swt/snippets/
Created attachment 375134 [details] SWT test case
I was not clear. The machine with the binary nvidia driver usually works. The machine with the open source ati driver is where I can reliably reproduce the bug. ( Driver "radeon") I've attached the test case. It seems that a normal gtk popup always positions the menu so that mouse pointer is in one of the corners of the popup. That may be why most applications work right. The popup positioning in eclipse seems to use a different algorithm, and near the middle of the screen it displays the popup so that the cursor somewhere on the side of the menu. That's why I had to make the popup so big, that when it pops up the cursor is definitely not in the corner, but on the side. When I start it on F11 (in a VirtualBox session), and right click, the menu pops up, the item under the cursor is lit up, and i can select normally. When I start it on F12, and right click, the menu pops up, then disappears instantly. I also noticed, that on F12 the menu item is lit up as soon as I put the cursor on the border, while on F11 it is lit up only when I move it two pixels to the left the menu border. (I had to do the move mouse left while right clicking trick to get the popup stay up long enough to test on F12 though) I'll test tomorrow if this test case triggers the bug on my other machine as well.
I see what you mean. The problem seems to occur if I move my mouse slightly during/after right-clicking. If I right-click and hold in other apps and then let go of the mouse button while hovering over a context menu entry, whatever that entry does will be executed so I don't think that's unique to SWT. It appears that it's just too easy to right-click, move a bit, execute whatever entry was under the cursor. It's worth filing a bug at eclipse.org with Platform -> SWT to get the SWT committers' opinions. I highly doubt this behaviour is Fedora-specific since we don't patch anything that would affect this. Judging from your F11 experience, it sounds like it may be a GTK 2.18 change. Thanks for helping narrow this down.
I've experimented some more, and I think I've found the root of the problem. My mouse (!) seems to be incompatible with the X server. I've switched to a different mouse, and I can not reproduce the issue any more even on F12. My wild guess (I don't know how to test mouse events under X) is that my mouse sends some extra events during right click that X/GTK/SWT interprets as a movement between down and up events or something. I tested it with mev against a mouse that works, though, and the output was exactly the same with both mice. The mouse is not physically broken, I can use it everywhere else, even play FPS games with it without a hitch. It seems that the change in GTK that puts the mouse pointer on the sensitive part of the pop-up in conjunction with my magic mouse has enabled this bug. So in the end there is no eclipse bug, no SWT bug, and no GTK bug, but there may be a Xorg bug or hardware incompatibility. Thanks for your time and sorry for the red herrings. If someone needs me to do some testing with this mouse I am happy to help.
Crazy! Good luck getting it sorted out.