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>
This commit is contained in:
1 parent
d685bf492a
commit
a01843a312
9 files changed
+17
-282
No files matched your search
@@ -99,24 +99,18 @@ input mask, which would make the overlay swallow every click on the desktop.
|
||||
|
||||
This is the main target. Two things to know.
|
||||
|
||||
**Transparency needs a compositor.** Without one, X11 has no alpha channel to
|
||||
composite against and the transparent window background renders as a black box
|
||||
around the cat. In Xfce it is one checkbox: Settings, Window Manager Tweaks,
|
||||
Compositor, Enable display compositing. That is the best answer, because alpha
|
||||
gives smooth edges.
|
||||
**Transparency needs a compositor.** Qt draws the cat on a transparent window
|
||||
background, and on X11 that only works while a compositing manager is running.
|
||||
Without one there is no alpha channel to blend against and the background comes
|
||||
out black, so the cat sits in a black box.
|
||||
|
||||
When TNCat sees a window come up without an alpha channel it says so and falls
|
||||
back to shaping the window with the X11 shape extension: the window is cut down
|
||||
to the pixels the cat covers, so there is no box left to be black. The shape is
|
||||
one bit per pixel, so edges are harder than with a compositor, and it is
|
||||
refreshed 15 times a second to follow the animation. Measured on a sitting cat
|
||||
in a 120 x 106 window, the shape is 96 rectangles covering 29 percent of the
|
||||
window.
|
||||
Xfce has a compositor built in. Turn it on under Settings, Window Manager
|
||||
Tweaks, Compositor, Enable display compositing. That is the whole fix.
|
||||
|
||||
Shaping needs `xcb` and `xcb-shape` at build time (`libxcb-shape0-dev` on
|
||||
Debian and Ubuntu, `xcb-util-devel` on SUSE). CMake says so if they are
|
||||
missing, and the build still works without them. `TNCAT_OPAQUE=1` skips the
|
||||
whole question and paints a solid background.
|
||||
TNCat prints a warning naming that setting when its window comes up without an
|
||||
alpha channel, so the cause is in the log rather than left to guesswork. If the
|
||||
compositor has to stay off, `TNCAT_OPAQUE=1` paints a solid background instead:
|
||||
the cat then sits on a plain card, which is honest but not pretty.
|
||||
|
||||
**Keeping the cat on top.** The default is a frameless `Qt::Tool` window that
|
||||
stays on top. If the window manager puts it behind other windows or shows it in
|
||||
|
||||
Reference in new issue
Block a user