This commit is contained in:
parent
e8d692f05a
commit
9420878b93
1 changed files with 22 additions and 22 deletions
|
|
@ -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,7 +854,6 @@ 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;
|
||||||
|
|
@ -866,10 +865,12 @@ static void pointer_button(void* data, struct wl_pointer* wl_pointer, MwU32 seri
|
||||||
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) {
|
||||||
|
|
@ -879,7 +880,6 @@ static void pointer_button(void* data, struct wl_pointer* wl_pointer, MwU32 seri
|
||||||
xdg_borderless_step_mup(self, p, serial);
|
xdg_borderless_step_mup(self, p, serial);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
MwLLForceRender(self);
|
MwLLForceRender(self);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue