You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "eirikbakke (via GitHub)" <gi...@apache.org> on 2024/06/13 19:38:35 UTC

[PR] On Windows, fix graphics bugs after external monitor connect/disconnect [netbeans]

eirikbakke opened a new pull request, #7475:
URL: https://github.com/apache/netbeans/pull/7475

   On Windows 10 and 11, I have observed various graphics bugs that appear after changes in the OS graphics configuration, such as connecting or disconnecting external monitors, or changing the HiDPI scaling levels. In some cases, the NetBeans main window ceased to update its graphics at all, making the IDE completely unusable until restarted, or until "Full Screen" was toggled via keyboard shortcut (a workaround I discovered after months of experimentation). In other cases, the NetBeans window might appear off-screen or partially off-screen, or the NetBeans window might have paint errors until it is maximized/restored. These are probably OpenJDK bugs or even bugs in Windows graphics drivers, as I saw similar problems in jEdit (another Java Swing app) and Skype (not a Java app).
   
   I ended up developing the patch in this PR, which detects changes in the graphics environment on Windows and refreshes the main window in a way that resets the window state in these cases. This patch was developed and verified to work through many months of experimentation, and I have now been running it on my working NetBeans IDE for 18 months.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
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


Re: [PR] On Windows, fix graphics bugs after external monitor connect/disconnect [netbeans]

Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on PR #7475:
URL: https://github.com/apache/netbeans/pull/7475#issuecomment-3193925523

   > The problem I see is: When could this workaround be removed?
   
   The answer is as you expect; never! :-) The bug is not reproducible, nor can I tell where it came from or whether it was fixed. But it did make NetBeans and my platform app completely unresponsive, on many occasions, and the fix made it go away.
   
   As I have now switched to MacOS for my daily work, and have not been using NetBeans _without_ the patch for years, I am also unable to tell if the problem still exists.
   
   In my commercial app, I'll be leaving the patch in forever. But no need to push it into NetBeans if it smells too bad... just wanted to offer it up before I switched to MacOS.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
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


Re: [PR] On Windows, fix graphics bugs after external monitor connect/disconnect [netbeans]

Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on PR #7475:
URL: https://github.com/apache/netbeans/pull/7475#issuecomment-3193917283

   When writing a comment to #8589 I was reminded that I wanted to have a look here. Thinking back to the clipboard problem it was an error not to fix it at the root years ago. The hard parts was (and in this case might be again) to get this reproducible.
   
   This is not a general JDK problem as it works an Linux and I think I have seen it on windows only a few times, but that is nothing compared to the behavior of other apps I use @work. I have no hidpi setup though, so that might indeed be more of a problem there.
   
   The problem I see is: When could this workaround be removed?
   
   With this merged, the next issue might well be "I added a second screen and NetBeans randomly moves its windows around". Or "I have two workplaces on one place all is fine, but on the other one NetBeans is taken out of fullscreen" when connecting.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
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


Re: [PR] On Windows, fix graphics bugs after external monitor connect/disconnect [netbeans]

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on PR #7475:
URL: https://github.com/apache/netbeans/pull/7475#issuecomment-3089598668

   This makes sense but keeps bumping through milestones.  @DevCharly @mbien any thoughts?


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
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


Re: [PR] On Windows, fix graphics bugs after external monitor connect/disconnect [netbeans]

Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on PR #7475:
URL: https://github.com/apache/netbeans/pull/7475#issuecomment-3109790959

   I can report that this patch has continued working well on my Windows machine for another year; I consider it to be stable.
   
   It would also be easy to revert if it turns out to cause problems, since all the relevant code is in a separate class that is called only via GraphicsEnvironmentChangeAdjuster. registerWindow() and notifyPossibleGraphicsEnvironmentChange().
   
   There is one IndexOutOfBoundsException stack trace mentioned in GraphicsEnvironmentChangeAdjuster.performAdjustments, which I have observed twice in 3 years, probably due to a JDK bug. In my own app I judged that error to be less of a problem than the problems fixed by the patch, which occurred more frequently. Could be debated.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
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