@@ -44,7 +44,7 @@ const GLib: GLib = imports.gi.GLib;
44
44
const { Gio, Meta, St, Shell } = imports . gi ;
45
45
const { GlobalEvent, WindowEvent } = Events ;
46
46
const { cursor_rect, is_move_op } = Lib ;
47
- const { layoutManager, loadTheme, overview, panel, setThemeStylesheet, screenShield, sessionMode } = imports . ui . main ;
47
+ const { layoutManager, loadTheme, overview, panel, setThemeStylesheet, screenShield, sessionMode, windowAttentionHandler } = imports . ui . main ;
48
48
const { ScreenShield } = imports . ui . screenShield ;
49
49
const { AppSwitcher, AppIcon, WindowSwitcherPopup } = imports . ui . altTab ;
50
50
const { SwitcherList } = imports . ui . switcherPopup ;
@@ -2454,6 +2454,8 @@ function enable() {
2454
2454
ext . injections_add ( ) ;
2455
2455
ext . signals_attach ( ) ;
2456
2456
2457
+ disable_window_attention_handler ( )
2458
+
2457
2459
layoutManager . addChrome ( ext . overlay ) ;
2458
2460
2459
2461
if ( ! indicator ) {
@@ -2503,6 +2505,25 @@ function disable() {
2503
2505
indicator . destroy ( ) ;
2504
2506
indicator = null ;
2505
2507
}
2508
+
2509
+ enable_window_attention_handler ( )
2510
+ }
2511
+
2512
+ const handler = windowAttentionHandler
2513
+
2514
+ function enable_window_attention_handler ( ) {
2515
+ if ( handler && ! handler . _windowDemandsAttentionId ) {
2516
+ handler . _windowDemandsAttentionId = global . display . connect ( 'window-demands-attention' , ( display , window ) => {
2517
+ handler . _onWindowDemandsAttention ( display , window )
2518
+ } )
2519
+ }
2520
+ }
2521
+
2522
+ function disable_window_attention_handler ( ) {
2523
+ if ( handler && handler . _windowDemandsAttentionId ) {
2524
+ global . display . disconnect ( handler . _windowDemandsAttentionId ) ;
2525
+ handler . _windowDemandsAttentionId = null
2526
+ }
2506
2527
}
2507
2528
2508
2529
function stylesheet_path ( name : string ) { return Me . path + "/" + name + ".css" ; }
0 commit comments