Bug 486831

Summary: workspace.currentDesktop doesn't work under wayland
Product: [Plasma] kwin Reporter: green
Component: scriptingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: xaver.hugl
Priority: NOR    
Version First Reported In: 6.0.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description green 2024-05-10 06:12:29 UTC
The `workspace.currentDesktop` property always returns `null`

STEPS TO REPRODUCE
1. Write a kwinscript that uses `workspace.currentDesktop`

OBSERVED RESULT

`null` is returned

EXPECTED RESULT

An integer representing the current virtual desktop should be returned.

SOFTWARE/OS VERSIONS
Linux:  Archlinux
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Comment 1 green 2024-05-10 06:14:25 UTC
plasma-interactiveconsole reports:

kf.windowsystem: static int KX11Extras::currentDesktop() may only be used on X11
Comment 2 Zamundaaa 2024-05-10 14:13:52 UTC
> An integer representing the current virtual desktop should be returned
The API returns a VirtualDesktop object, not an integer