@@ -2577,7 +2577,8 @@ function _show_skip_taskbar_windows(ext: Ext) {
2577
2577
// So it has to be skipped being overriden for now.
2578
2578
2579
2579
// Handle the overview
2580
- default_isoverviewwindow_ws = Workspace . prototype . _isOverviewWindow ;
2580
+ if ( ! default_isoverviewwindow_ws )
2581
+ default_isoverviewwindow_ws = Workspace . prototype . _isOverviewWindow ;
2581
2582
Workspace . prototype . _isOverviewWindow = function ( window : any ) {
2582
2583
// wm_class Gjs needs to be skipped to prevent the ghost window in
2583
2584
// workspace and overview
@@ -2591,7 +2592,8 @@ function _show_skip_taskbar_windows(ext: Ext) {
2591
2592
if ( GNOME_VERSION ?. startsWith ( "3.36" ) ) {
2592
2593
// imports.ui.windowPreview is not in 3.36,
2593
2594
// _getCaption() is still in workspace.js
2594
- default_getcaption_workspace = Workspace . prototype . _getCaption ;
2595
+ if ( ! default_getcaption_workspace )
2596
+ default_getcaption_workspace = Workspace . prototype . _getCaption ;
2595
2597
Workspace . prototype . _getCaption = function ( ) {
2596
2598
if ( this . metaWindow . title )
2597
2599
return this . metaWindow . title ;
@@ -2602,7 +2604,8 @@ function _show_skip_taskbar_windows(ext: Ext) {
2602
2604
}
2603
2605
} else {
2604
2606
const { WindowPreview } = imports . ui . windowPreview ;
2605
- default_getcaption_windowpreview = WindowPreview . prototype . _getCaption ;
2607
+ if ( ! default_getcaption_windowpreview )
2608
+ default_getcaption_windowpreview = WindowPreview . prototype . _getCaption ;
2606
2609
WindowPreview . prototype . _getCaption = function ( ) {
2607
2610
if ( this . metaWindow . title )
2608
2611
return this . metaWindow . title ;
@@ -2614,8 +2617,9 @@ function _show_skip_taskbar_windows(ext: Ext) {
2614
2617
}
2615
2618
2616
2619
// Handle the workspace thumbnail
2617
- default_isoverviewwindow_ws_thumbnail =
2618
- WorkspaceThumbnail . prototype . _isOverviewWindow ;
2620
+ if ( ! default_isoverviewwindow_ws_thumbnail )
2621
+ default_isoverviewwindow_ws_thumbnail =
2622
+ WorkspaceThumbnail . prototype . _isOverviewWindow ;
2619
2623
WorkspaceThumbnail . prototype . _isOverviewWindow = function ( win : any ) {
2620
2624
let meta_win = win . get_meta_window ( ) ;
2621
2625
// wm_class Gjs needs to be skipped to prevent the ghost window in
@@ -2626,7 +2630,8 @@ function _show_skip_taskbar_windows(ext: Ext) {
2626
2630
} ;
2627
2631
2628
2632
// Handle switch-applications
2629
- default_init_appswitcher = AppSwitcher . prototype . _init ;
2633
+ if ( ! default_init_appswitcher )
2634
+ default_init_appswitcher = AppSwitcher . prototype . _init ;
2630
2635
// Do not use the Shell.AppSystem apps
2631
2636
AppSwitcher . prototype . _init = function ( _apps : any , altTabPopup : any ) {
2632
2637
// Simulate super._init(true);
@@ -2677,7 +2682,8 @@ function _show_skip_taskbar_windows(ext: Ext) {
2677
2682
}
2678
2683
2679
2684
// Handle switch-windows
2680
- default_getwindowlist_windowswitcher = WindowSwitcherPopup . prototype . _getWindowList ;
2685
+ if ( ! default_getwindowlist_windowswitcher )
2686
+ default_getwindowlist_windowswitcher = WindowSwitcherPopup . prototype . _getWindowList ;
2681
2687
WindowSwitcherPopup . prototype . _getWindowList = function ( ) {
2682
2688
let workspace = null ;
2683
2689
0 commit comments