Bug 28658 - [Perspectives] No context menu in perspective bar
Summary: [Perspectives] No context menu in perspective bar
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: 3.0 M2   Edit
Assignee: Simon Arsenault CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-19 02:54 EST by Boris Pruessmann CLA
Modified: 2003-06-18 16:31 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Pruessmann CLA 2002-12-19 02:54:24 EST
I2002-12-18

Bringing up the context menu on the perspective bar on the left does not work. 
Closing perspectives is thus only possible via the Window menu.
Comment 1 Steve Northover CLA 2002-12-19 17:07:23 EST
Fixed > 20021219
Comment 2 Andre Weinand CLA 2003-02-24 13:31:28 EST
*** Bug 32688 has been marked as a duplicate of this bug. ***
Comment 3 Andre Weinand CLA 2003-02-24 13:33:30 EST
reopened because bug 32688 still sees the problem in RC1.
Comment 4 Steve Northover CLA 2003-03-04 20:43:13 EST
In 200303040010:

- bringing up context menus in the perspective bar works (right mouse)
- bringing up context menus over a break point works (right mouse)

NOTE:  The menu in question in 32688 is invoked in a non-standard way, by 
looking for mouse button 3, which doesn't exist.  To see this is true, press 
and hold mouse button 3 in a Java editor.  The menu comes up right away.  Now 
press and hold over a breakpoint.  The menu comes up on mouse release.

If you can confirm this, please reopen 32688.  Thanks.
Comment 5 Andre Weinand CLA 2003-03-05 04:32:33 EST
Yes, confirmed.
Reopening bug 32688.
Comment 6 Boris Pruessmann CLA 2003-03-20 05:40:29 EST
I2003-03-19

Sorry but I fail to bring up the context menu via Ctrl-Click...
Comment 7 Andre Weinand CLA 2003-03-20 05:55:21 EST
Boris, this bug has been closed because the context menu works from an SWT point of 
view (via the right mouse button). 
What you are experiencing is that it doesn't work for a Left-Control-click.
However, this behavior results from a non-standard way of opening a context menu (see 
comment #4), it is not SWT's fault. Therefore I reopened bug #32688.

Since the perspective bar has the same problem I will leave this PR open but transfer it to 
platform UI.
Comment 8 Andre Weinand CLA 2003-03-20 05:58:29 EST
[Copied and adapted from bug #32688]:
The perspective bar's context menu is opened by looking for mouse button 3, which 
doesn't exist on MacOS X even if you have a three button mouse.
On MacOS X button 3 is reported as a button 1 together with the Control modifier key.

Comment 9 Nick Edgar CLA 2003-03-21 16:55:35 EST
Will address for 2.2.
Comment 10 Andre Weinand CLA 2003-06-17 12:21:28 EDT
The fix is probably to change all context menu popup code
from using a MouseListener (and testing MouseEvent.button == 3) to using
SWT.MenuDetect listener:

  control.addListener(SWT.MenuDetect, new Listener() {
    public void handleEvent(Event event) {
      if (event.type == SWT.MenuDetect) {
        DO MENU CODE HERE
      }
  });
Comment 11 Simon Arsenault CLA 2003-06-18 14:05:07 EDT
Made changes to EditorWorkbook.createControl, ViewPane.createTitleBar, and 
WorkbenchWindow.createShortcutBar. I've open bug 39082 on Text component so 
they can fix CompositeRulerCanvas.

No changes has been released yet. Waiting for SWT to comment on bug 39081 first.
Comment 12 Simon Arsenault CLA 2003-06-18 16:31:28 EDT
Got confirmation from SWT that event coordinates for MenuDetect will remain as 
relative to the screen (see bug 39081).

Code was updated to deal with screen relative instead of control relative 
coordinates. Code released.