ref: 2894b8f250339d56c4970a985d9f878bae91b138
parent: dd78daef41e76d4ec915afc6b468800510c077d9
author: Jacob Moody <moody@posixcafe.org>
date: Wed Oct 13 14:38:12 EDT 2021
cleanup
--- a/gui-wl/wl-cb.c
+++ b/gui-wl/wl-cb.c
@@ -517,7 +517,7 @@
wl_registry_add_listener(registry, ®istry_listener, wl);
wl_display_roundtrip(wl->display);
wl->xkb_context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
-
+
if(wl->shm == nil || wl->compositor == nil || wl->xdg_wm_base == nil || wl->seat == nil || wl->decoman == nil)
sysfatal("Registration fell short");
--- a/gui-wl/wl-screen.c
+++ b/gui-wl/wl-screen.c
@@ -25,10 +25,8 @@
#undef close
-static Wlwin *snarfwin;
+static Wlwin *gwin;
-static int clientruning;
-
Memimage *gscreen;
static Wlwin*
@@ -98,7 +96,7 @@
Wlwin *wl;
wl = newwlwin();
- snarfwin = wl;
+ gwin = wl;
wl->display = wl_display_connect(NULL);
if(wl->display == nil)
sysfatal("could not connect to display");
@@ -138,9 +136,6 @@
Memdata*
attachscreen(Rectangle *r, ulong *chan, int *depth, int *width, int *softscreen)
{
- Wlwin *wl;
-
- wl = snarfwin;
*r = gscreen->clipr;
*chan = gscreen->chan;
*depth = gscreen->depth;
@@ -156,7 +151,7 @@
{
Wlwin *wl;
- wl = snarfwin;
+ wl = gwin;
wl->dirty = 1;
wlflush(wl);
}
@@ -164,7 +159,7 @@
void
screensize(Rectangle r, ulong chan)
{
- snarfwin->dirty = 1;
+ gwin->dirty = 1;
}
void
@@ -171,7 +166,7 @@
setcursor(void)
{
qlock(&drawlock);
- wldrawcursor(snarfwin, &cursor);
+ wldrawcursor(gwin, &cursor);
qunlock(&drawlock);
}
@@ -183,13 +178,13 @@
char*
clipread(void)
{
- return wlgetsnarf(snarfwin);
+ return wlgetsnarf(gwin);
}
int
clipwrite(char *data)
{
- wlsetsnarf(snarfwin, data);
+ wlsetsnarf(gwin, data);
return strlen(data);
}
--- a/gui-wl/wl-util.c
+++ b/gui-wl/wl-util.c
@@ -42,7 +42,7 @@
static int
wlcreateshm(off_t size)
{
- char name[] = "/devdraw--XXXXXX";
+ char name[] = "/drawterm--XXXXXX";
int retries = 100;
int fd;
--- a/kern/devaudio-pipewire.c
+++ b/kern/devaudio-pipewire.c
@@ -50,7 +50,7 @@
buf->datas[0].chunk->offset = 0;
buf->datas[0].chunk->stride = sizeof(int16_t) * 2;
buf->datas[0].chunk->size = pwstate.written;
-
+
pw_stream_queue_buffer(pwstate.output, b);
pwstate.written = 0;
unlock(&pwstate.lk);
@@ -68,7 +68,6 @@
struct pw_main_loop *loop;
loop = arg;
- fprintf(stderr, "running main pipewire loop\n");
pw_main_loop_run(loop);
}
@@ -75,11 +74,10 @@
void
audiodevopen(void)
{
- struct spa_pod *params[1];
+ const struct spa_pod *params[1];
struct spa_pod_builder b = SPA_POD_BUILDER_INIT(pwstate.buf, sizeof(pwstate.buf));
int err;
- fprintf(stderr, "opening...\n");
lock(&pwstate.lk);
if(pwstate.init > 0){
kproc("pipewire main loop", pwproc, pwstate.loop);
@@ -88,8 +86,7 @@
}
pwstate.init++;
- fprintf(stderr, "initint...\n");
- pw_init(&argc, &argv);
+ pw_init(&argc, (char***)&argv);
pwstate.loop = pw_main_loop_new(NULL);
if(pwstate.loop == NULL)
sysfatal("could not create loop");