Skip to content

Commit b89dbb0

Browse files
committed
fix cycle layouts keybinding for GNOME 48
1 parent 6692fc7 commit b89dbb0

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/extension.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ import { Extension } from '@polyfill';
5353
import OverriddenAltTab from '@components/altTab/overriddenAltTab';
5454
import { LayoutSwitcherPopup } from '@components/layoutSwitcher/layoutSwitcher';
5555
import { unmaximizeWindow } from '@utils/gnomesupport';
56-
// @ts-expect-error "Module exists"
57-
import * as Config from 'resource:///org/gnome/Shell/Extensions/js/misc/config.js';
56+
import * as Config from 'resource:///org/gnome/shell/misc/config.js';
5857

5958
const debug = logger('extension');
6059

src/keybindings.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,16 @@ export default class KeyBindings extends GObject.Object {
247247
extensionSettings,
248248
Meta.KeyBindingFlags.NONE,
249249
Shell.ActionMode.NORMAL,
250-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
251-
(display: Meta.Display, _, event: any) => {
252-
this.emit('cycle-layouts', display, action, event.get_mask());
250+
(
251+
display: Meta.Display,
252+
_,
253+
event: Clutter.Event,
254+
binding: Meta.KeyBinding,
255+
) => {
256+
const mask = event.get_mask
257+
? event.get_mask()
258+
: binding.get_mask();
259+
this.emit('cycle-layouts', display, action, mask);
253260
},
254261
);
255262
}

0 commit comments

Comments
 (0)