https://bugs.kde.org/show_bug.cgi?id=443723

--- Comment #9 from Vlad Zahorodnii <vlad.zahorod...@kde.org> ---
(In reply to Sebastian E. from comment #8)
> Yet another feature dropped. :/
> 
> I skimmed through the scripting documentation
> (https://develop.kde.org/docs/extend/plasma/scripting/api/), and need some
> hints. How can I register a listener for window events like resize/move, and

workspace.clientAdded.connect((client) => {
    client.clientStartUserMovedResized((client) => console.log("interactive
move resize started", client.caption);
    client.clientStepUserMovedResized((client, rect) => console.log("geometry
changed", rect.x, rect.y, rect.width, rect.height));
    client.clientFinishUserMovedResized(() => console.log("interactive move
resize finished");
});

> how can I create a tip, which would be a top level window without
> decoration, I guess?

you could create a plasma dialog dynamically (see
https://doc.qt.io/qt-5/qtqml-javascript-dynamicobjectcreation.html) when the
clientStartUserMovedResized signal is emitted and destroy it when the
clientFinishUserMovedResized signal is emitted

    PlasmaCore.Dialog {
        location: PlasmaCore.Types.Floating
        flags: Qt.X11BypassWindowManagerHint | Qt.FramelessWindowHint
        x: client.x + client.width / 2 - width / 2
        y: client.y + client.height / 2 - height / 2

        Label {} // a label with geometry text
    }

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to