Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.10.0, 5.9.4
-
None
Description
1) Have GTK3 Qt platform theme installed,
2) unset DISPLAY
3) Run any Qt application with a proper -display option (for example: "qtpass -display :0")
4) See that it terminates with "(qtpass:994954): Gtk-WARNING **: cannot open display:"
This bug is caused by src/plugins/platformthemes/gtk3/qgtk3theme.cpp QGtk3Theme::QGtk3Theme() calling gtk_init(0, 0), that is, without passing any argc and argv
arguments to the GTK toolkit.
GTK docs say that "This function will terminate your program if it was unable to initialize the windowing system for some reason" and so it does.
Expected result:
GTK3 Qt platform theme should pass the necessary options to the GTK initialization.
If that is not possible it should use gtk_init_check() instead of gtk_init().
This function does not terminate the program if the windowing system can't be initialized and
so in this case the theme plugin can simply be skipped.
There was a similar bug QTBUG-41695 for Qt4.
Attachments
Issue Links
- relates to
-
QTBUG-41695 $DISPLAY necessary despite -display option
- Closed