wayland: yeah this is just fucked
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit

This commit is contained in:
IoIxD 2026-05-05 18:30:09 -07:00
commit 5c74e65516
3 changed files with 12 additions and 9 deletions

View file

@ -562,6 +562,8 @@ struct _MwLLWayland {
cairo_t* back_cairo;
/* The cairo to actually use for draw operations. Typically is front_cairo, but MwLLBeginDraw can change this to the back_cairo so it can be used to draw window decorations. */
cairo_t* selected_cairo;
MwBool is_subwindow;
};
struct _MwLLWaylandColor {

View file

@ -495,7 +495,6 @@ static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time
MwLL topmost_parent = self;
MwMouse p;
MwBool inArea = MwFALSE;
MwBool h = MwFALSE;
MwLL currentlyHeldWidget = NULL;
(void)time;
@ -514,20 +513,18 @@ static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time
inArea |= self->wayland.backbuffer.surface == curSurface;
}
if(currentlyHeldWidget) {
currentlyHeldWidget->wayland.cur_mouse_pos.x = wl_fixed_to_int(surface_x);
currentlyHeldWidget->wayland.cur_mouse_pos.y = wl_fixed_to_int(surface_y);
p.point = currentlyHeldWidget->wayland.cur_mouse_pos;
MwLLDispatch(currentlyHeldWidget, down, &p);
h = MwTRUE;
}
if(inArea) {
self->wayland.cur_mouse_pos.x = wl_fixed_to_int(surface_x);
self->wayland.cur_mouse_pos.y = wl_fixed_to_int(surface_y);
p.point = self->wayland.cur_mouse_pos;
MwLLDispatch(self, move, &p);
wl_pointer_set_cursor(self->wayland.pointer, self->wayland.pointer_serial, self->wayland.cursor.surface, 0, 0);
} else if(currentlyHeldWidget == self) {
currentlyHeldWidget->wayland.cur_mouse_pos.x = wl_fixed_to_int(surface_x);
currentlyHeldWidget->wayland.cur_mouse_pos.y = wl_fixed_to_int(surface_y);
p.point = currentlyHeldWidget->wayland.cur_mouse_pos;
MwLLDispatch(currentlyHeldWidget, move, &p);
}
WAYLAND_EVENT_OP_END(self);

View file

@ -279,6 +279,10 @@ static int wcreate(MwWidget handle) {
MwSetDefault(handle);
if(handle->lowlevel->common.type == MwLLBackendWayland) {
handle->lowlevel->wayland.is_subwindow = MwTRUE;
}
return 0;
}