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
feat: add evt listeners for SetAlwaysOnTop #14951
Conversation
2f8f8a1
to
26a009c
Compare
@@ -262,6 +262,14 @@ void TopLevelWindow::OnWindowLeaveHtmlFullScreen() { | |||
Emit("leave-html-full-screen"); | |||
} | |||
|
|||
void TopLevelWindow::OnWindowEnterAlwaysOnTop() { | |||
Emit("enter-always-on-top"); |
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.
Not sure if enter
and leave
are the right semantics here, maybe always-on-top-changed
with a single param alwaysOnTop
which is a boolean.
Enter and leave make sense for fullscreen because it's a mode you "enter" and you don't really "enter" always on top. 🤔
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.
hmm...i see what you mean 🤔
is there an alt nomenclature you'd prefer to see?
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.
always-on-top-changed
is-always-on-top
/not-always-on-top
🤔
I prefer the first one
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.
👍 for always-on-top-changed
with an arg, similar to what we do for accessibility-support-changed
@@ -262,6 +262,10 @@ void TopLevelWindow::OnWindowLeaveHtmlFullScreen() { | |||
Emit("leave-html-full-screen"); | |||
} | |||
|
|||
void TopLevelWindow::OnWindowAlwaysOnTopChange() { | |||
Emit("always-on-top-change", IsAlwaysOnTop()); |
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.
s/change/changed for consistency with accessibility-support-changed
, accent-color-changed
, cursor-changed
, etc.
Release Notes Persisted
|
Description of Change
Resolves #12466.
Adds new event listener for
SetAlwaysOnTop
: "always-on-top-change"/cc @ckerr @MarshallOfSound
Checklist
npm test
passesRelease Notes
Notes: Add new event listener for window
SetAlwaysOnTop