-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
base: main
Are you sure you want to change the base?
Introduce ScreenShield #2343
Conversation
e5666ea
to
17ef785
Compare
There was a problem hiding this 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"); |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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 :)
17ef785
to
ad11cc1
Compare
Move the actor and all the animations from SessionLocker into a separate class that can later be used for #1999 and #836