summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrestis Floros <orestisflo@gmail.com>2020-01-25 15:59:37 +0100
committerOrestis Floros <orestisflo@gmail.com>2020-02-01 17:32:54 +0100
commite9f011397a508b4e3d75fd5fb46e06a87d84348e (patch)
treeaaae2827201b2d6cd3bc8508dc00f10cb9c94759
parentd11e862919241bb5738f4e01ef226e0a4135eade (diff)
downloadi3-e9f011397a508b4e3d75fd5fb46e06a87d84348e.tar.gz
i3-e9f011397a508b4e3d75fd5fb46e06a87d84348e.zip
libi3: Make visual_type extern
See #3914
-rw-r--r--i3-config-wizard/main.c1
-rw-r--r--i3-input/main.c5
-rw-r--r--i3-nagbar/main.c5
-rw-r--r--libi3/draw_util.c2
4 files changed, 8 insertions, 5 deletions
diff --git a/i3-config-wizard/main.c b/i3-config-wizard/main.c
index 7c1f00a3..f999de30 100644
--- a/i3-config-wizard/main.c
+++ b/i3-config-wizard/main.c
@@ -68,6 +68,7 @@
} while (0)
#include "xcb.h"
+xcb_visualtype_t *visual_type = NULL;
#include "libi3.h"
#define TEXT_PADDING logical_px(4)
diff --git a/i3-input/main.c b/i3-input/main.c
index f15a74ab..e495fe10 100644
--- a/i3-input/main.c
+++ b/i3-input/main.c
@@ -8,8 +8,6 @@
* to i3.
*
*/
-#include "libi3.h"
-
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
@@ -27,6 +25,9 @@
#include <xcb/xcb_event.h>
#include <xcb/xcb_keysyms.h>
+xcb_visualtype_t *visual_type = NULL;
+#include "libi3.h"
+
#include <X11/keysym.h>
#include "keysym2ucs.h"
diff --git a/i3-nagbar/main.c b/i3-nagbar/main.c
index c7b23da5..5099cf54 100644
--- a/i3-nagbar/main.c
+++ b/i3-nagbar/main.c
@@ -8,8 +8,6 @@
* when the user has an error in their configuration file.
*
*/
-#include "libi3.h"
-
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -32,6 +30,9 @@
#include <xcb/randr.h>
#include <xcb/xcb_cursor.h>
+xcb_visualtype_t *visual_type = NULL;
+#include "libi3.h"
+
#define SN_API_NOT_YET_FROZEN 1
#include <libsn/sn-launchee.h>
diff --git a/libi3/draw_util.c b/libi3/draw_util.c
index f88360dc..092ac967 100644
--- a/libi3/draw_util.c
+++ b/libi3/draw_util.c
@@ -16,7 +16,7 @@
#include <cairo/cairo-xcb.h>
/* The default visual_type to use if none is specified when creating the surface. Must be defined globally. */
-xcb_visualtype_t *visual_type;
+extern xcb_visualtype_t *visual_type;
/* Forward declarations */
static void draw_util_set_source_color(surface_t *surface, color_t color);