diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2016-11-22 19:14:48 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2016-11-22 19:14:48 +0100 |
commit | 09cd95bb27b18a83a3028399236ee5309327bad8 (patch) | |
tree | b6fef93bb6de7a10590fb6656e23a980da0da566 /src | |
parent | af05d382f26c828a45ba39044cf4e514c0fe9cc6 (diff) | |
download | sciteco-09cd95bb27b18a83a3028399236ee5309327bad8.tar.gz |
Gtk interface: make sure that the default display is opened
* this has been broken since cb5e08b40d
Diffstat (limited to 'src')
-rw-r--r-- | src/interface-gtk/interface-gtk.cpp | 12 |
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, |