Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#1979 closed defect (fixed)

[PATCH] bug: getMousePosition() fails when MToolkit is being used and window is moved

Reported by: markb@… Owned by: framm
Priority: major Component: Core
Version: Keywords:
Cc:

Description

I have discovered that with the current josm (r1212) and Java 1.6.0_07-b06 on Ubuntu 8.04 that if AWT_TOOLKIT is set to MToolkit (to avoid blank windows when using compiz) and the window that contains the layer dialog is moved, then the right mouse
button no longer pops up the context menu for a layer.

I fixed the problem by simplifying openPopup() so that it no longer calls
getMousePointer() on the list pane as this seems to be borked by the window move.

I therefore reverted to using the mouse coordinates supplied in the event to choose the list item and it now works for me.

Attachments (1)

LayerListDialog.java.patch (975 bytes) - added by anonymous 4 years ago.

Download all attachments as: .zip

Change History (6)

Changed 4 years ago by anonymous

comment:1 follow-up: Changed 4 years ago by anonymous

Effectively you only removed a check. The question is why this check was introduced. I'm pretty sure is has a reason to be there.

comment:2 in reply to: ↑ 1 Changed 4 years ago by anonymous

  • Component changed from unspecified to Core

Replying to anonymous:

Effectively you only removed a check. The question is why this check was introduced. I'm pretty sure is has a reason to be there.

Sure, it had a reason to be there. However, with the check removed, the context
menus popup, but with the original code, as soon as the window is moved/resized, the
menus are no longer accessible.

Perhaps the person who put the check there in the first place would care to comment?

comment:3 Changed 4 years ago by anonymous

Well, that code is there since revision 17. Probably it is there from the beginning and has no real sense. Did you notice any drawbacks?

comment:4 Changed 4 years ago by anonymous

Generally, it appears to work fine with the check removed.

Once, I noticed that the menu popped up rather a long way away from the item I
had clicked on but have been unable to reproduce that oddness again.

Even if that does happen occasionally, I can live with that minor weirdness
compared to not having any menu popup at all!

comment:5 Changed 4 years ago by anonymous

  • Resolution set to fixed
  • Status changed from new to closed

Applied in r1213.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.