while we're at it we haven't needed the 'valid' checks for awhile
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
IoIxD 2026-09-28 12:12:19 -07:00
commit f3cb2fe15a
2 changed files with 21 additions and 34 deletions

View file

@ -381,7 +381,6 @@ struct _MwLLWayland {
struct zwp_relative_pointer_v1* relative_pointer;
struct zwp_locked_pointer_v1* locked_pointer;
MwBool pointer_constrained;
MwBool valid;
#ifdef USE_DBUS
MwLLDBusContext dbus;

View file

@ -951,7 +951,6 @@ static void widget_setup(MwLL r, MwLL parent, int x, int y, int width, int heigh
r->wayland.x = x;
r->wayland.y = y;
r->wayland.parent = parent;
r->wayland.valid = MwTRUE;
if(ty == MwLL_WAYLAND_UNKNOWN) {
if(parent == NULL) {
@ -1152,7 +1151,6 @@ static void MwLLDestroyImpl(MwLL handle) {
}
#endif
if(handle->wayland.valid) {
if(handle->wayland.cursor.setup) {
MwLLWaylandBufferDestroy(&handle->wayland.cursor);
wl_surface_destroy(handle->wayland.cursor.surface);
@ -1177,9 +1175,6 @@ static void MwLLDestroyImpl(MwLL handle) {
wl_display_disconnect(handle->wayland.display);
handle->wayland.display = NULL;
}
} else {
printf("widget invalid\n");
}
if(handle->wayland.icon_pixmap) MwLLDestroyPixmap(handle->wayland.icon_pixmap);
if(handle->wayland.snapshot) cairo_surface_destroy(handle->wayland.snapshot);
@ -1198,13 +1193,6 @@ static void MwLLDestroyImpl(MwLL handle) {
}
static void MwLLGetXYWHImpl(MwLL handle, int* x, int* y, unsigned int* w, unsigned int* h) {
if(!handle->wayland.valid) {
*x = 0;
*y = 0;
*w = 1;
*h = 1;
return;
}
*x = handle->wayland.x;
*y = handle->wayland.y;
*w = handle->wayland.ww;