aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallusive-dev <[email protected]>2023-10-31 14:22:22 +1100
committerallusive-dev <[email protected]>2023-10-31 14:22:22 +1100
commit5c118068f923a24b140d7d8d3c642a50347331b4 (patch)
tree48dd141e2396cd6d4e10de8cc6179b6ae4ee6938
parentFix transient windows crashing picom. #1 (diff)
downloadcompfy-5c118068f923a24b140d7d8d3c642a50347331b4.tar.xz
compfy-5c118068f923a24b140d7d8d3c642a50347331b4.zip
Should fix issue #121.1.0
-rw-r--r--src/config.c2
-rw-r--r--src/win.c32
-rw-r--r--src/win.h2
3 files changed, 19 insertions, 17 deletions
diff --git a/src/config.c b/src/config.c
index 1e4fc8f..2ae855b 100644
--- a/src/config.c
+++ b/src/config.c
@@ -871,7 +871,7 @@ char *parse_config(options_t *opt, const char *config_file, bool *shadow_enable,
.use_ewmh_active_win = false,
.focus_blacklist = NULL,
- .detect_transient = true,
+ .detect_transient = false,
.detect_client_leader = false,
.no_ewmh_fullscreen = false,
diff --git a/src/win.c b/src/win.c
index b0df3d1..a0f877a 100644
--- a/src/win.c
+++ b/src/win.c
@@ -304,13 +304,13 @@ static inline void win_release_pixmap(backend_t *base, struct managed_win *w) {
w->flags |= WIN_FLAGS_PIXMAP_NONE;
}
}
-// static inline void win_release_oldpixmap(backend_t *base, struct managed_win *w) {
-// log_debug("Releasing old_pixmap of window %#010x (%s)", w->base.id, w->name);
-// if (w->old_win_image) {
-// base->ops->release_image(base, w->old_win_image);
-// w->old_win_image = NULL;
-// }
-// }
+static inline void win_release_oldpixmap(backend_t *base, struct managed_win *w) {
+ log_debug("Releasing old_pixmap of window %#010x (%s)", w->base.id, w->name);
+ if (w->old_win_image) {
+ base->ops->release_image(base, w->old_win_image);
+ w->old_win_image = NULL;
+ }
+}
static inline void win_release_shadow(backend_t *base, struct managed_win *w) {
log_debug("Releasing shadow of window %#010x (%s)", w->base.id, w->name);
assert(w->shadow_image);
@@ -403,7 +403,7 @@ void win_release_images(struct backend_base *backend, struct managed_win *w) {
if (!win_check_flags_all(w, WIN_FLAGS_PIXMAP_NONE)) {
assert(!win_check_flags_all(w, WIN_FLAGS_PIXMAP_STALE));
win_release_pixmap(backend, w);
- // win_release_oldpixmap(backend, w);
+ win_release_oldpixmap(backend, w);
}
if (!win_check_flags_all(w, WIN_FLAGS_SHADOW_NONE)) {
@@ -476,8 +476,8 @@ static void init_animation(session_t *ps, struct managed_win *w) {
w->animation_transient = wid_has_prop(ps, w->client_win, ps->atoms->aWM_TRANSIENT_FOR);
- if (w->window_type != WINTYPE_TOOLTIP && w->animation_transient)
- animation = ps->o.animation_for_transient_window;
+ // if (w->window_type != WINTYPE_TOOLTIP && w->animation_transient)
+ // animation = ps->o.animation_for_transient_window;
if (ps->o.wintype_option[w->window_type].animation < OPEN_WINDOW_ANIMATION_INVALID)
animation = ps->o.wintype_option[w->window_type].animation;
@@ -583,7 +583,7 @@ static void init_animation_unmap(session_t *ps, struct managed_win *w) {
animation = ps->o.animation_for_open_window;
if (w->window_type != WINTYPE_TOOLTIP && w->animation_transient)
- animation = ps->o.animation_for_transient_window;
+ animation = ps->o.animation_for_unmap_window;
if (ps->o.wintype_option[w->window_type].animation < OPEN_WINDOW_ANIMATION_INVALID)
animation = ps->o.wintype_option[w->window_type].animation;
@@ -1568,9 +1568,11 @@ void win_on_win_size_change(session_t *ps, struct managed_win *w) {
assert(w->state != WSTATE_UNMAPPED && w->state != WSTATE_DESTROYING &&
w->state != WSTATE_UNMAPPING);
- // Invalidate the shadow we built
- win_set_flags(w, WIN_FLAGS_IMAGES_STALE);
- win_release_mask(ps->backend_data, w);
+ // Invalidate the shadow we built | CHANGED BY ALLUSIVE
+ if (w->state != WSTATE_DESTROYING) {
+ win_set_flags(w, WIN_FLAGS_IMAGES_STALE);
+ win_release_mask(ps->backend_data, w);
+ }
ps->pending_updates = true;
free_paint(ps, &w->shadow_paint);
}
@@ -2426,7 +2428,7 @@ static void unmap_win_finish(session_t *ps, struct managed_win *w) {
// Shadow image can be preserved.
if (!win_check_flags_all(w, WIN_FLAGS_PIXMAP_NONE)) {
win_release_pixmap(ps->backend_data, w);
- // win_release_oldpixmap(ps->backend_data, w);
+ win_release_oldpixmap(ps->backend_data, w);
}
} else {
assert(!w->win_image);
diff --git a/src/win.h b/src/win.h
index 366fd9e..9a27c4c 100644
--- a/src/win.h
+++ b/src/win.h
@@ -143,7 +143,7 @@ struct managed_win {
/// bitmap for properties which needs to be updated
uint64_t *stale_props;
/// number of uint64_ts that has been allocated for stale_props
- size_t stale_props_capacity;
+ uint64_t stale_props_capacity;
/// Bounding shape of the window. In local coordinates.
/// See above about coordinate systems.