You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/12/22 07:56:30 UTC

[GitHub] [netbeans] eirikbakke opened a new pull request #1804: [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows)

eirikbakke opened a new pull request #1804: [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows)
URL: https://github.com/apache/netbeans/pull/1804
 
 
   On Windows, on displays that have a HiDPI scaling set (e.g. 150% or 200%), drag-and-drop to reposition editors and modes in the NetBeans window system does not work properly.
   
   This appears to be due to a JDK bug, where java.awt.dnd.DragSourceEvent.getLocation() returns the wrong screen coordinate when HiDPI displays are involved. The workaround is to use MouseInfo.getPointerInfo() instead--that one works correctly.
   
   Both DragSourceEvent and DragSourceEvent get their coordinates from a call to the "GetCursorPos" Windows API function. The latter returns device coordinates rather than logical coordinates for DPI-aware applications (including java.exe and the netbeans launcher since https://github.com/apache/netbeans/pull/883 ).
   
   But in the implementation of MouseInfo.getPointerInfo(), extra code was added to convert the device coordinates to logical coordinates, as part of the original JDK patch which introduced HiDPI support on Windows. See Java_sun_awt_windows_WMouseInfoPeer_fillPointWithCoords in https://github.com/openjdk/jdk/blame/6bab0f539fba8fb441697846347597b4a0ade428/src/java.desktop/windows/native/libawt/windows/MouseInfo.cpp . This was forgotten in the code that initializes the coordinates for DragSourceEvent (see code around GetCursorPos in https://github.com/openjdk/jdk/blob/1440dc39400f89b7df8af2249f30eaf5092c1574/src/java.desktop/windows/native/libawt/windows/awt_DnDDS.cpp ).
   
   The workaround was tested on both single and multi-monitor setups.
   
   In a few remaining cases, involving multi-monitor setups with different DPI scaling factors, the semi-transparent preview thumbnail that appears while dragging an editor may end up on the wrong screen. This is due to a different JDK bug ( https://bugs.openjdk.java.net/browse/JDK-8211999 ). In these cases, however, the orange tab outline, which appears during dragging to illustrate where the tab would end up if dropped, does appear in the correct place, which makes this less of a usability issue.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] lkishalmi commented on issue #1804: [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows)

Posted by GitBox <gi...@apache.org>.
lkishalmi commented on issue #1804: [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows)
URL: https://github.com/apache/netbeans/pull/1804#issuecomment-569947004
 
 
   Is there any reason not to merge this one?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] eirikbakke commented on issue #1804: [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows)

Posted by GitBox <gi...@apache.org>.
eirikbakke commented on issue #1804: [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows)
URL: https://github.com/apache/netbeans/pull/1804#issuecomment-570221504
 
 
   I reviewed all usages of DragSourceEvent, DragSourceDragEvent, and DragSourceDropEvent in the Netbeans repo, and ensured the workaround was applied whenever required. Will merge once Travis gives it a green check.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] eirikbakke commented on issue #1804: [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows)

Posted by GitBox <gi...@apache.org>.
eirikbakke commented on issue #1804: [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows)
URL: https://github.com/apache/netbeans/pull/1804#issuecomment-584173232
 
 
   The underlying JDK bug now has ticket https://bugs.openjdk.java.net/browse/JDK-8238575

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] eirikbakke commented on issue #1804: [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows)

Posted by GitBox <gi...@apache.org>.
eirikbakke commented on issue #1804: [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows)
URL: https://github.com/apache/netbeans/pull/1804#issuecomment-570535596
 
 
   Also checked to see if the bug is present in DragGestureEvent.getDragOrigin. It's not; that one works correctly on HiDPI displays. Merging.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] eirikbakke merged pull request #1804: [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows)

Posted by GitBox <gi...@apache.org>.
eirikbakke merged pull request #1804: [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows)
URL: https://github.com/apache/netbeans/pull/1804
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] eirikbakke commented on issue #1804: [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows)

Posted by GitBox <gi...@apache.org>.
eirikbakke commented on issue #1804: [NETBEANS-2954] Fix broken tab dragging on HiDPI displays (Windows)
URL: https://github.com/apache/netbeans/pull/1804#issuecomment-569950558
 
 
   I'll go through it once more myself (checking for all usages of the relevant buggy methods) and then merge it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists