1
0
forked from vitrine/wmaker

Move the global dpy behind a distinct BUILD rule.

This commit is contained in:
2025-02-09 16:49:23 -05:00
parent 949ac920ce
commit 7b67e06b35
5 changed files with 20 additions and 4 deletions

View File

@@ -4,6 +4,13 @@ cc_library(
visibility = ["//visibility:public"],
)
cc_library(
name = "global_display",
hdrs = ["global_display.h"],
srcs = ["global_display.c"],
deps = ["@x11//:lib"],
)
cc_library(
name = "wconfig",
hdrs = ["wconfig.h"],

View File

@@ -284,8 +284,6 @@ enum {
/****** Global Variables ******/
extern Display *dpy;
extern struct wmaker_global_variables {
/* Tracking of the state of the program */
struct {

View File

@@ -0,0 +1,5 @@
#include "wmaker/global_display.h"
#include "X11/Xlib.h"
Display *dpy;

View File

@@ -0,0 +1,8 @@
#ifndef WGLOBAL_DISPLAY_H_
#define WGLOBAL_DISPLAY_H_
#include "X11/Xlib.h"
extern Display *dpy;
#endif // WGLOBAL_DISPLAY_H_

View File

@@ -65,8 +65,6 @@ struct wmaker_global_variables w_global;
/* general info */
Display *dpy;
char *ProgName;
struct WPreferences wPreferences;