Skip to content

Commit

Permalink
event: don't set pending update for unmapped windows
Browse files Browse the repository at this point in the history
Their updates will be handled when they are mapped.

Signed-off-by: Yuxuan Shui <[email protected]>
  • Loading branch information
yshui committed Jul 31, 2024
1 parent 968ff4c commit aa4af52
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,14 +380,14 @@ static void configure_win(session_t *ps, xcb_configure_notify_event_t *ce) {
return;
}

add_damage_from_win(ps, w);

ps->pending_updates |=
win_set_pending_geometry(w, win_geometry_from_configure_notify(ce));

// override_redirect flag cannot be changed after window creation, as far
// as I know, so there's no point to re-match windows here.
bool changed = win_set_pending_geometry(w, win_geometry_from_configure_notify(ce)) |
(w->a.override_redirect != ce->override_redirect);
w->a.override_redirect = ce->override_redirect;

if (w->state == WSTATE_MAPPED) {
add_damage_from_win(ps, w);
ps->pending_updates |= changed;
}
}

static inline void ev_configure_notify(session_t *ps, xcb_configure_notify_event_t *ev) {
Expand Down

0 comments on commit aa4af52

Please sign in to comment.