Skip to content

Commit

Permalink
fix: don't skip effect application for maximized windows
Browse files Browse the repository at this point in the history
Previously, if shouldEnableEffect() returned false for a window on
startup, the effect wasn't applied to it, so it wasn't possible to
enable and disable it. This commit removes the extra check, so the
effect is applied properly, and then disabled with refreshRoundedCorners().

Fixes #54
  • Loading branch information
flexagoon committed Dec 17, 2024
1 parent c98ca50 commit b73fef0
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/manager/event_handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ import type {RoundedWindowActor} from '../utils/types.js';
export function onAddEffect(actor: RoundedWindowActor) {
logDebug(`opened: ${actor?.metaWindow.title}: ${actor}`);

const win = actor.metaWindow;

if (!shouldEnableEffect(win)) {

This comment has been minimized.

Copy link
@lamhm

lamhm Dec 17, 2024

@flexagoon:

Removing these lines actually creates a bug.

Now, my originally frameless Conky window appears to have a shadowed frame around it. Black-listing Conky gives the same unwanted result.

If I open the preferences of the extension and toggle the "Skip LibAdwaita applications" or "Skip LibHandy applications" option, the shadowed frame around the Conky window will disappear (I guess the refreshRoundedCorners() method is called when I toggle the options). However, if I log out and log in again, the frame around the Conky window will re-appear.

This comment has been minimized.

Copy link
@flexagoon

flexagoon Dec 18, 2024

Author Owner

@lamhm are you sure this only happens on the latest commit and not on the commit before that? Because I don't really see how this change would affect that

This comment has been minimized.

Copy link
@lamhm

lamhm Jan 17, 2025

@flexagoon: Sorry, I didn't notice your comment earlier.

The problem above has been fixed in version 11 of the extension. Thank you very much for your work.

logDebug(`Skipping ${win.title}`);
return;
}

unwrapActor(actor)?.add_effect_with_name(
ROUNDED_CORNERS_EFFECT,
new RoundedCornersEffect(),
Expand Down

0 comments on commit b73fef0

Please sign in to comment.