On Tue, Oct 17, 2017 at 04:18:51PM +0200, Quentin Glidic wrote: > From: Quentin Glidic <[email protected]> > > If a surface is in state A, and we just sent a configure for state B, > setting back state A would be ignored, because state B has not been > committed yet. > Since we only send a configure event if the state was different, > consider pending as different if the configure list is not empty. > > Reported on wlroots https://github.com/swaywm/wlroots/pull/280 > > Signed-off-by: Quentin Glidic <[email protected]>
While this will fix it, wouldn't it be better to compare with the "scheduled" state if any (last of the configured ones), then the current state if no scheduled state is available, instead of always the current state? Because with this patch, you'd send new configure events for non-changes as long as you have one or more configure events in the queue. Jonas > --- > libweston-desktop/xdg-shell-v6.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/libweston-desktop/xdg-shell-v6.c > b/libweston-desktop/xdg-shell-v6.c > index d82a507fa..2abd02a3e 100644 > --- a/libweston-desktop/xdg-shell-v6.c > +++ b/libweston-desktop/xdg-shell-v6.c > @@ -906,6 +906,9 @@ weston_desktop_xdg_toplevel_state_compare(struct > weston_desktop_xdg_toplevel *to > if (!toplevel->base.configured) > return false; > > + if (!wl_list_empty(&toplevel->base.configure_list)) > + return false; > + > if (toplevel->pending.state.activated != > toplevel->current.state.activated) > return false; > if (toplevel->pending.state.fullscreen != > toplevel->current.state.fullscreen) > -- > 2.13.4 > > _______________________________________________ > wayland-devel mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/wayland-devel _______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
