(change) move child_pid, dpy globals to lib/crywl.c

This commit is contained in:
Emile Clark-Boman 2025-08-27 18:24:17 +10:00
parent f4fa50d4bf
commit 2e3eb0cf6e
3 changed files with 5 additions and 3 deletions

View file

@ -1,12 +1,13 @@
#include "sys/types.h" #include <stddef.h>
#include <sys/wait.h>
#include "crywl.h" #include "crywl.h"
/* Static Variables */ /* Static Variables */
static struct wl_display *dpy;
static pid_t child_pid = -1; static pid_t child_pid = -1;
void chvt(const Arg *arg) { wlr_session_change_vt(session, arg->ui); } void chvt(const Arg *arg) { wlr_session_change_vt(session, arg->ui); }
void cleanup(void) { void cleanup(void) {

View file

@ -2,6 +2,8 @@
#ifndef CRYWL_H #ifndef CRYWL_H
#define CRYWL_H #define CRYWL_H
#include "util.h"
/* ===== Functional Declarations ===== */ /* ===== Functional Declarations ===== */
static void chvt(const Arg *arg); static void chvt(const Arg *arg);
static void cleanup(void); static void cleanup(void);

View file

@ -74,7 +74,6 @@
/* variables */ /* variables */
static int locked; static int locked;
static void *exclusive_focus; static void *exclusive_focus;
static struct wl_display *dpy;
static struct wl_event_loop *event_loop; static struct wl_event_loop *event_loop;
static struct wlr_backend *backend; static struct wlr_backend *backend;
static struct wlr_scene *scene; static struct wlr_scene *scene;