oops! fix csd not working
Some checks are pending
pyrite-dev/milsko/pipeline/head Build started...

This commit is contained in:
IoIxD 2026-09-21 12:01:23 -07:00
commit 9420878b93

View file

@ -692,9 +692,9 @@ static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time
inArea |= self->wayland.framebuffer.surface == curSurface; inArea |= self->wayland.framebuffer.surface == curSurface;
} }
// if(self->wayland.backbuffer.surface) { if(self->wayland.backbuffer.surface) {
// inArea |= self->wayland.backbuffer.surface == curSurface; inArea |= self->wayland.backbuffer.surface == curSurface;
// } }
self->wayland.cur_mouse_pos.x = wl_fixed_to_int(surface_x); self->wayland.cur_mouse_pos.x = wl_fixed_to_int(surface_x);
self->wayland.cur_mouse_pos.y = wl_fixed_to_int(surface_y); self->wayland.cur_mouse_pos.y = wl_fixed_to_int(surface_y);
@ -854,30 +854,30 @@ static void pointer_button(void* data, struct wl_pointer* wl_pointer, MwU32 seri
inArea |= self->wayland.framebuffer.surface == curSurface; inArea |= self->wayland.framebuffer.surface == curSurface;
} }
if(inArea) { switch(button) {
switch(button) { case BTN_LEFT:
case BTN_LEFT: p.button = MwMOUSE_LEFT;
p.button = MwMOUSE_LEFT; break;
break; case BTN_MIDDLE:
case BTN_MIDDLE: p.button = MwMOUSE_MIDDLE;
p.button = MwMOUSE_MIDDLE; break;
break; case BTN_RIGHT:
case BTN_RIGHT: p.button = MwMOUSE_RIGHT;
p.button = MwMOUSE_RIGHT; break;
break; }
}
self->wayland.held_down = state == WL_POINTER_BUTTON_STATE_PRESSED;
if(inArea) {
self->wayland.held_down = state == WL_POINTER_BUTTON_STATE_PRESSED;
arrsetlen(self->wayland.currentlyHeldWidgets, 0); arrsetlen(self->wayland.currentlyHeldWidgets, 0);
mouse_dispatch(self, p, state); mouse_dispatch(self, p, state);
}
if(self->wayland.backbuffer.surface) { if(self->wayland.backbuffer.surface) {
if(!self->wayland.has_decorations && self->wayland.do_csd) { if(!self->wayland.has_decorations && self->wayland.do_csd) {
if(state != WL_POINTER_BUTTON_STATE_RELEASED) if(state != WL_POINTER_BUTTON_STATE_RELEASED)
xdg_borderless_step_mdown(self, p, serial); xdg_borderless_step_mdown(self, p, serial);
else else
xdg_borderless_step_mup(self, p, serial); xdg_borderless_step_mup(self, p, serial);
}
} }
} }