Browse Source

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
tags/v1.3.90
Brian Hinz 10 years ago
parent
commit
79055f7ba6
2 changed files with 5 additions and 4 deletions
  1. 2
    0
      java/com/tigervnc/vncviewer/CConn.java
  2. 3
    4
      java/com/tigervnc/vncviewer/Dialog.java

+ 2
- 0
java/com/tigervnc/vncviewer/CConn.java View File

@@ -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);

+ 3
- 4
java/com/tigervnc/vncviewer/Dialog.java View File

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

Loading…
Cancel
Save