Modularization and library split out
This is an overview task.
Problem statement
The KWinFT core is too monolithic. There are Platform plugins, but they are part of the KWinFT source too.
Solution idea
The goal is to factor out a library collection that can be used together with Wrapland to build other Wayland C++ compositors in a low-level way.
Approach
In general candidates for libraries to split our are:
- Platform with its plugins
- Input handling
- Basic window management
- XWayland integration
- ...
The glue between these libraries would be the exported Wrapland base classes.
Overview
lib: reusable future libraries
bin: what remains of the binary
- Libaries interact with each other.
- The connection between Wrapland and the Scene/Platform library is necessary for output management.
- Configuration library likely only depends on basic window management if at all.
- Designing the relations between basic window management, input and Wrapland libraries looks to be the most challenging task here.
Open questions
- How would this work with the XSession. Could we just "replace" the "glue" with XCB structs in a similar way?
- Since the libraries are all supposed to be modern C++ only, should we wait until C++20 modules are available in CMake/latest compilers and design them around these directly?
Edited by Roman Gilg