mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
win: Implement win.disable/enable/isEnabled() API
This commit is contained in:
@@ -187,6 +187,9 @@ NativeWindowViews::NativeWindowViews(
|
||||
if (options.Get(options::kFocusable, &focusable) && !focusable)
|
||||
params.activatable = views::Widget::InitParams::ACTIVATABLE_NO;
|
||||
|
||||
if (parent)
|
||||
params.parent = parent->GetNativeWindow();
|
||||
|
||||
#if defined(OS_WIN)
|
||||
params.native_widget =
|
||||
new views::DesktopNativeWidgetAura(window_.get());
|
||||
@@ -376,13 +379,15 @@ bool NativeWindowViews::IsVisible() {
|
||||
}
|
||||
|
||||
void NativeWindowViews::Disable() {
|
||||
::EnableWindow(GetAcceleratedWidget(), FALSE);
|
||||
}
|
||||
|
||||
void NativeWindowViews::Enable() {
|
||||
::EnableWindow(GetAcceleratedWidget(), TRUE);
|
||||
}
|
||||
|
||||
bool NativeWindowViews::IsEnabled() {
|
||||
return true;
|
||||
return ::IsWindowEnabled(GetAcceleratedWidget());
|
||||
}
|
||||
|
||||
void NativeWindowViews::Maximize() {
|
||||
|
||||
Reference in New Issue
Block a user