diff --git a/src/backend/gl/glx.c b/src/backend/gl/glx.c index e826273..2b58abc 100644 --- a/src/backend/gl/glx.c +++ b/src/backend/gl/glx.c @@ -10,7 +10,6 @@ * */ -#include #include #include #include diff --git a/src/backend/gl/glx.h b/src/backend/gl/glx.h index 0c2bb7a..ec80749 100644 --- a/src/backend/gl/glx.h +++ b/src/backend/gl/glx.h @@ -2,8 +2,10 @@ // Copyright (c) Yuxuan Shui #pragma once #include +// Older version of glx.h defines function prototypes... +#define glXSwapIntervalMESA glXSwapIntervalMESA_ #include -#include +#undef glXSwapIntervalMESA #include #include #include diff --git a/src/common.h b/src/common.h index 0dd4d5e..d985e73 100644 --- a/src/common.h +++ b/src/common.h @@ -54,7 +54,7 @@ #ifdef CONFIG_OPENGL // libGL -#include +#include "backend/gl/glx.h" // Workarounds for missing definitions in some broken GL drivers, thanks to // douglasp and consolers for reporting diff --git a/src/compton.c b/src/compton.c index 822eee6..69fc4d8 100644 --- a/src/compton.c +++ b/src/compton.c @@ -25,7 +25,6 @@ #include #include #include -#include #include diff --git a/src/compton.modulemap b/src/compton.modulemap index 70942af..54ddbf5 100644 --- a/src/compton.modulemap +++ b/src/compton.modulemap @@ -70,6 +70,7 @@ module backend { } module glx { header "backend/gl/glx.h" + export GL.glx } } module backend { diff --git a/src/log.c b/src/log.c index 8def237..b23e300 100644 --- a/src/log.c +++ b/src/log.c @@ -9,7 +9,8 @@ #include #ifdef CONFIG_OPENGL -#include +#include +#include "backend/gl/glx.h" #include "backend/gl/gl_common.h" #endif diff --git a/src/opengl.c b/src/opengl.c index c129d67..7ad7a59 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -11,7 +11,6 @@ #include #include -#include #include #include #include diff --git a/src/opengl.h b/src/opengl.h index fc93f9e..f496b01 100644 --- a/src/opengl.h +++ b/src/opengl.h @@ -24,7 +24,7 @@ #include #include #include -#include +#include bool glx_dim_dst(session_t *ps, int dx, int dy, int width, int height, float z, diff --git a/src/render.c b/src/render.c index caca172..cc65937 100644 --- a/src/render.c +++ b/src/render.c @@ -13,7 +13,7 @@ #include "options.h" #ifdef CONFIG_OPENGL -#include +#include "backend/gl/glx.h" #include "opengl.h" #endif @@ -29,7 +29,6 @@ #include "x.h" #include "backend/backend_common.h" -#include "backend/gl/glx.h" #include "render.h" /** diff --git a/src/render.h b/src/render.h index cba6a29..85dff4a 100644 --- a/src/render.h +++ b/src/render.h @@ -6,7 +6,6 @@ #include #include #ifdef CONFIG_OPENGL -#include #include "backend/gl/glx.h" #endif #include "region.h" diff --git a/src/vsync.c b/src/vsync.c index 5acf083..1ea1811 100644 --- a/src/vsync.c +++ b/src/vsync.c @@ -3,8 +3,6 @@ /// Function pointers to init VSync modes. -#include - #include "common.h" #include "log.h" diff --git a/src/x.c b/src/x.c index fee9d0d..1b1b453 100644 --- a/src/x.c +++ b/src/x.c @@ -12,7 +12,6 @@ #include #include #include -#include #include "utils.h" #include "region.h" @@ -20,6 +19,7 @@ #include "common.h" #include "x.h" #include "log.h" +#include "backend/gl/glx.h" /** * Get a specific attribute of a window.