Bug 210851 - [Navigator] Navigator does not handle right mouse button click
Summary: [Navigator] Navigator does not handle right mouse button click
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.3.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Bogdan Gheorghe CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2007-11-25 04:34 EST by Michael Woski CLA
Modified: 2018-05-15 16:22 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Woski CLA 2007-11-25 04:34:03 EST
Hi,

I have the following problem that when I try to right click on any resource/item in the Navigator view nothing happens, i.e. the context menu does not show up.
I've seen the same behaviour (or non-behaviour that is) just recently in Subversive's Repository Browser. The Package Explorer however, which basically does some comparable job, does not expose the described problem.
There's one slight difference between the problem with the subversive browser and the Navigator though. Having two or more items selected in the repository view, a context menu suddenly pops up, not so with the Navigator.
I haven't looked into how or if the views relate to eachother through inheritance or whatever, but it seems strange that those similar symptoms popped up out of the blue quite synchronously.

thx M;chi
Comment 1 Mike Wilson CLA 2007-11-28 13:24:41 EST
I tried this on linux using our current 3.4 development stream and on a mac using 3.3.1 and 3.4. The steps I did were:

1) Opened the Navigator view
2) Right clicked in the view content area <- got a menu.
3) Selected a project, then right clicked <- got a menu.
4) Expanded the project to show individual resources, selected one, then right clicked <- got a menu
4) Selected multiple resources, then right clicked <- got a menu

Am I doing the right tests?

Assuming this is not working for you, can you tell me more about your configuration? E.g. What plug-ins are you running? What locale are you in? Are you using any unusual peripherals or input managers? etc.


Comment 2 Michael Woski CLA 2007-11-28 15:20:15 EST
Hi Mike,

thanks for looking into this. And yes, you're doing all the right things.

And you probably hit the nail on its head already. In fact it seems to be my USB mouse, my touchpad works totally fine. How should we proceed? I mean, I can live with that.

bye M;chi
Comment 3 Mike Wilson CLA 2007-11-28 15:56:00 EST
Ah, interesting! I'm going to hand you off to the SWT team, since they are responsible for dealing with the many vagaries of input devices. They've probably got an example that will show you what mouse events are occurring (and whether they are properly formed) without all the Eclipse UI "goodness" in the way. If your mouse isn't sending the right events, then one of their Linux gurus might be able to help you figure out why. If the events *are* coming in and they look like they have the right data in them, then they will assign the bug back to me. 

Hopefully, they can help you, but if not I'll see you soon. <g>
Comment 4 Michael Woski CLA 2007-11-28 17:00:07 EST
ok, I'll wait and see

cu (or not) M;chi
Comment 5 Steve Northover CLA 2007-12-05 16:43:42 EST
Might be a GTK version thing.  What are you running?

Touchpad works but mouse doesn't?  Does the mouse work in other applications?  Does Snippet62 print the right mouse events?

http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet62.java
Comment 6 Michael Woski CLA 2007-12-06 08:46:23 EST
 (In reply to comment #5)
Hi Steve,
thanks for looking into this.
There is one thing to note: The right mouse button works perfectly well in Eclipse, except in the Navigator, the SVN Repository Browser and also in some Form fields (e.g. in the Plugin-Editor). And indeed, it works with my touchpad and doesn't with my USB mouse. Running the Snippet produces the proper/same events for SWT from 3.3.1 and 3.4M2:

USB mouse:
DOWN: button: 3, stateMask=0x0, x=25, y=42
UP: button: 3, stateMask=0x200000, x=25, y=42 BUTTON3

TouchPad:
DOWN: button: 3, stateMask=0x0, x=25, y=42
UP: button: 3, stateMask=0x200000, x=25, y=42 BUTTON3

I sometimes(!) get lucky and the right USB button does even work in the afforementioned views, but I can't depict what leads to this.

So now back to your first question: I'm running opensuse 10.3 with gtk2-2.12.1-7.5 and sun's jvm 1.5 through 1.7. I also tried fresh workspaces and configurations with Eclipse 3.3.1 and 3.4M2. All the same ...

However, I think I should do some debugging myself, when I get some spare time. It would be helpful though if you already had an idea which classes I might look into, maybe some breakpoints?

thx M;chi
Comment 7 Steve Northover CLA 2007-12-06 11:33:56 EST
It's really wierd.  The SWT stand alone example seems to indicate that the correct mouse events are coming through.  Try putting some prints and/or stepping through Control.gtk_button_press_event() to see whether Control.showMenu() is getting called.
Comment 8 Steve Northover CLA 2007-12-06 11:34:07 EST
It's really wierd.  The SWT stand alone example seems to indicate that the correct mouse events are coming through.  Try putting some prints and/or stepping through Control.gtk_button_press_event() to see whether Control.showMenu() is getting called.
Comment 9 Steve Northover CLA 2007-12-06 11:36:16 EST
Thanks to Buglizzard for appending the same comment twice!
Comment 10 Michael Woski CLA 2008-01-09 14:48:33 EST
So Steve,

another year has gone by .... and I didn't find out anything suspicious in the call stack (not in a reasonable amount of time at least). But what I came across is that this phenomena is not bound to the already mentioned views but rather to some contents of those views. So, basically in the Project Explorer anything being a file or a simple folder shows the problem. On the other hand packages, source folders, libraries, etc., i.e. all those logical aggregates the Project Explorer exposes do behave correctly!

Now does that give you any idea?

bye M;chi
Comment 11 Steve Northover CLA 2008-01-09 15:34:30 EST
Bogdan, do you have gtk2-2.12.1-7.5 around?
Comment 12 Mike Wilson CLA 2008-01-11 07:52:29 EST
The fact that it works for JDT objects and not resources is very odd. *That* sounds like it should be a problem in the UI team code, but if that were true, it would be happening everywhere. Adding Michael Elder to the CC, in case he has any ideas.


Comment 13 Eric Williams CLA 2018-05-15 16:22:01 EDT
This is a really old bug which I cannot reproduce on my Fedora 28 machine using 4.8 M7. I'll close this for now, please reopen it if anyone sees this bug again.