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,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);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue