Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 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 Milestone:
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 16 years ago.

Download all attachments as: .zip

Change History (6)

by anonymous, 16 years ago

Attachment: LayerListDialog.java.patch added

comment:1 by anonymous, 16 years ago

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.

in reply to:  1 comment:2 by anonymous, 16 years ago

Component: unspecifiedCore

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 by anonymous, 16 years ago

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 by anonymous, 16 years ago

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 by anonymous, 16 years ago

Resolution: fixed
Status: newclosed

Applied in r1213.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain framm.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.