fix clipboard
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
IoIxD 2026-03-23 13:38:26 -07:00
commit f4072bcb3f
2 changed files with 6 additions and 4 deletions

View file

@ -29,7 +29,6 @@ void clipboard(MwWidget handle, void* user_data, void* call_data) {
(void)handle;
(void)user_data;
printf("got: %s\n", clipboard);
if(clipboard != NULL) {
MwVaApply(text, MwNtext, clipboard, NULL);
MwForceRender(text);
@ -52,6 +51,8 @@ int main() {
MwAddUserHandler(window, MwNresizeHandler, resize, NULL);
MwAddUserHandler(window, MwNclipboardHandler, clipboard, NULL);
MwAddUserHandler(instructions, MwNclipboardHandler, clipboard, NULL);
MwAddUserHandler(text, MwNclipboardHandler, clipboard, NULL);
resize(window, NULL, NULL);

View file

@ -228,8 +228,6 @@ static void wl_clipboard_read(wl_clipboard_device_context_t* ctx) {
arrpush(buf, 0);
close(fds[0]);
printf("sending: %s\n", buf);
MwLLDispatch(ctx->ll, clipboard, buf);
arrfree(buf);
@ -470,7 +468,10 @@ static void pointer_button(void* data, struct wl_pointer* wl_pointer, MwU32 seri
p.point = self->wayland.cur_mouse_pos;
if(self->wayland.framebuffer.surface == self->wayland.curSurface || self->wayland.backbuffer.surface == self->wayland.curSurface) {
// p.point.x > x && p.point.x < x + self->wayland.ww && p.point.y > y && p.point.y < y + self->wayland.wh
if(
self->wayland.framebuffer.surface == self->wayland.curSurface ||
self->wayland.backbuffer.surface == self->wayland.curSurface) {
int i;
switch(button) {