Bug 487703 - workspace.activateWindow missing
Summary: workspace.activateWindow missing
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: scripting (show other bugs)
Version: 6.0.5
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-28 17:30 UTC by Manuel Amador (Rudd-O)
Modified: 2024-05-29 15:24 UTC (History)
2 users (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 Manuel Amador (Rudd-O) 2024-05-28 17:30:30 UTC
Cannot call activateWindow on workspacewrapper JS object, despite being documented here: https://develop.kde.org/docs/plasma/kwin/api/#read-only-properties-4

raiseWindow does not focus the supplied window so this is not the same as activating and is not enough.

Sample code at https://rudd-o.com/linux-and-free-software/how-to-raise-a-window-under-wayland-or-x11-when-using-kde-kwin-plasma/ see commented try/catch block.
Comment 1 David Redondo 2024-05-29 07:23:02 UTC
I think the comment is wrong and you need to use  the active window property

https://develop.kde.org/docs/plasma/kwin/api/#read-write-properties
Comment 2 Manuel Amador (Rudd-O) 2024-05-29 15:24:06 UTC
Yep it appears the comment is wrong and it should be fixed, but activeWindow property works.