js: Update Meta.KeyHandlerFunc arguments
The Meta keybinding API now exposes the Clutter event to GJS, which was previously hidden due to it being a gpointer. Since this moves the binding argument one argument to the right on the GJS side, any code that was using the binding argument needs to be updated. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3502>
This commit is contained in:
parent
8694f891ad
commit
91a9409b1d
@ -1422,7 +1422,7 @@ export const ScreenshotUI = GObject.registerClass({
|
||||
new Gio.Settings({schema_id: 'org.gnome.shell.keybindings'}),
|
||||
Meta.KeyBindingFlags.IGNORE_AUTOREPEAT | Meta.KeyBindingFlags.PER_WINDOW,
|
||||
restrictedModes,
|
||||
async (_display, window, _binding) => {
|
||||
async (_display, window, _event, _binding) => {
|
||||
try {
|
||||
const actor = window.get_compositor_private();
|
||||
const content = actor.paint_to_content(null);
|
||||
|
@ -426,7 +426,7 @@ export class InputSourceManager extends Signals.EventEmitter {
|
||||
return true;
|
||||
}
|
||||
|
||||
_switchInputSource(display, window, binding) {
|
||||
_switchInputSource(display, window, event, binding) {
|
||||
if (this._mruSources.length < 2)
|
||||
return;
|
||||
|
||||
|
@ -1665,7 +1665,7 @@ export class WindowManager {
|
||||
this._windowMenuManager.showWindowMenuForWindow(window, menu, rect);
|
||||
}
|
||||
|
||||
_startSwitcher(display, window, binding) {
|
||||
_startSwitcher(display, window, event, binding) {
|
||||
let constructor = null;
|
||||
switch (binding.get_name()) {
|
||||
case 'switch-applications':
|
||||
@ -1704,7 +1704,7 @@ export class WindowManager {
|
||||
tabPopup.destroy();
|
||||
}
|
||||
|
||||
_startA11ySwitcher(display, window, binding) {
|
||||
_startA11ySwitcher(display, window, event, binding) {
|
||||
Main.ctrlAltTabManager.popup(binding.is_reversed(), binding.get_name(), binding.get_mask());
|
||||
}
|
||||
|
||||
@ -1720,7 +1720,7 @@ export class WindowManager {
|
||||
return apps[n];
|
||||
}
|
||||
|
||||
_switchToApplication(display, window, binding) {
|
||||
_switchToApplication(display, window, event, binding) {
|
||||
const [, , , target] = binding.get_name().split('-');
|
||||
const app = this._getNthFavoriteApp(target - 1);
|
||||
if (app) {
|
||||
@ -1729,7 +1729,7 @@ export class WindowManager {
|
||||
}
|
||||
}
|
||||
|
||||
_openNewApplicationWindow(display, window, binding) {
|
||||
_openNewApplicationWindow(display, window, event, binding) {
|
||||
const [, , , , target] = binding.get_name().split('-');
|
||||
const app = this._getNthFavoriteApp(target - 1);
|
||||
if (app)
|
||||
@ -1744,7 +1744,7 @@ export class WindowManager {
|
||||
Main.panel.toggleQuickSettings();
|
||||
}
|
||||
|
||||
_showWorkspaceSwitcher(display, window, binding) {
|
||||
_showWorkspaceSwitcher(display, window, event, binding) {
|
||||
let workspaceManager = display.get_workspace_manager();
|
||||
|
||||
if (!Main.sessionMode.hasWorkspaces)
|
||||
|
Loading…
x
Reference in New Issue
Block a user