#1979 closed defect (fixed)
[PATCH] bug: getMousePosition() fails when MToolkit is being used and window is moved
Reported by: | 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)
Change History (6)
by , 16 years ago
Attachment: | LayerListDialog.java.patch added |
---|
follow-up: 2 comment:1 by , 16 years ago
comment:2 by , 16 years ago
Component: | unspecified → 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 by , 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 , 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!
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.