Skip to content

Introduce ScreenShield #2343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

lenemter
Copy link
Member

Move the actor and all the animations from SessionLocker into a separate class that can later be used for #1999 and #836

@lenemter lenemter requested a review from a team March 27, 2025 20:17
@lenemter lenemter mentioned this pull request Mar 28, 2025
@lenemter lenemter force-pushed the lenemter/introduce-screen-shield branch 4 times, most recently from e5666ea to 17ef785 Compare March 30, 2025 20:37
Copy link
Member

@leolost2605 leolost2605 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me but I currently can't test it because I've got a broken setup where I can't lock anything lol

public int64 activation_time { get; private set; default = 0; }
if (_active != value) {
_active = value;
notify_property ("active");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC you don't actually have to notify manually (we don't do explicit notify https://docs.gtk.org/gobject/signal.Object.notify.html)

return Clutter.EVENT_STOP;
}

public override bool motion_event (Clutter.Event event) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we collect all events at once in event (Clutter.Event event) and filter them by type instead of having three handlers doing the same thing?

}

public void deactivate () {
if (!active) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC we only set active to true once the animation completes so could this lead to us trying to deactivate while animating which would be ignored? And if so is that wanted?

return;
}

add_constraint (new Clutter.BindConstraint (parent, Clutter.BindCoordinate.SIZE, 0.0f));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's cool I didn't know this existed :)

@lenemter lenemter force-pushed the lenemter/introduce-screen-shield branch from 17ef785 to ad11cc1 Compare April 11, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants