WPrefs/wayland: fix icon preview one-click-behind with extra dispatch

WINGs button callbacks trigger wl_redisplay which commits the client
surface, but the compositor only processes that commit on the next
wl_event_loop_dispatch. Add a zero-timeout dispatch after handling
WINGs events so client commits are processed immediately, making
the next scheduled frame render the updated content.

Also revert posF redisplay back to posVF (posF caused gray flash).
This commit is contained in:
Window Maker 2026-05-25 12:49:00 +02:00
parent 04e84310df
commit f1ded24294
2 changed files with 8 additions and 2 deletions

View File

@ -142,8 +142,7 @@ static void showIconLayout(WMWidget * widget, void *data)
break;
}
/* Force full redisplay of the entire icon position panel */
WMRedisplayWidget(panel->posF);
WMRedisplayWidget(panel->posVF);
}
static void minipreview_slider_changed(WMWidget *w, void *data)

View File

@ -3702,10 +3702,17 @@ wl_event_loop_run(void)
void *ectx = wmscr->eventBackendCtx;
WMEvent wev;
int limit = 64;
int handled = 0;
while (be->pending(ectx) && limit-- > 0) {
be->fetch(ectx, &wev);
WMHandleEvent(&wev);
handled++;
}
/* If WINGs events were processed (which may trigger client
* surface commits via wl_redisplay), do another short dispatch
* to process those commits so the next frame renders them. */
if (handled)
wl_event_loop_dispatch(loop, 0);
}
}
}