Add missing param for Gnome 48

gh-2247
This commit is contained in:
Charles Gagnon
2025-02-25 09:12:21 -05:00
parent 880d5c6867
commit d7cf604831
2 changed files with 10 additions and 8 deletions

View File

@@ -180,7 +180,7 @@ Ideas for recursing child actors and assigning inline styles are based on code f
- @JimBroad for grayscale icons - @JimBroad for grayscale icons
#### Bug Fixes: #### Bug Fixes:
@imrvelj, @Teslator, @bil-elmoussaoui, @brandon-schumann, @sw9, @rockon999 , @lexruee, @3v1n0, @freeroot, @moqmar, @ArtyomZorin, @lkc0987, @saibotk, @vanillajonathan, @Zkdc, @leebickmtu, @l3nn4rt, @Melix19, @Aikatsui, @melix99, @kyrillzorin, @oneshadab, @CorvetteCole, @vantu5z, @spectreseven1138, @aperezdc, @smedir, @lucaxvi, @andyholmes, @vowstar, @T99Rots, @City-busz, @guoqiyi, @gcrabbe, @Anduin2017, @xalt7x @imrvelj, @Teslator, @bil-elmoussaoui, @brandon-schumann, @sw9, @rockon999 , @lexruee, @3v1n0, @freeroot, @moqmar, @ArtyomZorin, @lkc0987, @saibotk, @vanillajonathan, @Zkdc, @leebickmtu, @l3nn4rt, @Melix19, @Aikatsui, @melix99, @kyrillzorin, @oneshadab, @CorvetteCole, @vantu5z, @spectreseven1138, @aperezdc, @smedir, @lucaxvi, @andyholmes, @vowstar, @T99Rots, @City-busz, @guoqiyi, @gcrabbe, @Anduin2017, @xalt7x, @Survolog
#### Documentation Improvements: #### Documentation Improvements:
@BoQsc, @zakkak, @dandv, @elliotwutingfeng @BoQsc, @zakkak, @dandv, @elliotwutingfeng

View File

@@ -37,6 +37,8 @@ import * as TaskbarItemContainer from './taskbar.js'
import * as Pos from './panelPositions.js' import * as Pos from './panelPositions.js'
import * as PanelSettings from './panelSettings.js' import * as PanelSettings from './panelSettings.js'
import * as PanelStyle from './panelStyle.js' import * as PanelStyle from './panelStyle.js'
import * as Config from 'resource:///org/gnome/shell/misc/config.js'
import * as Main from 'resource:///org/gnome/shell/ui/main.js' import * as Main from 'resource:///org/gnome/shell/ui/main.js'
import * as Dash from 'resource:///org/gnome/shell/ui/dash.js' import * as Dash from 'resource:///org/gnome/shell/ui/dash.js'
import * as DND from 'resource:///org/gnome/shell/ui/dnd.js' import * as DND from 'resource:///org/gnome/shell/ui/dnd.js'
@@ -1498,24 +1500,24 @@ export const Panel = GObject.registerClass(
!this._timeoutsHandler.getId(T6) !this._timeoutsHandler.getId(T6)
) { ) {
if (direction && scrollAction === 'SWITCH_WORKSPACE') { if (direction && scrollAction === 'SWITCH_WORKSPACE') {
let args = [global.display] let args = [global.display, 0]
//adjust for horizontal workspaces //adjust for horizontal workspaces
if (Utils.DisplayWrapper.getWorkspaceManager().layout_rows === 1) { if (Utils.DisplayWrapper.getWorkspaceManager().layout_rows === 1) {
direction = direction == 'up' ? 'left' : 'right' direction = direction == 'up' ? 'left' : 'right'
} }
//gnome-shell < 3.30 needs an additional "screen" param //gnome-shell >= 48 needs a third "event" param
global.screen ? args.push(global.screen) : 0 if (Config.PACKAGE_VERSION >= '48') args.push(event)
let showWsPopup = SETTINGS.get_boolean('scroll-panel-show-ws-popup') let showWsPopup = SETTINGS.get_boolean('scroll-panel-show-ws-popup')
showWsPopup showWsPopup
? 0 ? 0
: (Main.wm._workspaceSwitcherPopup = { display: () => {} }) : (Main.wm._workspaceSwitcherPopup = { display: () => {} })
Main.wm._showWorkspaceSwitcher.apply(
Main.wm, Main.wm._showWorkspaceSwitcher.call(Main.wm, ...args, {
args.concat([0, { get_name: () => 'switch---' + direction }]), get_name: () => 'switch---' + direction,
) })
showWsPopup ? 0 : (Main.wm._workspaceSwitcherPopup = null) showWsPopup ? 0 : (Main.wm._workspaceSwitcherPopup = null)
} else if (direction && scrollAction === 'CYCLE_WINDOWS') { } else if (direction && scrollAction === 'CYCLE_WINDOWS') {
let windows = this.taskbar let windows = this.taskbar