Files
TNCcat/qml/CupWindow.qml
T
JulianandClaude Opus 5 a01843a312 Revert the X11 window shaping
It did not build, xcb_shape_id was not resolving, and it was not worth fixing.
It bought a workaround for one configuration, cost two libraries and a window
grab fifteen times a second, and still gave harder edges than the thing it was
working around.

Qt's transparent window background is the right mechanism and it already works.
On X11 it needs a compositing manager, which Xfce ships with and which was
simply switched off. The warning that names that setting stays, so the cause
shows up in the log.

Kept from the reverted commit: opaque mode paints a neutral card rather than
the coat colour.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 10:21:51 +02:00

30 lines
923 B
QML

pragma ComponentBehavior: Bound
import QtQuick
import TNCat
// The mug stands on the ground next to the cat, click-through like the chip.
Window {
id: win
required property CatController cat
required property AppSettings settings
readonly property int cupSize: Math.round(settings.catSize * 0.38)
width: cupSize
height: Math.round(width * mug.implicitHeight / mug.implicitWidth)
x: cat.cupX - width / 2
y: Screen.desktopAvailableHeight - height - settings.bottomMargin
color: Platform.opaqueBackground ? "#d8d8d8" : "transparent"
flags: Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint | Qt.Tool
| Qt.NoDropShadowWindowHint | Qt.WindowDoesNotAcceptFocus
| Qt.WindowTransparentForInput
| (Platform.bypassWindowManager ? Qt.X11BypassWindowManagerHint : 0)
visible: cat.cupVisible
Cup {
id: mug
anchors.fill: parent
}
}