summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2019-10-30 19:00:12 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2019-10-30 19:00:12 +0100
commit1f9d027bb617d151cd8ebc7f3bb42c0715e8b4ab (patch)
tree60d389fb9d4836b6c4de3db780b46988335650ca /src
parent98f16ae397d4cdc1b3b9aba6ecad4e77100f8409 (diff)
Fix typo and debug output when loading libgtk
A recent commit changed the library name, supposedly unintended. While testing I found that the debug statements generated confusing output (both "selected GTK-3" and "selected GTK-2") when GTK-3 was available.
Diffstat (limited to 'src')
-rw-r--r--src/drivers/X11/Fl_X11_System_Driver.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/drivers/X11/Fl_X11_System_Driver.cxx b/src/drivers/X11/Fl_X11_System_Driver.cxx
index 412d64667..89902b463 100644
--- a/src/drivers/X11/Fl_X11_System_Driver.cxx
+++ b/src/drivers/X11/Fl_X11_System_Driver.cxx
@@ -529,7 +529,7 @@ bool Fl_X11_System_Driver::probe_for_GTK(int major, int minor, void **ptr_gtk) {
*ptr_gtk = RTLD_DEFAULT; // Caution: NULL under linux, not-NULL under Darwin
} else {
// Try first with GTK3
- *ptr_gtk = Fl::system_driver()->dlopen("libgtk3.0.so");
+ *ptr_gtk = Fl::system_driver()->dlopen("libgtk-3.so");
if (*ptr_gtk) {
#ifdef DEBUG
puts("selected GTK-3\n");
@@ -537,12 +537,13 @@ bool Fl_X11_System_Driver::probe_for_GTK(int major, int minor, void **ptr_gtk) {
} else {
// Try then with GTK2
*ptr_gtk = Fl::system_driver()->dlopen("libgtk-x11-2.0.so");
- }
- if (*ptr_gtk) {
#ifdef DEBUG
- puts("selected GTK-2\n");
+ if (*ptr_gtk) {
+ puts("selected GTK-2\n");
+ }
#endif
- } else {
+ }
+ if (!(*ptr_gtk)) {
#ifdef DEBUG
puts("Failure to load libgtk");
#endif