1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2025-04-14 17:53:25 -04:00

wm/win: win_update_bounding_shape doesn't need shape_exists anymore

This commit is contained in:
Maxim Solovyov 2024-10-18 22:29:05 +03:00
parent 522e5fe25f
commit 150339f34e
No known key found for this signature in database
2 changed files with 4 additions and 5 deletions

View file

@ -391,8 +391,7 @@ void win_process_primary_flags(session_t *ps, struct win *w) {
if (win_check_flags_all(w, WIN_FLAGS_SIZE_STALE)) {
win_on_win_size_change(w, ps->o.shadow_offset_x,
ps->o.shadow_offset_y, ps->o.shadow_radius);
win_update_bounding_shape(&ps->c, w, ps->c.e.has_shape,
ps->o.detect_rounded_corners);
win_update_bounding_shape(&ps->c, w, ps->o.detect_rounded_corners);
win_clear_flags(w, WIN_FLAGS_SIZE_STALE);
// Window shape/size changed, invalidate the images we built
@ -1444,7 +1443,7 @@ gen_by_val(win_extents);
*
* Mark the window shape as updated
*/
void win_update_bounding_shape(struct x_connection *c, struct win *w, bool shape_exists,
void win_update_bounding_shape(struct x_connection *c, struct win *w,
bool detect_rounded_corners) {
// We don't handle property updates of non-visible windows until they are
// mapped.
@ -1454,7 +1453,7 @@ void win_update_bounding_shape(struct x_connection *c, struct win *w, bool shape
// Start with the window rectangular region
win_get_region_local(w, &w->bounding_shape);
if (shape_exists) {
if (c->e.has_shape) {
w->bounding_shaped = win_bounding_shaped(c, win_id(w));
}

View file

@ -512,7 +512,7 @@ int win_update_role(struct x_connection *c, struct atom *atoms, struct win *w);
int win_update_name(struct x_connection *c, struct atom *atoms, struct win *w);
void win_on_win_size_change(struct win *w, int shadow_offset_x, int shadow_offset_y,
int shadow_radius);
void win_update_bounding_shape(struct x_connection *c, struct win *w, bool shape_exists,
void win_update_bounding_shape(struct x_connection *c, struct win *w,
bool detect_rounded_corners);
bool win_update_prop_fullscreen(struct x_connection *c, const struct atom *atoms,
struct win *w);