From cc01b7060d2e01c860869938d7958f29b7e2d854 Mon Sep 17 00:00:00 2001 From: Brian Hinz Date: Sat, 12 Jan 2013 14:12:31 +0000 Subject: Send the focus back to the viewport after leaving the options dialog git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5027 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- java/com/tigervnc/vncviewer/OptionsDialog.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'java/com/tigervnc') diff --git a/java/com/tigervnc/vncviewer/OptionsDialog.java b/java/com/tigervnc/vncviewer/OptionsDialog.java index cd213410..e78563e6 100644 --- a/java/com/tigervnc/vncviewer/OptionsDialog.java +++ b/java/com/tigervnc/vncviewer/OptionsDialog.java @@ -470,6 +470,15 @@ class OptionsDialog extends Dialog implements return c; } + public void endDialog() { + super.endDialog(); + CConn cc = (CConn)cb; + if (cc.viewport != null && cc.viewport.isVisible()) { + cc.viewport.toFront(); + cc.viewport.requestFocus(); + } + } + public void actionPerformed(ActionEvent e) { Object s = e.getSource(); if (s instanceof JButton && (JButton)s == okButton) { -- cgit v1.2.3