feat: add BrowserWindow.isSnapped()
(#46226)
* feat: add BrowserWindow.isSnapped() on Windows Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * docs: mark _Readonly_ Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
6f3c9fcf99
commit
25e5055065
8 changed files with 52 additions and 0 deletions
|
@ -1091,6 +1091,10 @@ void BaseWindow::SetAppDetails(const gin_helper::Dictionary& options) {
|
|||
relaunch_command, relaunch_display_name,
|
||||
window_->GetAcceleratedWidget());
|
||||
}
|
||||
|
||||
bool BaseWindow::IsSnapped() const {
|
||||
return window_->IsSnapped();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
|
||||
|
@ -1335,6 +1339,8 @@ void BaseWindow::BuildPrototype(v8::Isolate* isolate,
|
|||
.SetMethod("setIcon", &BaseWindow::SetIcon)
|
||||
#endif
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
.SetMethod("isSnapped", &BaseWindow::IsSnapped)
|
||||
.SetProperty("snapped", &BaseWindow::IsSnapped)
|
||||
.SetMethod("hookWindowMessage", &BaseWindow::HookWindowMessage)
|
||||
.SetMethod("isWindowMessageHooked", &BaseWindow::IsWindowMessageHooked)
|
||||
.SetMethod("unhookWindowMessage", &BaseWindow::UnhookWindowMessage)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue