Update modern.js
fixes error "Fails on GNOME Shell 48.3 with TypeError get_session not a function" on modern.,js
This commit is contained in:
@@ -14,7 +14,6 @@ import GLib from 'gi://GLib';
|
||||
import Clutter from 'gi://Clutter';
|
||||
|
||||
// ── CONST ────────────────────────────────────────────
|
||||
const SHELL_MAJOR = parseInt(Shell.get_session().get_shell_version().split('.')[0]);
|
||||
const WM_SCHEMA = 'org.gnome.desktop.wm.keybindings';
|
||||
|
||||
const TILING_DELAY_MS = 20; // Change Tiling Window Delay
|
||||
@@ -32,6 +31,15 @@ const KEYBINDINGS = {
|
||||
'focus-down': (self) => self._focusInDirection('down'),
|
||||
};
|
||||
|
||||
// ── VERSION CHECK ────────────────────────────────────────────
|
||||
let shellVersion;
|
||||
if (Shell.get_session) {
|
||||
shellVersion = Shell.get_session().get_shell_version();
|
||||
} else {
|
||||
shellVersion = global.shell_version;
|
||||
}
|
||||
const SHELL_MAJOR = parseInt(shellVersion.split('.')[0]);
|
||||
|
||||
// ── HELPER‑FUNCTION ────────────────────────────────────────
|
||||
function getPointerXY() {
|
||||
if (global.get_pointer) {
|
||||
|
||||
Reference in New Issue
Block a user