Bug 459369 - Some scripts stopped working
Summary: Some scripts stopped working
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: scripts (show other bugs)
Version: 5.25.90
Platform: Other Other
: HI normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-09-19 07:20 UTC by Iyán Méndez Veiga
Modified: 2022-09-23 18:23 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Iyán Méndez Veiga 2022-09-19 07:20:43 UTC
SUMMARY
After installing Plasma 5.26 beta, some Kwin scripts stopped working for me. The most relevant for me is Mudeer (https://github.com/darkstego/Mudeer). I try disabling and enabling back, deleting and reinstalling, but it is not working.


STEPS TO REPRODUCE
1. Update to Plasma 5.26 beta
2. Try to use Mudeer

OBSERVED RESULT
None of the shortcuts work anymore


EXPECTED RESULT
Scripts should not break after updating plasma.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.90
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Kernel Version: 5.19.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: LENOVO
Product Name: 20XYCTO1WW
System Version: ThinkPad X1 Yoga Gen 6

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2022-09-19 10:55:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2974
Comment 2 Vlad Zahorodnii 2022-09-19 15:00:34 UTC
Git commit 4696bdaa05f3990b3e70fa276c565ea623df1d5c by Vlad Zahorodnii.
Committed on 19/09/2022 at 13:58.
Pushed by vladz into branch 'master'.

scripting: Add js object <-> QRectF/QSizeF/QPointF conversion helpers

The js code contains code such as

    window.frameGeometry = {x: 42, y: 42, width: 100, height: 50};

However, QJSEngine doesn't know how to convert js object to QRect. For
that purpose, we need to register conversion functions.

So far, we kept registering converter functions only for integer based
geometry types, i.e. QRect, QSize and QPoint. In 5.26, Window was ported
to QRectF, QSizeF and QPointF, but the corresponding conversion helpers
were not added.

M  +31   -0    src/scripting/scripting.cpp

https://invent.kde.org/plasma/kwin/commit/4696bdaa05f3990b3e70fa276c565ea623df1d5c
Comment 3 Vlad Zahorodnii 2022-09-19 15:02:01 UTC
Git commit 0f668b05c85046fd51a41d5febc611221f4dd00a by Vlad Zahorodnii.
Committed on 19/09/2022 at 15:01.
Pushed by vladz into branch 'Plasma/5.26'.

scripting: Add js object <-> QRectF/QSizeF/QPointF conversion helpers

The js code contains code such as

    window.frameGeometry = {x: 42, y: 42, width: 100, height: 50};

However, QJSEngine doesn't know how to convert js object to QRect. For
that purpose, we need to register conversion functions.

So far, we kept registering converter functions only for integer based
geometry types, i.e. QRect, QSize and QPoint. In 5.26, Window was ported
to QRectF, QSizeF and QPointF, but the corresponding conversion helpers
were not added.


(cherry picked from commit 4696bdaa05f3990b3e70fa276c565ea623df1d5c)

M  +31   -0    src/scripting/scripting.cpp

https://invent.kde.org/plasma/kwin/commit/0f668b05c85046fd51a41d5febc611221f4dd00a
Comment 4 Iyán Méndez Veiga 2022-09-20 14:52:48 UTC
The issue with the scripts is fixed now with the patch, but I still see some errors with journalctl. Maybe is a different thing, but I will copy here just in case.

kwin_wayland[903]: kwin_core: precision lost! floating value sent to X 1.25
kwin_wayland[903]: kwin_core: precision lost! floating value sent to X 1.25
kwin_wayland[903]: kwin_core: precision lost! floating value sent to X -1.25
kwin_wayland[903]: kwin_core: precision lost! floating value sent to X -1.25
kwin_wayland[903]: kwin_core: precision lost! floating value sent to X 1392.5
kwin_wayland[903]: kwin_core: precision lost! floating value sent to X 1392.5