summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2017-11-14 15:51:50 +0100
committerPierre Ossman <ossman@cendio.se>2017-11-14 16:05:40 +0100
commit727a70f03868b1734e73853f2f75a4e9e4aa9b61 (patch)
treeb7e4300921c4887f0c2332b740540e2dfc4389bb
parent335446d164fc96a08c119171d696ffea030f71ff (diff)
downloadtigervnc-727a70f03868b1734e73853f2f75a4e9e4aa9b61.tar.gz
tigervnc-727a70f03868b1734e73853f2f75a4e9e4aa9b61.zip
Don't open X11 display too early
We have to wait until we've passed the command line arguments or we might overlook a -display argument.
-rw-r--r--vncviewer/vncviewer.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx
index 0ca46af4..67013027 100644
--- a/vncviewer/vncviewer.cxx
+++ b/vncviewer/vncviewer.cxx
@@ -481,11 +481,6 @@ int main(int argc, char** argv)
init_fltk();
-#if !defined(WIN32) && !defined(__APPLE__)
- fl_open_display();
- XkbSetDetectableAutoRepeat(fl_display, True, NULL);
-#endif
-
Configuration::enableViewerParams();
/* Load the default parameter settings */
@@ -521,6 +516,11 @@ int main(int argc, char** argv)
mkvnchomedir();
+#if !defined(WIN32) && !defined(__APPLE__)
+ fl_open_display();
+ XkbSetDetectableAutoRepeat(fl_display, True, NULL);
+#endif
+
CSecurity::upg = &dlg;
#ifdef HAVE_GNUTLS
CSecurityTLS::msg = &dlg;