wayland: yeah this is just fucked
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
This commit is contained in:
parent
daced7a897
commit
5c74e65516
3 changed files with 12 additions and 9 deletions
|
|
@ -562,6 +562,8 @@ struct _MwLLWayland {
|
||||||
cairo_t* back_cairo;
|
cairo_t* back_cairo;
|
||||||
/* The cairo to actually use for draw operations. Typically is front_cairo, but MwLLBeginDraw can change this to the back_cairo so it can be used to draw window decorations. */
|
/* The cairo to actually use for draw operations. Typically is front_cairo, but MwLLBeginDraw can change this to the back_cairo so it can be used to draw window decorations. */
|
||||||
cairo_t* selected_cairo;
|
cairo_t* selected_cairo;
|
||||||
|
|
||||||
|
MwBool is_subwindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _MwLLWaylandColor {
|
struct _MwLLWaylandColor {
|
||||||
|
|
|
||||||
|
|
@ -495,7 +495,6 @@ static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time
|
||||||
MwLL topmost_parent = self;
|
MwLL topmost_parent = self;
|
||||||
MwMouse p;
|
MwMouse p;
|
||||||
MwBool inArea = MwFALSE;
|
MwBool inArea = MwFALSE;
|
||||||
MwBool h = MwFALSE;
|
|
||||||
MwLL currentlyHeldWidget = NULL;
|
MwLL currentlyHeldWidget = NULL;
|
||||||
|
|
||||||
(void)time;
|
(void)time;
|
||||||
|
|
@ -514,20 +513,18 @@ static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time
|
||||||
inArea |= self->wayland.backbuffer.surface == curSurface;
|
inArea |= self->wayland.backbuffer.surface == curSurface;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(currentlyHeldWidget) {
|
|
||||||
currentlyHeldWidget->wayland.cur_mouse_pos.x = wl_fixed_to_int(surface_x);
|
|
||||||
currentlyHeldWidget->wayland.cur_mouse_pos.y = wl_fixed_to_int(surface_y);
|
|
||||||
p.point = currentlyHeldWidget->wayland.cur_mouse_pos;
|
|
||||||
MwLLDispatch(currentlyHeldWidget, down, &p);
|
|
||||||
h = MwTRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(inArea) {
|
if(inArea) {
|
||||||
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);
|
||||||
|
|
||||||
wl_pointer_set_cursor(self->wayland.pointer, self->wayland.pointer_serial, self->wayland.cursor.surface, 0, 0);
|
wl_pointer_set_cursor(self->wayland.pointer, self->wayland.pointer_serial, self->wayland.cursor.surface, 0, 0);
|
||||||
|
} else if(currentlyHeldWidget == self) {
|
||||||
|
currentlyHeldWidget->wayland.cur_mouse_pos.x = wl_fixed_to_int(surface_x);
|
||||||
|
currentlyHeldWidget->wayland.cur_mouse_pos.y = wl_fixed_to_int(surface_y);
|
||||||
|
p.point = currentlyHeldWidget->wayland.cur_mouse_pos;
|
||||||
|
MwLLDispatch(currentlyHeldWidget, move, &p);
|
||||||
}
|
}
|
||||||
|
|
||||||
WAYLAND_EVENT_OP_END(self);
|
WAYLAND_EVENT_OP_END(self);
|
||||||
|
|
|
||||||
|
|
@ -279,6 +279,10 @@ static int wcreate(MwWidget handle) {
|
||||||
|
|
||||||
MwSetDefault(handle);
|
MwSetDefault(handle);
|
||||||
|
|
||||||
|
if(handle->lowlevel->common.type == MwLLBackendWayland) {
|
||||||
|
handle->lowlevel->wayland.is_subwindow = MwTRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue