Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
93cb056
fix: remove unused lambda captures
romangg Feb 14, 2024
2b376f5
build: disable cast-align warnings
romangg Feb 14, 2024
3d99c78
build: disable missing-field-initializers warning
romangg Feb 19, 2024
cfe3793
fix: remove unused symbols
romangg Feb 18, 2024
d802874
fix: compare numbers without implicit casts
romangg Feb 18, 2024
a1920e1
fix(plugin): compare desktop number not pointer
romangg Feb 19, 2024
4e4fb4b
fix: cast to int for comparison with zero
romangg Feb 19, 2024
5cd7027
test: explicitly default ctors
romangg Feb 18, 2024
03abf83
build: add control files to input lib
romangg Feb 19, 2024
cb7cc66
fix: export class
romangg Feb 19, 2024
4a47c55
fix(wl): remove unique connection specifier
romangg Feb 19, 2024
90c6e5a
build: include ECM sanitizers support
romangg Feb 19, 2024
399afca
build: find Kirigami package with new name
romangg Feb 19, 2024
c6f2ef7
fix(x11): order initializer list
romangg Feb 19, 2024
8749c61
test: compare as std::string
romangg Feb 19, 2024
8cf5256
fix(plugin): use different names for Qt properties
romangg Feb 19, 2024
16228f8
test: compare with braces
romangg Feb 19, 2024
a57a28e
fix: mark fallthrough
romangg Feb 19, 2024
51d6b21
test: return without move
romangg Feb 19, 2024
39f46c9
refactor(x11): remove unused key server functions
romangg Feb 19, 2024
5bfe293
docs: improve readme
romangg Feb 18, 2024
210de83
docs: add feature table
romangg Feb 18, 2024
26676e7
docs: update contact information
romangg Feb 18, 2024
36a8b23
ci: provide package name
romangg Feb 18, 2024
de9eb4a
ci: install Wrapland from package artifact
romangg Feb 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/actions/dep-artifact-generic/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# SPDX-FileCopyrightText: 2024 Roman Gilg <[email protected]>
# SPDX-License-Identifier: MIT
name: Install Dependency via Artifact
description: Uses tar package from other workflow to install on Arch
inputs:
repo:
description: Path to repo where to download the dependency from
required: true
branch:
description: Branch from which to download the artifact
required: false
default: master
dep-name:
description: Name of the dependency file
required: true
secret:
description: Secret
required: true
runs:
using: "composite"
steps:
- name: Download artifact
uses: dawidd6/action-download-artifact@v3
with:
name: tar-package
repo: ${{ inputs.repo }}
branch: ${{ inputs.branch }}
workflow_search: true
github_token: ${{ inputs.secret }}
- name: Untar
run: tar -xf ${{ inputs.dep-name }}.tar.gz
shell: bash
- name: Install
run: cp -r ${{ inputs.dep-name }}/* /usr
shell: bash
17 changes: 17 additions & 0 deletions .github/actions/dep-artifacts/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: 2024 Roman Gilg <[email protected]>
# SPDX-License-Identifier: MIT
name: Specialized Install Dependency via Artifact
description: Calls into more generic dep-artifact-generic to install dependency
inputs:
secret:
description: Secret
required: true
runs:
using: "composite"
steps:
- name: Install Wrapland
uses: ./.github/actions/dep-artifact-generic
with:
repo: winft/wrapland
dep-name: wrapland
secret: ${{ inputs.secret }}
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Dependencies
uses: ./.github/actions/dep-artifacts
with:
secret: ${{ secrets.GITHUB_TOKEN }}
- run: mkdir build
- name: Configure
run: cmake -S . -B build ${{ needs.set-cmake-args.outputs.args }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/change.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ jobs:
needs: build
with:
image: registry.gitlab.com/kwinft/ci-images/archlinux/kwinft-base-master
package-name: como
12 changes: 8 additions & 4 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
required: false
type: string
default: 'build'
package-name:
description: Name of the resulting packages
required: true
type: string

jobs:
deb:
Expand All @@ -30,12 +34,12 @@ jobs:
- name: Untar artifact
run: tar -xzf build-dir.tar
- name: Run CPack
run: cd build && cpack -G DEB -D CPACK_DEBIAN_FILE_NAME=como.deb
run: cd build && cpack -G DEB -D CPACK_DEBIAN_FILE_NAME=${{ inputs.package-name }}.deb
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: deb-package
path: build/_CPack_Packages/Linux/DEB/como.deb
path: build/_CPack_Packages/Linux/DEB/${{ inputs.package-name }}.deb
retention-days: 8

tar:
Expand All @@ -55,10 +59,10 @@ jobs:
- name: Run CPack
# Need to use CPACK_PACKAGE_FILE_NAME instead of CPACK_ARCHIVE_FILE_NAME
# See: https://gitlab.kitware.com/cmake/cmake/-/issues/20419
run: cd build && cpack -G TGZ -D CPACK_PACKAGE_FILE_NAME=como
run: cd build && cpack -G TGZ -D CPACK_PACKAGE_FILE_NAME=${{ inputs.package-name }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: tar-package
path: build/_CPack_Packages/Linux/TGZ/como.tar.gz
path: build/_CPack_Packages/Linux/TGZ/${{ inputs.package-name }}.tar.gz
retention-days: 8
1 change: 1 addition & 0 deletions .github/workflows/rebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ jobs:
needs: build
with:
image: registry.gitlab.com/kwinft/ci-images/archlinux/kwinft-base-master
package-name: como
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Dependencies
uses: ./.github/actions/dep-artifacts
with:
secret: ${{ secrets.GITHUB_TOKEN }}
- name: Download artifact
uses: actions/download-artifact@v4
with:
Expand Down
13 changes: 11 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,21 @@ include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)

# TODO(romangg): The KDECompilerSettings include adds cast-align warnings. But with wlroots and
# libwayland we have too many C casts like this. For now disable the cast-align warning again.
# Should we instead wrap the calls and disable the warnings with pragma more targeted?
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-cast-align")

# Produces a lot of warnings with gcc on structs where we default-initialize some fields.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers")

include(ECMInstallIcons)
include(ECMOptionalAddSubdirectory)
include(ECMConfiguredInstall)
include(ECMQmlModule)
include(ECMGenerateQmlTypes)
include(ECMSetupVersion)
include(ECMEnableSanitizers)

ecm_setup_version(PROJECT
VARIABLE_PREFIX COMO
Expand Down Expand Up @@ -112,8 +121,8 @@ set_package_properties(KF6DocTools PROPERTIES
)
add_feature_info("KF6DocTools" KF6DocTools_FOUND "Enable building documentation")

find_package(KF6Kirigami2 ${KF6_MIN_VERSION} CONFIG)
set_package_properties(KF6Kirigami2 PROPERTIES
find_package(KF6Kirigami ${KF6_MIN_VERSION} CONFIG)
set_package_properties(KF6Kirigami PROPERTIES
DESCRIPTION "A QtQuick based components set"
PURPOSE "Required at runtime for several QML effects"
TYPE RUNTIME
Expand Down
5 changes: 0 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ SPDX-License-Identifier: GPL-2.0-or-later
- [Commit Message Guideline](#commit-message-guideline)
- [Example](#example)
- [Tooling](#tooling)
- [Contact](#contact)

## Logging and Debugging
The first step in contributing to the project by either providing meaningful feedback or by directly
Expand Down Expand Up @@ -240,16 +239,12 @@ amendments:
### Tooling
See [Wrapland's documentation][wrapland-tooling] for available tooling.

## Contact
See [Wrapland's documentation][wrapland-contact] for contact information.

[angular-revert]: https://github.com/angular/angular/blob/3cf2005a936bec2058610b0786dd0671dae3d358/CONTRIBUTING.md#revert
[angular-subject]: https://github.com/angular/angular/blob/3cf2005a936bec2058610b0786dd0671dae3d358/CONTRIBUTING.md#subject
[conventional-commits]: https://www.conventionalcommits.org/en/v1.0.0/#specification
[frameworks-style]: https://community.kde.org/Policies/Frameworks_Coding_Style
[issue]: https://github.com/winft/como/issues
[pull-requests]: https://github.com/winft/como/pulls
[wrapland-contact]: https://github.com/winft/wrapland/blob/master/CONTRIBUTING.md#contact
[wrapland-large-changes]: https://github.com/winft/wrapland/blob/master/CONTRIBUTING.md#issues-for-large-changes
[wrapland-submissions]: https://github.com/winft/wrapland/blob/master/CONTRIBUTING.md#submission-guideline
[wrapland-tooling]: https://github.com/winft/wrapland/blob/master/CONTRIBUTING.md#tooling
81 changes: 70 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,79 @@ This cross-desktop interoperability will be expanded upon in the future.

**Ease of Use**
<br>
With the Compositor Modules a Wayland compositor can be created with a handful of lines only.
With The Compositor Modules a Wayland compositor can be created with a handful of lines only.
See our MVP [Minico](tests/minico) for an example of that.

**Customizability**
<br>
The Compositor Modules make heavy use of C++ templates. This allows consumers to replace
many functions and types with customized versions when required.

# Values

**Stability and robustness**
## Wayland Feature Table
X11 support is feature complete.
For the current state of Wayland the following table provides a detailed look at available and planned features.

| Feature | | Available | Planned |
| ------------------- | ----------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| Composition | :white_check_mark: | With OpenGL or in software | |
| Input methods | :white_check_mark: | [text-input v2][text-input-v2] [v3][text-input-v3], [input-method v2][input-method-v2] | |
| Primary selection | :white_check_mark: | [primary-selection][primary-selection] protocol | |
| Xwayland | :white_check_mark: | Optional at run *and* compile time | |
| VR | :white_check_mark: | [DRM lease][drm-lease] protocol support | |
| Adaptive sync / VRR | :white_check_mark: | Via wlroots [backend][wlr-adaptive-sync] and [protocol][wlr-prot-adaptive-sync] | |
| Present feedback | :white_check_mark: | [presentation-time][presentation-time] protocol support | |
| CSD and SSD | :white_check_mark: | CSD by convention and KWin SSD | |
| Windowing logic | :ballot_box_with_check: | Floating WM; optional rules, scripts | Tiling WM functions |
| Effects | :ballot_box_with_check: | KWin effects plugins | Plugin system similar to Wayfire |
| Desktop shells | :ballot_box_with_check: | KDE Plasma, [wlr-layer-shell][wlr-layer-shell] | [wlr-foreign-toplevel-management][wlr-foreign-toplevel-management] |
| Lockscreen | :ballot_box_with_check: | KDE Plasma lockscreen integration | [session-lock][session-lock] protocol |
| Fractional scaling | :ballot_box_with_check: | Downscaling for Wayland surfaces | Xwayland, [factional-scale][factional-scale] protocol |
| Output control | :ballot_box_with_check: | [wlr-output-management][wlr-output-management] | [Mirroring][clone-wlroots-mr] |
| Configuration | :ballot_box_with_check: | KWin config files via [KConfig][kconfig] | Generic API independent of KDE |
| Video capture | :x: | | Using xdg-portals and pipewire |
| HDR | :x: | | When [protocol][color-management-protocol] lands or [KWin-like][hdr-kwin] |
| Direct scanout | :x: | | With more wlroots render integration |
| Vulkan render | :x: | | With more wlroots render integration |
| Graphic tablets | :x: | | [tablet][tablet-protocol] protocol |
| Multiseat | :x: | | Full support, but low priority |
| C++20 modules | :x: | | When compiler support improves |
| No Qt/KDE linking | :x: | | For a subset of features |

<!------------------------------------------------------------------------------------------------>
[clone-wlroots-mr]: https://gitlab.freedesktop.org/wlroots/wlr-protocols/-/merge_requests/116
[presentation-time]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/tree/main/stable/presentation-time
[drm-lease]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/tree/main/staging/drm-lease
[vrr]: https://en.wikipedia.org/wiki/Variable_refresh_rate
[kconfig]: https://api.kde.org/frameworks/kconfig/html/
[wlr-adaptive-sync]: https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/842093bb843ae6c719c2b1cf32eb749cab9e46ca/include/wlr/types/wlr_output.h#L87
[wlr-prot-adaptive-sync]: https://gitlab.freedesktop.org/wlroots/wlr-protocols/-/blob/2b8d43325b7012cc3f9b55c08d26e50e42beac7d/unstable/wlr-output-management-unstable-v1.xml#L344-L357
[text-input-v2]: https://github.com/winft/wrapland/blob/master/server/text_input_v2.h
[text-input-v3]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/unstable/text-input/text-input-unstable-v3.xml
[input-method-v2]: https://github.com/swaywm/wlroots/blob/master/protocol/input-method-unstable-v2.xml
[factional-scale]: https://wayland.app/protocols/fractional-scale-v1
[wlr-foreign-toplevel-management]: https://wayland.app/protocols/wlr-foreign-toplevel-management-unstable-v1
[wlr-layer-shell]: https://wayland.app/protocols/wlr-layer-shell-unstable-v1
[wlr-output-management]: https://wayland.app/protocols/wlr-output-management-unstable-v1
[session-lock]: https://wayland.app/protocols/ext-session-lock-v1
[primary-selection]: https://wayland.app/protocols/primary-selection-unstable-v1
[color-management-protocol]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/14
[hdr-kwin]: https://zamundaaa.github.io/wayland/2023/12/18/update-on-hdr-and-colormanagement-in-plasma.html
[tablet-protocol]: https://wayland.app/protocols/tablet-unstable-v2
<!------------------------------------------------------------------------------------------------>

# Tenets

**Stability and Robustness**

This is achieved through upholding strict development standards
and deploying modern development methods to prevent regressions and code smell.

**Collaboration with competitors and upstream partners**
**Collaboration With Downstream and Upstream Partners**

We want to overcome antiquated notions on community divisions
and work together on the best possible Linux graphics platform.
We want to overcome antiquated notions on community division
and work together on the best possible Linux graphics platform instead.

**Value the knowledge of experts but also the curiosity of beginners**
**Value the Knowledge of Experts and the Curiosity of Beginners**

Well defined and transparent decision processes enable expert knowledge to proliferate
and new contributors to easily find help on their first steps.
Expand All @@ -64,12 +116,19 @@ You can also make use of the FDBuild tool to automate that process as described
[here](CONTRIBUTING.md#compiling).

# Usage
It's easiest to link via CMake to the Compositor Modules libraries that you want to use.
As an example check out the test code of [Minico](tests/minico) and the [Plasma binaries](tests/plasma).
It's easiest to link via CMake to The Compositor Modules libraries that you want to make use of
and then create their central platform types from your main function to launch the compositor session.

[Minico](tests/minico) as a minimal example and the [Plasma test binaries](tests/plasma)
as a more complex one demonstrate this in a straightforward way.

# Development
The [CONTRIBUTING.md](CONTRIBUTING.md) document contains all information
on how to get started with:
* providing useful debug information,
* building the Compositor Modules
* building The Compositor Modules
* and doing your first code submission to the project.

# Contact
Issue tickets can be created for feature requests, bug reports or general discussions.
For direct communication join our [Matrix room](https://matrix.to/#/#como:matrix.org).
8 changes: 4 additions & 4 deletions autotests/gestures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ TEST_CASE("gestures unit", "[input],[unit]")
{
SECTION("swipe min finger")
{
auto count = GENERATE(0, 1, 10);
auto count = GENERATE(0u, 1u, 10u);

win::swipe_gesture swipeGesture;
QCOMPARE(swipeGesture.minimumFingerCountIsRelevant(), false);
Expand All @@ -35,7 +35,7 @@ TEST_CASE("gestures unit", "[input],[unit]")

SECTION("pinch min finger")
{
auto count = GENERATE(0, 1, 10);
auto count = GENERATE(0u, 1u, 10u);

win::pinch_gesture pinchGesture;
QCOMPARE(pinchGesture.minimumFingerCountIsRelevant(), false);
Expand All @@ -52,7 +52,7 @@ TEST_CASE("gestures unit", "[input],[unit]")

SECTION("swipe max finger")
{
auto count = GENERATE(0, 1, 10);
auto count = GENERATE(0u, 1u, 10u);

win::swipe_gesture gesture;
QCOMPARE(gesture.maximumFingerCountIsRelevant(), false);
Expand All @@ -69,7 +69,7 @@ TEST_CASE("gestures unit", "[input],[unit]")

SECTION("pinch max finger")
{
auto count = GENERATE(0, 1, 10);
auto count = GENERATE(0u, 1u, 10u);

win::pinch_gesture gesture;
QCOMPARE(gesture.maximumFingerCountIsRelevant(), false);
Expand Down
Loading