Skip to content

Commit

Permalink
wm/win: remove an unused field of struct win
Browse files Browse the repository at this point in the history
Signed-off-by: Yuxuan Shui <[email protected]>
  • Loading branch information
yshui committed Oct 16, 2024
1 parent 035d28a commit 8065c1f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 23 deletions.
1 change: 0 additions & 1 deletion src/picom.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,6 @@ static bool paint_preprocess(session_t *ps, bool *animation, struct win **out_bo
unredir_possible = true;
}

w->prev_trans = bottom;
bottom = w;

// If the screen is not redirected check if the window's unredir setting
Expand Down
18 changes: 0 additions & 18 deletions src/wm/win.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,14 +477,6 @@ void win_process_image_flags(session_t *ps, struct win *w) {
return;
}

if (!win_check_flags_any(w, WIN_FLAGS_PIXMAP_STALE) ||
win_check_flags_all(w, WIN_FLAGS_PIXMAP_ERROR) ||
// We don't need to do anything here for legacy backends
ps->backend_data == NULL) {
win_clear_flags(w, WIN_FLAGS_PIXMAP_STALE);
return;
}

// Image needs to be updated, update it.
win_clear_flags(w, WIN_FLAGS_PIXMAP_STALE);

Expand Down Expand Up @@ -1551,16 +1543,6 @@ void win_destroy_finish(session_t *ps, struct win *w) {

free_win_res(ps, w);

// Drop w from all prev_trans to avoid accessing freed memory in
// repair_win()
// TODO(yshui) there can only be one prev_trans pointing to w
wm_stack_foreach(ps->wm, cursor) {
auto w2 = wm_ref_deref(cursor);
if (w2 != NULL && w == w2->prev_trans) {
w2->prev_trans = NULL;
}
}

wm_reap_zombie(w->tree_ref);
free(w);
}
Expand Down
4 changes: 0 additions & 4 deletions src/wm/win.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ struct win {
vec2 saved_win_image_scale;
image_handle shadow_image;
image_handle mask_image;
// TODO(yshui) only used by legacy backends, remove.
/// Pointer to the next higher window to paint.
struct win *prev_trans;
// TODO(yshui) rethink reg_ignore

// Core members
winstate_t state;
Expand Down

0 comments on commit 8065c1f

Please sign in to comment.