aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorBrian Hinz <bphinz@users.sourceforge.net>2014-01-10 04:08:20 +0000
committerBrian Hinz <bphinz@users.sourceforge.net>2014-01-10 04:08:20 +0000
commit79055f7ba6655efa87a119659ddb290b6d85c9ab (patch)
tree4d70c89e1846b17e2e00c15a92a53e9f29261f7a /java
parent77453e6f87758d456d8e304dd927c9cff533af62 (diff)
downloadtigervnc-79055f7ba6655efa87a119659ddb290b6d85c9ab.tar.gz
tigervnc-79055f7ba6655efa87a119659ddb290b6d85c9ab.zip
Fixes for modality issues & dialog behavior in embedded mode.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5154 3789f03b-4d11-0410-bbf8-ca57d06f2519
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)