wayland: prevent xdg_toplevel_configure from firing too often
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
IoIxD 2026-04-19 21:12:39 -07:00
commit 0788297ed3
2 changed files with 19 additions and 12 deletions

View file

@ -502,9 +502,11 @@ struct _MwLLWayland {
MwU32 ww, wh; /* Window position */
MwPoint cur_mouse_pos; /* Currently known mouse position */
int resizing;
MwU32 mw, mh; /* Monitor width and height as advertised by wl_output.mode */
MwLL parent;
MwLL parent;
MwLL* children;
MwBool force_render;

View file

@ -1162,21 +1162,24 @@ static void xdg_toplevel_configure(void* data,
self->wayland.ww = width;
self->wayland.wh = height;
xdg_surface_set_window_geometry(self->wayland.toplevel->xdg_surface, 0, 0, self->wayland.ww, self->wayland.wh);
if(self->wayland.resizing == 0) {
xdg_surface_set_window_geometry(self->wayland.toplevel->xdg_surface, 0, 0, self->wayland.ww, self->wayland.wh);
backbuffer_destroy(&self->wayland);
backbuffer_setup(&self->wayland);
framebuffer_destroy(&self->wayland);
framebuffer_setup(&self->wayland);
backbuffer_destroy(&self->wayland);
backbuffer_setup(&self->wayland);
framebuffer_destroy(&self->wayland);
framebuffer_setup(&self->wayland);
region_setup(self);
MwLLDispatch(self, resize, NULL);
region_setup(self);
MwLLDispatch(self, resize, NULL);
recursive_dispatch_resize(self);
recursive_dispatch_resize(self);
if(self->wayland.pointer_constrained) {
zwp_locked_pointer_v1_set_cursor_position_hint(self->wayland.locked_pointer, 0, CSD_BORDER_FRAME_TOP);
wl_surface_commit(self->wayland.framebuffer.surface);
if(self->wayland.pointer_constrained) {
zwp_locked_pointer_v1_set_cursor_position_hint(self->wayland.locked_pointer, 0, CSD_BORDER_FRAME_TOP);
wl_surface_commit(self->wayland.framebuffer.surface);
}
self->wayland.resizing = 1;
}
};
@ -2220,6 +2223,8 @@ static int MwLLPendingImpl(MwLL handle) {
};
int pending = 0;
handle->wayland.resizing = 0;
#ifdef USE_DBUS
if(wl_call_tbl.has_dbus) {
if(handle->wayland.dark_theme_detection) {