Skip to content

Commit c1f2ea4

Browse files
authored
fix: Correct _isOverviewWindow on Gnome Shell 3.36 (#1085)
It seems in 3.38, the argument to this function was changed from the `MetaWindowActor` to the `MetaWindow`. This adds a test to correctly get the `MetaWindow` on both 3.36 and 3.38. This should fix #1072.
1 parent 1f2ca00 commit c1f2ea4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/extension.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2576,14 +2576,18 @@ function _show_skip_taskbar_windows(ext: Ext) {
25762576
// So it has to be skipped being overriden for now.
25772577

25782578
// Handle the overview
2579-
if (!default_isoverviewwindow_ws)
2579+
if (!default_isoverviewwindow_ws)
25802580
default_isoverviewwindow_ws = Workspace.prototype._isOverviewWindow;
2581-
Workspace.prototype._isOverviewWindow = function(window: any) {
2581+
Workspace.prototype._isOverviewWindow = function(win: any) {
2582+
let meta_win = win;
2583+
if (GNOME_VERSION?.startsWith("3.36"))
2584+
meta_win = win.get_meta_window();
2585+
25822586
// wm_class Gjs needs to be skipped to prevent the ghost window in
25832587
// workspace and overview
2584-
let show_skiptb = !cfg.skiptaskbar_shall_hide(window);
2585-
return (show_skiptb && window.skip_taskbar && window.get_wm_class() !== "Gjs") ||
2586-
default_isoverviewwindow_ws(window);
2588+
let show_skiptb = !cfg.skiptaskbar_shall_hide(meta_win);
2589+
return (show_skiptb && meta_win.skip_taskbar && meta_win.get_wm_class() !== "Gjs") ||
2590+
default_isoverviewwindow_ws(win);
25872591
};
25882592
}
25892593

0 commit comments

Comments
 (0)