Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
Should fix issue #12
Browse files Browse the repository at this point in the history
  • Loading branch information
allusive-dev committed Oct 31, 2023
1 parent 2c5e878 commit 5c11806
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down
32 changes: 17 additions & 15 deletions src/win.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/win.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5c11806

Please sign in to comment.