Bug 486831 - workspace.currentDesktop doesn't work under wayland
Summary: workspace.currentDesktop doesn't work under wayland
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: scripting (show other bugs)
Version: 6.0.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-10 06:12 UTC by green
Modified: 2024-05-12 02:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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