summaryrefslogtreecommitdiff
path: root/src/drivers/Xlib
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-03-07 11:06:24 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-03-07 11:06:24 +0100
commit7f60f019d77697c5e4e3a46f9571e1a25328b4b3 (patch)
treea15af546ffa837e02e8f3e306c55e3fb427d6a5f /src/drivers/Xlib
parent6acda521ccaa448eeb26f81a2432da586bed9b30 (diff)
Fix "fltk autotools build does not link against libXft" (#1202)
libXft was erroneously present in the link command when using Pango and Cairo. This is fixed by disconnecting the GUI scaling code from use of Xft. This commit also makes sure that when Wayland is used, pkg-config is available on the build machine. This allows to remove from file CMake/options.cmake code that was labelled with "FIXME".
Diffstat (limited to 'src/drivers/Xlib')
-rw-r--r--src/drivers/Xlib/Fl_Font.H4
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx8
2 files changed, 4 insertions, 8 deletions
diff --git a/src/drivers/Xlib/Fl_Font.H b/src/drivers/Xlib/Fl_Font.H
index 9a5e40a93..e1680df4f 100644
--- a/src/drivers/Xlib/Fl_Font.H
+++ b/src/drivers/Xlib/Fl_Font.H
@@ -1,7 +1,7 @@
//
// Font definitions for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2018 by Bill Spitzak and others.
+// Copyright 1998-2025 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -32,7 +32,7 @@ typedef struct _XftFont XftFont;
class Fl_Xlib_Font_Descriptor : public Fl_Font_Descriptor {
public:
-# if USE_XFT
+# if USE_XFT || FLTK_USE_CAIRO
# if USE_PANGO
int descent_;
int height_;
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
index 4c7b64a4c..336e4b429 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx
@@ -1,7 +1,7 @@
//
// Rectangle drawing routines for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2022 by Bill Spitzak and others.
+// Copyright 1998-2025 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -24,10 +24,6 @@
#include <string.h>
#include <stdlib.h>
-#if !USE_XFT
-extern char *fl_get_font_xfld(int fnum, int size);
-#endif
-
GC Fl_Xlib_Graphics_Driver::gc_ = NULL;
int Fl_Xlib_Graphics_Driver::fl_overlay = 0;
@@ -62,7 +58,7 @@ void Fl_Xlib_Graphics_Driver::gc(void *value) {
}
void Fl_Xlib_Graphics_Driver::scale(float f) {
-#if USE_XFT
+#if USE_XFT || FLTK_USE_CAIRO
if (f != scale()) {
size_ = 0;
Fl_Graphics_Driver::scale(f);