wayland: only update cursor coord if its on the currentlyHeldWidget OR if there is no currentlyHeldW
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
b025f46507
commit
0b7f8d3f67
1 changed files with 3 additions and 4 deletions
|
|
@ -615,14 +615,13 @@ static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time
|
||||||
WAYLAND_EVENT_OP_START(self);
|
WAYLAND_EVENT_OP_START(self);
|
||||||
while(topmost_parent->wayland.parent) topmost_parent = topmost_parent->wayland.parent;
|
while(topmost_parent->wayland.parent) topmost_parent = topmost_parent->wayland.parent;
|
||||||
|
|
||||||
if(currentlyHeldWidget) {
|
if(currentlyHeldWidget == self || !currentlyHeldWidget) {
|
||||||
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);
|
||||||
p.point = self->wayland.cur_mouse_pos;
|
p.point = self->wayland.cur_mouse_pos;
|
||||||
MwLLDispatch(self, move, &p);
|
MwLLDispatch(self, move, &p);
|
||||||
MwLLDispatch(currentlyHeldWidget, down, &p);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(self->wayland.framebuffer.surface) {
|
if(self->wayland.framebuffer.surface) {
|
||||||
inArea |= self->wayland.framebuffer.surface == curSurface;
|
inArea |= self->wayland.framebuffer.surface == curSurface;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue