File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,21 +12,21 @@ window.setBounds({ x: 0, y: 0 });
1212window . maximize ( ) ;
1313
1414setTimeout ( ( ) => {
15- window . setBounds ( bounds ) ;
15+ window . setBounds ( bounds ) ;
1616} , 1000 ) ;
1717
1818console . log ( "Windows list" ) ;
19- windowManager . getWindows ( ) . forEach ( window => {
20- if ( window . isVisible ( ) ) {
21- console . log ( window . path ) ;
22- }
19+ windowManager . getWindows ( ) . forEach ( ( window ) => {
20+ if ( window . isVisible ( ) ) {
21+ console . log ( window . getTitle ( ) , window . path ) ;
22+ }
2323} ) ;
2424
25- windowManager . on ( ' window-activated' , ( window ) => {
26- console . log ( window . path ) ;
25+ windowManager . on ( " window-activated" , ( window ) => {
26+ console . log ( window . path ) ;
2727} ) ;
2828
2929console . log ( "Monitors list" ) ;
30- windowManager . getMonitors ( ) . forEach ( monitor => {
31- console . log ( monitor . getWorkArea ( ) ) ;
32- } ) ;
30+ windowManager . getMonitors ( ) . forEach ( ( monitor ) => {
31+ console . log ( monitor . getWorkArea ( ) ) ;
32+ } ) ;
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ AXUIElementRef getAXWindowById(int handle) {
192192 auto wInfo = getWindowInfo (handle);
193193
194194 if (wInfo) {
195- NSString *windowName = wInfo[(id )kCGWindowName ];
195+ NSString *windowName = wInfo[(id )kCGWindowOwnerName ];
196196 return Napi::String::New (env, [windowName UTF8String ]);
197197 }
198198
Original file line number Diff line number Diff line change 1010 "install" : " npm run rebuild" ,
1111 "rebuild" : " node-gyp rebuild" ,
1212 "rebuild-dev" : " npm run rebuild -- --debug" ,
13- "prepublishOnly" : " npm run rebuild" ,
13+ "prepublishOnly" : " npm run rebuild && npm run prebuild " ,
1414 "prepare" : " npm run build"
1515 },
1616 "repository" : {
Original file line number Diff line number Diff line change 11import { addon } from ".." ;
2- import extractFileIcon from ' extract-file-icon' ;
2+ import extractFileIcon from " extract-file-icon" ;
33import { Monitor } from "./monitor" ;
44import { IRectangle } from "../interfaces" ;
55import { EmptyMonitor } from "./empty-monitor" ;
@@ -102,13 +102,13 @@ export class Window {
102102 addon . showWindow ( this . id , "maximize" ) ;
103103 } else if ( process . platform === "darwin" ) {
104104 addon . setWindowMaximized ( this . id ) ;
105- }
105+ }
106106 }
107107
108108 bringToTop ( ) {
109109 if ( ! addon ) return ;
110-
111- if ( process . platform === ' darwin' ) {
110+
111+ if ( process . platform === " darwin" ) {
112112 addon . bringWindowToTop ( this . id , this . processId ) ;
113113 } else {
114114 addon . bringWindowToTop ( this . id ) ;
@@ -124,9 +124,9 @@ export class Window {
124124 if ( ! addon ) return ;
125125
126126 if ( process . platform === "win32" ) {
127- return this . path && this . path !== '' && addon . isWindow ( this . id ) ;
127+ return this . path && this . path !== "" && addon . isWindow ( this . id ) ;
128128 } else if ( process . platform === "darwin" ) {
129- return this . path && this . path !== '' && ! ! addon . initWindow ( this . id ) ;
129+ return this . path && this . path !== "" && ! ! addon . initWindow ( this . id ) ;
130130 }
131131 }
132132
You can’t perform that action at this time.
0 commit comments