aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface-gtk/interface-gtk.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2016-11-22 19:14:48 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2016-11-22 19:14:48 +0100
commit09cd95bb27b18a83a3028399236ee5309327bad8 (patch)
treeb6fef93bb6de7a10590fb6656e23a980da0da566 /src/interface-gtk/interface-gtk.cpp
parentaf05d382f26c828a45ba39044cf4e514c0fe9cc6 (diff)
downloadsciteco-09cd95bb27b18a83a3028399236ee5309327bad8.tar.gz
Gtk interface: make sure that the default display is opened
* this has been broken since cb5e08b40d
Diffstat (limited to 'src/interface-gtk/interface-gtk.cpp')
-rw-r--r--src/interface-gtk/interface-gtk.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/interface-gtk/interface-gtk.cpp b/src/interface-gtk/interface-gtk.cpp
index 920f01b..ca04a6e 100644
--- a/src/interface-gtk/interface-gtk.cpp
+++ b/src/interface-gtk/interface-gtk.cpp
@@ -185,8 +185,8 @@ InterfaceGtk::get_options(void)
/*
* Parsing the option context with the Gtk option group
- * will automatically initialize Gtk, so gtk_init()
- * does not have to be called.
+ * will automatically initialize Gtk, but we do not yet
+ * open the default display.
*/
GOptionGroup *group = gtk_get_option_group(FALSE);
@@ -215,6 +215,14 @@ InterfaceGtk::init(void)
gdk_threads_init();
/*
+ * gtk_init() is not necessary when using gtk_get_option_group(),
+ * but this will open the default display.
+ * FIXME: Perhaps it is possible to defer this until we initialize
+ * interactive mode!?
+ */
+ gtk_init(NULL, NULL);
+
+ /*
* Register clipboard registers.
* Unfortunately, we cannot find out which
* clipboards/selections are supported on this system,