Skip to content

Commit ee27d33

Browse files
committed
filter windows by activity; port away from deprecated Window::desktop
1 parent df317bf commit ee27d33

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

README.bbcode

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Automatically raises all other visible windows of the same application together when activating one of them, effectively creating application groups to task-switch between.
22

3-
[b]Please make sure to install the most recent version (v1.5) and to not use Discover for installation.[/b] For more information on installation, setup and usage as well as any requests, please visit [url=https://github.com/nclarius/kwin-application-switcher]the GitHub page[/url].
3+
[b]Please make sure to install the most recent version (v1.6) and to not use Discover for installation.[/b] For more information on installation, setup and usage as well as any requests, please visit [url=https://github.com/nclarius/kwin-application-switcher]the GitHub page[/url].
44

55
This extension gives rise to an application-centric task switching workflow as known from environments such as GNOME or MacOS, where an application’s windows are treated as a group, and task switching can take place at two levels: one mode for switching applications and one mode for switching between windows of an application.
66

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Seen in the screencast: Switching from Konsole back to Dolphin also brings the o
2020

2121
### Installation via graphical interface
2222

23-
**Please make sure to select the most recent version (v1.5)** in the installation process.
23+
**Please make sure to select the most recent version (v1.6)** in the installation process.
2424

2525
A [bug](https://bugs.kde.org/show_bug.cgi?id=453521) in Discover causes a wrong version to be installed, so using the installation module in System Settings instead is recommended.
2626

@@ -55,7 +55,7 @@ If you are intending to have one mode for switching applications and one mode fo
5555

5656
### Limitations
5757

58-
- The KWin scripting API provides no possibility to distinguish how a window was activated (via alt-tabbing, panel task bar clicking, clicking on the window, or being requested from another process), so the plugin can not be applied selectively to only some activation types.
58+
- The KWin scripting API provides no possibility to distinguish how a window was activated (via alt-tabbing, clicking on the task bar, clicking on the window, or being requested from another process), so the plugin can not be applied selectively to only some activation types.
5959
- The KWin scripting API provides no possibility to manipulate the recently used and stacking order without actually activating the window, so focus will briefly shift as windows are being brought to the front; however this happens so fast it shouldn’t be noticeable.
6060

6161
## Small Print

contents/code/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ function getAppGroup(current) {
8686
if (!current) return;
8787
let appGroup = appGroups[getApp(current)].filter(window => window &&
8888
!window.minimized &&
89-
(window.desktop == current.desktop ||
90-
window.onAllDesktops || current.onAllDesktops));
89+
(window.x11DesktopIds.includes(workspace.currentDesktop) || window.x11DesktopIds.length == 0) &&
90+
(window.activities.includes(workspace.currentActivity) || window.activities.length == 0));
9191
debug("getting app group", appGroup.map(window => window.caption));
9292
return appGroup;
9393
}

metadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"KWin/Script",
1616
"KCModule"
1717
],
18-
"Version": "1.5",
18+
"Version": "1.6",
1919
"Website": ""
2020
},
2121
"X-Plasma-API": "javascript",

0 commit comments

Comments
 (0)