@@ -42,46 +42,6 @@ class WMAPI {
4242 alttab . update ( ) ;
4343 return win ;
4444 }
45- createGeneric ( info : object ) : WMWindow {
46- const win = AliceWM . create ( info as unknown as any ) ;
47- const ctx = anura . apps [ "anura.generic" ] ;
48- win . focus ( ) ;
49-
50- win . addEventListener ( "focus" , ( event ) => {
51- //@ts -ignore
52- document . activeElement ?. blur ( ) ;
53- alttab . update ( ) ;
54-
55- taskbar . element . style . zIndex = getHighestZindex ( ) + 3 + "" ;
56- } ) ;
57-
58- win . addEventListener ( "resize" , ( event : MessageEvent ) => { } ) ;
59-
60- win . addEventListener ( "close" , ( event ) => {
61- this . windows = this . windows . filter (
62- ( w : WeakRef < WMWindow > ) => w . deref ( ) !== win ,
63- ) ;
64- } ) ;
65-
66- win . addEventListener ( "maximize" , ( ) => {
67- taskbar . maximizedWins . push ( win ) ;
68- taskbar . updateRadius ( ) ;
69- } ) ;
70-
71- win . addEventListener ( "unmaximize" , ( ) => {
72- taskbar . maximizedWins = taskbar . maximizedWins . filter ( ( w ) => w !== win ) ;
73- taskbar . updateRadius ( ) ;
74- } ) ;
75-
76- win . addEventListener ( "snap" , ( event : MessageEvent ) => {
77- taskbar . updateRadius ( ) ;
78- } ) ;
79-
80- ctx . windows . push ( win ) ;
81- this . windows . push ( new WeakRef ( win ) ) ;
82-
83- taskbar . updateTaskbar ( ) ;
84- alttab . update ( ) ;
85- return win ;
86- }
45+ createGeneric : ( info : WindowInformation | string ) => WMWindow =
46+ this . create . bind ( this , anura . apps [ "anura.generic" ] ) ;
8747}
0 commit comments