aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/com/tigervnc/vncviewer/CConn.java2
-rw-r--r--java/com/tigervnc/vncviewer/Dialog.java7
2 files changed, 5 insertions, 4 deletions
diff --git a/java/com/tigervnc/vncviewer/CConn.java b/java/com/tigervnc/vncviewer/CConn.java
index b876751c..93420512 100644
--- a/java/com/tigervnc/vncviewer/CConn.java
+++ b/java/com/tigervnc/vncviewer/CConn.java
@@ -794,6 +794,7 @@ public class CConn extends CConnection implements
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 @@ public class CConn extends CConnection implements
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);
diff --git a/java/com/tigervnc/vncviewer/Dialog.java b/java/com/tigervnc/vncviewer/Dialog.java
index 41301232..4b82eb93 100644
--- a/java/com/tigervnc/vncviewer/Dialog.java
+++ b/java/com/tigervnc/vncviewer/Dialog.java
@@ -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 @@ class Dialog extends JDialog {
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 @@ class Dialog extends JDialog {
public void endDialog() {
setVisible(false);
- setFocusable(false);
setAlwaysOnTop(false);
fullScreenWindow = Viewport.getFullScreenWindow();
if (fullScreenWindow != null)