Revision: 5154
          http://sourceforge.net/p/tigervnc/code/5154
Author:   bphinz
Date:     2014-01-10 04:08:20 +0000 (Fri, 10 Jan 2014)
Log Message:
-----------
Fixes for modality issues & dialog behavior in embedded mode.

Modified Paths:
--------------
    trunk/java/com/tigervnc/vncviewer/CConn.java
    trunk/java/com/tigervnc/vncviewer/Dialog.java

Modified: trunk/java/com/tigervnc/vncviewer/CConn.java
===================================================================
--- trunk/java/com/tigervnc/vncviewer/CConn.java        2014-01-10 04:05:32 UTC 
(rev 5153)
+++ trunk/java/com/tigervnc/vncviewer/CConn.java        2014-01-10 04:08:20 UTC 
(rev 5154)
@@ -794,6 +794,7 @@
                       JOptionPane.DEFAULT_OPTION, VncViewer.logoIcon);
     JDialog dlg = op.createDialog(desktop, "About TigerVNC Viewer for Java");
     dlg.setIconImage(VncViewer.frameIcon);
+    dlg.setAlwaysOnTop(true);
     dlg.setVisible(true);
     if (fullScreenWindow != null)
       Viewport.setFullScreenWindow(fullScreenWindow);
@@ -829,6 +830,7 @@
                                      JOptionPane.DEFAULT_OPTION);
     JDialog dlg = op.createDialog(desktop, "VNC connection info");
     dlg.setIconImage(VncViewer.frameIcon);
+    dlg.setAlwaysOnTop(true);
     dlg.setVisible(true);
     if (fullScreenWindow != null)
       Viewport.setFullScreenWindow(fullScreenWindow);

Modified: trunk/java/com/tigervnc/vncviewer/Dialog.java
===================================================================
--- trunk/java/com/tigervnc/vncviewer/Dialog.java       2014-01-10 04:05:32 UTC 
(rev 5153)
+++ trunk/java/com/tigervnc/vncviewer/Dialog.java       2014-01-10 04:08:20 UTC 
(rev 5154)
@@ -1,5 +1,5 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * Copyright (C) 2011-2013 Brian P. Hinz
+ * Copyright (C) 2011-2014 Brian P. Hinz
  *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -58,9 +58,9 @@
     if (fullScreenWindow != null)
       Viewport.setFullScreenWindow(null);
 
+    if (getModalityType() == ModalityType.APPLICATION_MODAL)
+      setAlwaysOnTop(true);
     setVisible(true);
-    setFocusable(true);
-    setAlwaysOnTop(true);
     return ret;
   }
 
@@ -70,7 +70,6 @@
 
   public void endDialog() {
     setVisible(false);
-    setFocusable(false);
     setAlwaysOnTop(false);
     fullScreenWindow = Viewport.getFullScreenWindow();
     if (fullScreenWindow != null)

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Tigervnc-commits mailing list
Tigervnc-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to