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:
JulianandClaude Opus 5 committed 2026-09-11 10:21:51 +02:00
1 parent d685bf492a
commit a01843a312
9 files changed
+17 -282

No files matched your search

-19
View File
@@ -17,7 +17,6 @@ qt_add_executable(tncat
src/catcontroller.h src/catcontroller.cpp
src/appsettings.h src/appsettings.cpp
src/platforminfo.h src/platforminfo.cpp
src/windowshape.h src/windowshape.cpp
)
target_include_directories(tncat PRIVATE src)
@@ -39,24 +38,6 @@ qt_add_qml_module(tncat
target_link_libraries(tncat PRIVATE
Qt6::Core Qt6::Gui Qt6::Quick Qt6::QuickShapes)
# Without a compositor, X11 renders a transparent background as black. The
# shape extension is the way out: it cuts the window down to the cat itself.
# Both libraries ship with X11 and Qt's own xcb plugin already uses them.
if(UNIX AND NOT APPLE)
find_package(PkgConfig QUIET)
if(PkgConfig_FOUND)
pkg_check_modules(TNCAT_XCB IMPORTED_TARGET xcb xcb-shape)
endif()
if(TARGET PkgConfig::TNCAT_XCB)
target_link_libraries(tncat PRIVATE PkgConfig::TNCAT_XCB)
target_compile_definitions(tncat PRIVATE TNCAT_HAVE_XCB_SHAPE)
else()
message(STATUS "TNCat: xcb-shape not found. Without a compositor the cat "
"will sit in a black box; install libxcb-shape0-dev or "
"xcb-util-dev and reconfigure.")
endif()
endif()
set_target_properties(tncat PROPERTIES
MACOSX_BUNDLE TRUE
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/Info.plist.in