File tree 1 file changed +10
-2
lines changed
focus-new-window@mdpenguin/files/focus-new-window@mdpenguin
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,16 @@ class SettingsHandler {
17
17
18
18
class AttentionHandler {
19
19
init ( ) {
20
- global . display . disconnect ( Main . windowAttentionHandler . _windowDemandsAttentionId ) ;
21
- global . display . disconnect ( Main . windowAttentionHandler . _windowMarkedUrgentId ) ;
20
+ if ( Main . windowAttentionHandler . _windowDemandsAttentionId ) {
21
+ global . display . disconnect ( Main . windowAttentionHandler . _windowDemandsAttentionId ) ;
22
+ Main . windowAttentionHandler . _windowDemandsAttentionId = null ;
23
+ }
24
+
25
+ if ( Main . windowAttentionHandler . _windowMarkedUrgentId ) {
26
+ global . display . disconnect ( Main . windowAttentionHandler . _windowMarkedUrgentId ) ;
27
+ Main . windowAttentionHandler . _windowMarkedUrgentId = null ;
28
+ }
29
+
22
30
oldHandler = Main . windowAttentionHandler ;
23
31
24
32
this . _windowDemandsAttentionId = global . display . connect ( 'window-demands-attention' , this . _onWindowDemandsAttention . bind ( this ) ) ;
You can’t perform that action at this time.
0 commit comments