The grab bar didn't move the window by mouse, and the corner grip never resized it (the bar's handler took over its drag). The bar and grip now start the window manager's move/resize, and Super+LMB/RMB work too. A KWin rule in kwinrulesrc keeps the window above and unfocused, off the taskbar, pager and switcher, and remembers its position. KWin now places the window and keeps it on screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
964 B
QML
37 lines
964 B
QML
import QtQuick
|
|
|
|
// Corner grip. Resizing is up to the owner (the window manager's resize).
|
|
Item {
|
|
id: grip
|
|
|
|
signal dragStarted()
|
|
|
|
implicitWidth: 28
|
|
implicitHeight: 28
|
|
|
|
// Two strokes across the corner, each from (w - d, h) to (w, h - d).
|
|
Repeater {
|
|
model: [9, 16]
|
|
Rectangle {
|
|
required property real modelData
|
|
readonly property real inset: 4
|
|
|
|
width: modelData * Math.SQRT2
|
|
height: 2
|
|
radius: 1
|
|
color: Theme.handle
|
|
rotation: -45
|
|
x: grip.width - inset - modelData / 2 - width / 2
|
|
y: grip.height - inset - modelData / 2 - height / 2
|
|
}
|
|
}
|
|
|
|
DragHandler {
|
|
target: null
|
|
// The grab bar lies underneath and would take the drag over.
|
|
grabPermissions: PointerHandler.TakeOverForbidden
|
|
cursorShape: Qt.SizeFDiagCursor
|
|
onActiveChanged: if (active) grip.dragStarted()
|
|
}
|
|
}
|