Wayland massachusetts
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
252490e2cf
commit
89dad2c4be
1 changed files with 12 additions and 15 deletions
|
|
@ -559,7 +559,6 @@ struct zwp_relative_pointer_v1_listener relative_pointer_listener =
|
||||||
|
|
||||||
/* zwp_primary_selection_device_manager_v1 setup function */
|
/* zwp_primary_selection_device_manager_v1 setup function */
|
||||||
static wayland_protocol_t* zwp_relative_pointer_manager_v1_setup(MwU32 name, struct _MwLLWayland* wayland) {
|
static wayland_protocol_t* zwp_relative_pointer_manager_v1_setup(MwU32 name, struct _MwLLWayland* wayland) {
|
||||||
printf("Relative pointer\n");
|
|
||||||
wayland->relative_pointer_manager = wl_registry_bind(wayland->registry, name, &zwp_relative_pointer_manager_v1_interface, 1);
|
wayland->relative_pointer_manager = wl_registry_bind(wayland->registry, name, &zwp_relative_pointer_manager_v1_interface, 1);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
@ -573,17 +572,16 @@ static void zwp_relative_pointer_manager_v1_interface_destroy(struct _MwLLWaylan
|
||||||
static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time,
|
static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time,
|
||||||
wl_fixed_t surface_x, wl_fixed_t surface_y) {
|
wl_fixed_t surface_x, wl_fixed_t surface_y) {
|
||||||
MwLL self = data;
|
MwLL self = data;
|
||||||
|
MwLL topmost_parent = self;
|
||||||
MwLLMouse p;
|
MwLLMouse p;
|
||||||
(void)time;
|
(void)time;
|
||||||
(void)wl_pointer;
|
(void)wl_pointer;
|
||||||
|
|
||||||
if(self->wayland.do_lock_pointer) {
|
WAYLAND_EVENT_OP_START(self);
|
||||||
return;
|
while(topmost_parent->wayland.parent) topmost_parent = topmost_parent->wayland.parent;
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
|
@ -2446,7 +2444,6 @@ static void MwLLGrabPointerImpl(MwLL handle, int toggle) {
|
||||||
zwp_locked_pointer_v1_set_cursor_position_hint(topmost_parent->wayland.locked_pointer, 0, CSD_BORDER_FRAME_TOP);
|
zwp_locked_pointer_v1_set_cursor_position_hint(topmost_parent->wayland.locked_pointer, 0, CSD_BORDER_FRAME_TOP);
|
||||||
handle->wayland.relative_pointer = zwp_relative_pointer_manager_v1_get_relative_pointer(handle->wayland.relative_pointer_manager, handle->wayland.pointer);
|
handle->wayland.relative_pointer = zwp_relative_pointer_manager_v1_get_relative_pointer(handle->wayland.relative_pointer_manager, handle->wayland.pointer);
|
||||||
zwp_relative_pointer_v1_add_listener(handle->wayland.relative_pointer, &relative_pointer_listener, topmost_parent);
|
zwp_relative_pointer_v1_add_listener(handle->wayland.relative_pointer, &relative_pointer_listener, topmost_parent);
|
||||||
printf("%p\n", handle->wayland.relative_pointer);
|
|
||||||
} else {
|
} else {
|
||||||
if(topmost_parent->wayland.locked_pointer) {
|
if(topmost_parent->wayland.locked_pointer) {
|
||||||
zwp_locked_pointer_v1_destroy(topmost_parent->wayland.locked_pointer);
|
zwp_locked_pointer_v1_destroy(topmost_parent->wayland.locked_pointer);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue