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 2023/01/13 16:50:23 UTC

[GitHub] [netbeans] errael commented on a diff in pull request #5280: Improve Dialog Placement

errael commented on code in PR #5280:
URL: https://github.com/apache/netbeans/pull/5280#discussion_r1069685966


##########
platform/core.windows/src/org/netbeans/core/windows/services/DialogDisplayerImpl.java:
##########
@@ -252,11 +252,8 @@ public void showDialog () {
                         presenter = new NbPresenter(descriptor, NbPresenter.currentModalDialog, true);
                     }
                 } else {
-                    Frame f = KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow() 
-                        instanceof Frame ? 
-                        (Frame) KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow() 
-                        : WindowManager.getDefault().getMainWindow();
-
+                    Window w = KeyboardFocusManager.getCurrentKeyboardFocusManager ().getActiveWindow ();
+                    Frame f = w instanceof Frame ? (Frame) w : WindowManager.getDefault().getMainWindow();

Review Comment:
   This is a cosmetic change. It's both more clear and allows easier comparison to what's going on in the
   ```
   if (descriptor instanceof DialogDescriptor) {
   ```
   case



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