Browse Source

add documentation

Shelley Vohr 7 years ago
parent
commit
faf08b2b77
2 changed files with 9 additions and 3 deletions
  1. 3 3
      atom/browser/native_window_mac.mm
  2. 6 0
      docs/api/browser-window.md

+ 3 - 3
atom/browser/native_window_mac.mm

@@ -1136,10 +1136,10 @@ bool NativeWindowMac::IsEnabled() {
 }
 
 void NativeWindowMac::SetEnabled(bool enable) {
-  if (enable == false){
-    [window_ attachedSheet] = nil;
+  if (enable){
+    // TODO(codebytere): figure out how to implement window enabling
   } else {
-    [window_ beginSheet:window_];
+    [window_ attachedSheet] = nil;
   }
 }
 

+ 6 - 0
docs/api/browser-window.md

@@ -847,6 +847,12 @@ the supplied bounds.
 
 Returns [`Rectangle`](structures/rectangle.md)
 
+### `win.setEnabled(enabled)`
+
+* `enabled` Boolean
+
+Disable or enable the window.
+
 #### `win.setSize(width, height[, animate])`
 
 * `width` Integer