From 6494aec955532018156c733c9130258ba640307d Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Sat, 15 Nov 2025 21:59:20 -0500 Subject: [PATCH] WallpaperPanel: give focus to the gridview when clicking in it, so we can use keyboard --- Modules/Panels/Wallpaper/WallpaperPanel.qml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Modules/Panels/Wallpaper/WallpaperPanel.qml b/Modules/Panels/Wallpaper/WallpaperPanel.qml index d0e74c3c..242ea7c9 100644 --- a/Modules/Panels/Wallpaper/WallpaperPanel.qml +++ b/Modules/Panels/Wallpaper/WallpaperPanel.qml @@ -572,6 +572,18 @@ SmartPanel { model: filteredWallpapers + // Capture clicks on empty areas to give focus to GridView + MouseArea { + anchors.fill: parent + z: -1 + onClicked: { + wallpaperGridView.forceActiveFocus() + if (wallpaperGridView.currentIndex < 0 && filteredWallpapers.length > 0) { + wallpaperGridView.currentIndex = 0 + } + } + } + property int columns: (screen.width > 1920) ? 5 : 4 property int itemSize: cellWidth @@ -739,6 +751,7 @@ SmartPanel { TapHandler { onTapped: { + wallpaperGridView.forceActiveFocus() wallpaperGridView.currentIndex = index if (Settings.data.wallpaper.setWallpaperOnAllMonitors) { WallpaperService.changeWallpaper(wallpaperPath, undefined)