updates to mac enable method
This commit is contained in:
parent
131aa38768
commit
80aa399f8a
3 changed files with 9 additions and 3 deletions
|
@ -38,6 +38,7 @@ class NativeWindowMac : public NativeWindow,
|
|||
void Hide() override;
|
||||
bool IsVisible() override;
|
||||
bool IsEnabled() override;
|
||||
void SetEnabled(bool enable) override;
|
||||
void Maximize() override;
|
||||
void Unmaximize() override;
|
||||
bool IsMaximized() override;
|
||||
|
|
|
@ -1045,6 +1045,8 @@ NativeWindowMac::NativeWindowMac(
|
|||
web_contents->GetWebContents()->GetRenderViewHost());
|
||||
}
|
||||
|
||||
NSWindow* currentSheet;
|
||||
|
||||
NativeWindowMac::~NativeWindowMac() {
|
||||
[NSEvent removeMonitor:wheel_event_monitor_];
|
||||
Observe(nullptr);
|
||||
|
@ -1137,9 +1139,12 @@ bool NativeWindowMac::IsEnabled() {
|
|||
|
||||
void NativeWindowMac::SetEnabled(bool enable) {
|
||||
if (enable) {
|
||||
// TODO(codebytere): figure out how to implement window enabling
|
||||
[window_ beginSheet: window_ completionHandler:^(NSModalResponse returnCode) {
|
||||
NSLog(@"modal enabled");
|
||||
return;
|
||||
}];
|
||||
} else {
|
||||
[window_ attachedSheet] = nil;
|
||||
[window_ endSheet: [window_ attachedSheet]];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -847,7 +847,7 @@ the supplied bounds.
|
|||
|
||||
Returns [`Rectangle`](structures/rectangle.md)
|
||||
|
||||
### `win.setEnabled(enable)`
|
||||
#### `win.setEnabled(enable)`
|
||||
|
||||
* `enable` Boolean
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue