mirror of
https://github.com/yshui/picom.git
synced 2025-02-10 15:45:57 -05:00
win: update screen after win_on_win_size_change
win_update_screen needs w->widthb/heightb, which is only updated in win_on_win_size_change Related: #554 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
3c38b36f04
commit
af99101757
1 changed files with 18 additions and 15 deletions
33
src/win.c
33
src/win.c
|
@ -472,21 +472,21 @@ void win_process_update_flags(session_t *ps, struct managed_win *w) {
|
|||
// Update window geometry
|
||||
w->g = w->pending_g;
|
||||
|
||||
if (win_check_flags_all(w, WIN_FLAGS_SIZE_STALE)) {
|
||||
win_on_win_size_change(ps, w);
|
||||
win_update_bounding_shape(ps, w);
|
||||
damaged = true;
|
||||
win_clear_flags(w, WIN_FLAGS_SIZE_STALE);
|
||||
}
|
||||
|
||||
if (win_check_flags_all(w, WIN_FLAGS_POSITION_STALE)) {
|
||||
damaged = true;
|
||||
win_clear_flags(w, WIN_FLAGS_POSITION_STALE);
|
||||
}
|
||||
|
||||
win_update_screen(ps->xinerama_nscrs, ps->xinerama_scr_regs, w);
|
||||
}
|
||||
|
||||
if (win_check_flags_all(w, WIN_FLAGS_SIZE_STALE)) {
|
||||
win_on_win_size_change(ps, w);
|
||||
win_update_bounding_shape(ps, w);
|
||||
damaged = true;
|
||||
win_clear_flags(w, WIN_FLAGS_SIZE_STALE);
|
||||
}
|
||||
|
||||
if (win_check_flags_all(w, WIN_FLAGS_POSITION_STALE)) {
|
||||
damaged = true;
|
||||
win_clear_flags(w, WIN_FLAGS_POSITION_STALE);
|
||||
}
|
||||
|
||||
if (win_check_flags_all(w, WIN_FLAGS_PROPERTY_STALE)) {
|
||||
win_update_properties(ps, w);
|
||||
win_clear_flags(w, WIN_FLAGS_PROPERTY_STALE);
|
||||
|
@ -2327,12 +2327,15 @@ void win_update_screen(int nscreens, region_t *screens, struct managed_win *w) {
|
|||
if (e->x1 <= w->g.x && e->y1 <= w->g.y && e->x2 >= w->g.x + w->widthb &&
|
||||
e->y2 >= w->g.y + w->heightb) {
|
||||
w->xinerama_scr = i;
|
||||
log_debug("Window %#010x (%s), %dx%d+%dx%d, is on screen %d",
|
||||
w->base.id, w->name, w->g.x, w->g.y, w->g.width,
|
||||
w->g.height, i);
|
||||
log_debug("Window %#010x (%s), %dx%d+%dx%d, is on screen %d "
|
||||
"(%dx%d+%dx%d)",
|
||||
w->base.id, w->name, w->g.x, w->g.y, w->widthb, w->heightb,
|
||||
i, e->x1, e->y1, e->x2 - e->x1, e->y2 - e->y1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
log_debug("Window %#010x (%s), %dx%d+%dx%d, is not contained by any screen",
|
||||
w->base.id, w->name, w->g.x, w->g.y, w->g.width, w->g.height);
|
||||
}
|
||||
|
||||
/// Map an already registered window
|
||||
|
|
Loading…
Add table
Reference in a new issue