Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
1212028
WIP
zccrs Aug 2, 2024
0979705
Fix build on Qt6.6
zccrs Aug 28, 2024
ff2e8e3
Fix assert of adjustRectToMakePointVisible
zccrs Aug 29, 2024
973f6f1
Supports resize
zccrs Aug 29, 2024
9f821a9
Fix crash
zccrs Aug 29, 2024
9cacc00
Fix surface position on startup
zccrs Aug 29, 2024
c256efa
Fix qml warning when close window
zccrs Aug 29, 2024
bcf54b2
Fix close
zccrs Aug 29, 2024
1d86291
Fix assert failed in Output::addSurface
zccrs Aug 29, 2024
e011bb6
Fix xwayland surface can't visible
zccrs Aug 29, 2024
ee89112
Add stack* functions in SurfaceWrapper
zccrs Aug 29, 2024
91b9010
fix resize
zccrs Sep 3, 2024
69b4a1e
use QSizeF for resize surface
zccrs Sep 3, 2024
90de343
smooth resize
zccrs Sep 3, 2024
73c1060
move move/resize surface to Output class
zccrs Sep 3, 2024
4e15749
add SurfaceListModel
zccrs Sep 3, 2024
c6b2479
Add minimized surfaces model
zccrs Sep 4, 2024
2ebb1dd
Supports minimize
zccrs Sep 5, 2024
5ad0c5c
Add RootSurfaceContainer and LayerSurfaceContainer
zccrs Sep 5, 2024
0c03a54
Move some code form Helper to RootSurfaceContainer
zccrs Sep 6, 2024
ba0178f
Supports clip surface in output geometry
zccrs Sep 9, 2024
40498bd
Fix csd and update popup postion
wineee Sep 5, 2024
8dec9c8
Add SurfacePorxy
zccrs Sep 10, 2024
cfca612
Disable rounded corner effect on surface if it's maximized
zccrs Sep 11, 2024
45309f7
Fix crash in old tinywl
wineee Sep 11, 2024
6b733eb
Fix moc for outputCurosr not found
wineee Sep 11, 2024
7c5def4
feat: add wallpaper provider
Sep 4, 2024
7d3eda1
Don't apply delegate to subsurface item on default
zccrs Sep 12, 2024
224dbd3
update default wallpaper image file
zccrs Sep 12, 2024
1ec0d99
SurfaceItem: add boundingRect property
zccrs Sep 12, 2024
5847b13
Fix SurfaceWrapper::boundingRect
zccrs Sep 12, 2024
5b8c7fe
Support show darg surface
wineee Sep 11, 2024
38a0140
Fix reuse
zccrs Sep 12, 2024
6175e1a
Fix support for layer shell
wineee Sep 12, 2024
96438ef
Reomve unused isPopup for WLayerSurface
wineee Sep 12, 2024
94e1e17
Fix removeSurface twice when surface destory
wineee Sep 12, 2024
dbd9f5e
Add maximize animation
zccrs Sep 12, 2024
fec7b43
Fix maximize animation
zccrs Sep 13, 2024
261bf2e
Fix effectLoader actived when decoration is not enable
wineee Sep 12, 2024
800b731
Stop propagate qwlroots as it a static library
wineee Sep 13, 2024
8568427
Fix qml warning
zccrs Sep 13, 2024
b612844
Always use resize to change surface size on surface state change
zccrs Sep 13, 2024
5d08f2f
Disable move resize if surface state is not normal
zccrs Sep 13, 2024
ccfcd4b
Fix parent surface for foreigntoplevel
wineee Sep 13, 2024
177d4ae
Support popup layer
wineee Sep 13, 2024
350d54e
Fix taskbar radius
zccrs Sep 14, 2024
1239452
Add menu bar for output
zccrs Sep 14, 2024
a159dea
Add support for input popup
wineee Sep 14, 2024
a56f118
Support check capability for shell surface and better activate contorl
wineee Sep 14, 2024
a6b6d19
Add workspace switcher
zccrs Sep 18, 2024
1bebb92
Fixed multiple screen crashes
Dami-star Sep 19, 2024
cfcf549
Remove some codes
zccrs Sep 19, 2024
454d100
Add workspace switch button on output menu bar
zccrs Sep 19, 2024
c50767d
Add orderIndex in SurfaceListModel
zccrs Sep 19, 2024
70cad3a
Also implement wlr data control v1 in tinywl-new
wineee Sep 20, 2024
7e205a5
Fix can't get any output info in wlr-randr
wineee Sep 20, 2024
c1e0e9b
Don't ingore clear event in wlr gamma control
wineee Sep 20, 2024
09551e4
Fix stack error when SurfaceWrapper has child
wineee Sep 24, 2024
03077cc
Format the debian folder
Dami-star Sep 25, 2024
0eb4ed4
Add output settings
Dami-star Sep 25, 2024
1353754
Fix get error enabled in output manager
wineee Sep 29, 2024
28a8066
Add the WOutputViewport attribute to output
Dami-star Sep 29, 2024
a2ff100
Force uses software cursor on x11 output
zccrs Oct 8, 2024
90d03f3
refactor: export WOutputCursor
Groveer Oct 9, 2024
d93c549
refactor: rm WOutputItemAttached
Groveer Oct 9, 2024
f8a04fa
fix: spelling error
Groveer Oct 9, 2024
7c32f5c
Support WindowMenu in decoration
wineee Sep 24, 2024
1da0c9f
Support surfaceitem always on top
wineee Sep 27, 2024
613435e
Support resize in window menu
wineee Sep 27, 2024
78bf206
Fix typo
wineee Sep 27, 2024
9341da1
Add show on all workspace
wineee Sep 29, 2024
1d19b0f
Support always on visible workspace
wineee Sep 29, 2024
b7c323b
Move window menu to helper
wineee Sep 30, 2024
b30375a
WorkspaceModel should just inherit SurfaceListModel
wineee Sep 30, 2024
21fb923
Fix showWindowMenu for touch event and x11 and fix typo
wineee Sep 30, 2024
2aa15a6
Remove fill color on wallpaper when switch workspace
zccrs Oct 15, 2024
9d5cbd0
remove old tinywl-qtquick example
zccrs Oct 15, 2024
81f8936
ignore .vscode
zccrs Oct 15, 2024
f6929f8
update reuse
zccrs Oct 15, 2024
29ea5bf
fix nix build
zccrs Oct 15, 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ compile_commands.json
# qtcreator
*.autosave

# vscode
.vscode
1 change: 1 addition & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,6 @@ License: Apache-2.0 OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

# Misc
Files: tests/manual/cursor/res/HandCursor.png
examples/tinywl/res/xx.jpg
Copyright: None
License: CC0-1.0
45 changes: 22 additions & 23 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,39 @@ Source: waylib
Section: libdevel
Priority: optional
Maintainer: JiDe Zhang <zhangjide@deepin.org>
Build-Depends: debhelper (>= 9),
cmake,
pkg-config,
qt6-base-private-dev (>= 6.4.0),
qt6-base-dev-tools (>= 6.4.0),
qt6-declarative-private-dev (>= 6.4.0),
qml6-module-qtquick-templates,
qwlroots,
libwlroots-dev (>= 0.17.0),
libpixman-1-dev,
libxcb-ewmh-dev,
wayland-protocols,
wlr-protocols
Build-Depends: cmake,
debhelper (>= 9),
libpixman-1-dev,
libwlroots-dev (>= 0.17.0),
libxcb-ewmh-dev,
pkg-config,
qml6-module-qtquick-templates,
qt6-base-dev-tools (>= 6.4.0),
qt6-base-private-dev (>= 6.4.0),
qt6-declarative-private-dev (>= 6.4.0),
qwlroots,
wayland-protocols,
wlr-protocols,
Standards-Version: 3.9.8

Package: libwaylib
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Depends: ${misc:Depends}, ${shlibs:Depends},
Multi-Arch: same
Description: A wrapper for wlroots based on Qt
.
This package contains the shared libraries.

Package: libwaylib-dev
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends},
libwaylib (=${binary:Version}),
qt6-base-private-dev (>= 6.6.0),
qt6-base-dev-tools (>= 6.6.0),
qt6-declarative-private-dev (>= 6.6.0),
libwlroots-dev (>= 0.17.0),
wlr-protocols
Depends: libwaylib (=${binary:Version}),
libwlroots-dev (>= 0.17.0),
qt6-base-dev-tools (>= 6.6.0),
qt6-base-private-dev (>= 6.6.0),
qt6-declarative-private-dev (>= 6.6.0),
wlr-protocols,
${misc:Depends},
${shlibs:Depends},
Description: A devel package for libwaylib
.
This package contains the header files and static libraries of waylib.

4 changes: 2 additions & 2 deletions debian/libwaylib-dev.install
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
usr/lib/*/lib*.so
usr/include
usr/lib/*/pkgconfig
usr/lib/*/cmake
usr/lib/*/lib*.so
usr/lib/*/pkgconfig
8 changes: 4 additions & 4 deletions examples/blur/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ Item {
cursorDelegate: Cursor {
id: cursorItem

required property QtObject outputCurosr
required property QtObject outputCursor
readonly property point position: parent.mapFromGlobal(cursor.position.x, cursor.position.y)

cursor: outputCurosr.cursor
output: outputCurosr.output.output
cursor: outputCursor.cursor
output: outputCursor.output.output
x: position.x - hotSpot.x
y: position.y - hotSpot.y
visible: valid && outputCurosr.visible
visible: valid && outputCursor.visible
OutputLayer.enabled: true
OutputLayer.keepLayer: true
OutputLayer.flags: OutputLayer.Cursor
Expand Down
8 changes: 4 additions & 4 deletions examples/outputcopy/PrimaryOutputDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ OutputItem {
cursorDelegate: Cursor {
id: cursorItem

required property QtObject outputCurosr
required property QtObject outputCursor
readonly property point position: parent.mapFromGlobal(cursor.position.x, cursor.position.y)

cursor: outputCurosr.cursor
output: outputCurosr.output.output
cursor: outputCursor.cursor
output: outputCursor.output.output
x: position.x - hotSpot.x
y: position.y - hotSpot.y
visible: valid && outputCurosr.visible
visible: valid && outputCursor.visible
OutputLayer.enabled: true
OutputLayer.keepLayer: true
OutputLayer.flags: OutputLayer.Cursor
Expand Down
3 changes: 1 addition & 2 deletions examples/outputcopy/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ int main(int argc, char *argv[]) {
QGuiApplication app(argc, argv);

QQmlApplicationEngine waylandEngine;
waylandEngine.loadFromModule("OutputCopy", "Main");

Helper *helper = waylandEngine.singletonInstance<Helper*>("OutputCopy", "Helper");
Q_ASSERT(helper);
Expand All @@ -222,7 +221,7 @@ int main(int argc, char *argv[]) {
qw_output *newOutput = nullptr;

if (auto x11 = qw_x11_backend::from(backend)) {
newOutput = qw_output::from(x11->output_create());
newOutput = qw_output::from(x11->output_create());
} else if (auto wayland = qw_wayland_backend::from(backend)) {
newOutput = qw_output::from(wayland->output_create());
}
Expand Down
8 changes: 4 additions & 4 deletions examples/outputviewport/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ Item {
cursorDelegate: Cursor {
id: cursorItem

required property QtObject outputCurosr
required property QtObject outputCursor
readonly property point position: parent.mapFromGlobal(cursor.position.x, cursor.position.y)

cursor: outputCurosr.cursor
output: outputCurosr.output.output
cursor: outputCursor.cursor
output: outputCursor.output.output
x: position.x - hotSpot.x
y: position.y - hotSpot.y
visible: valid && outputCurosr.visible
visible: valid && outputCursor.visible
OutputLayer.enabled: true
OutputLayer.keepLayer: true
OutputLayer.flags: OutputLayer.Cursor
Expand Down
8 changes: 4 additions & 4 deletions examples/surface-delegate/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ Item {
cursorDelegate: Cursor {
id: cursorItem

required property QtObject outputCurosr
required property QtObject outputCursor
readonly property point position: parent.mapFromGlobal(cursor.position.x, cursor.position.y)

cursor: outputCurosr.cursor
output: outputCurosr.output.output
cursor: outputCursor.cursor
output: outputCursor.output.output
x: position.x - hotSpot.x
y: position.y - hotSpot.y
visible: valid && outputCurosr.visible
visible: valid && outputCursor.visible
OutputLayer.enabled: true
OutputLayer.keepLayer: true
OutputLayer.flags: OutputLayer.Cursor
Expand Down
36 changes: 36 additions & 0 deletions examples/tinywl/Border.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright (C) 2024 UnionTech Software Technology Co., Ltd.
// SPDX-License-Identifier: Apache-2.0 OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

import QtQuick

Item {
id: root

property real radius: 0

Rectangle {
id: outsideBorder
anchors {
fill: parent
margins: -border.width
}

color: "transparent"
border {
color: "yellow"
width: 1
}
radius: root.radius + border.width
}

Rectangle {
id: insideBorder
anchors.fill: parent
color: "transparent"
border {
color: "green"
width: 1
}
radius: root.radius
}
}
71 changes: 42 additions & 29 deletions examples/tinywl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,59 +10,72 @@ if(POLICY CMP0071)
cmake_policy(SET CMP0071 NEW)
endif()

set(QML_IMPORT_PATH "${PROJECT_BINARY_DIR}/src/server;${QML_IMPORT_PATH}" CACHE STRING "For LSP" FORCE)
set(QML_IMPORT_PATH ${CMAKE_BINARY_DIR}/src/server/ CACHE STRING "" FORCE)
option(START_DEMO "Start demo when boot" ON)

find_package(PkgConfig REQUIRED)
pkg_search_module(PIXMAN REQUIRED IMPORTED_TARGET pixman-1)
pkg_search_module(WAYLAND REQUIRED IMPORTED_TARGET wayland-server)

add_executable(tinywl-qtquick
main.cpp
)
set(TARGET tinywl-qtquick)

set_source_files_properties(QmlHelper.qml
PROPERTIES
QT_QML_SINGLETON_TYPE TRUE
add_executable(${TARGET}
main.cpp
)

qt_add_qml_module(tinywl-qtquick
qt_add_qml_module(${TARGET}
URI Tinywl
VERSION "1.0"
SOURCES
helper.h
QML_FILES
Main.qml
StackWorkspace.qml
XdgSurface.qml
LayerSurface.qml
TiledWorkspace.qml
QmlHelper.qml
OutputDelegate.qml
StackToplevelHelper.qml
TiledToplevelHelper.qml
WindowDecoration.qml
CloseAnimation.qml
MiniDock.qml
InputPopupSurface.qml
VERSION "2.0"

SOURCES helper.h helper.cpp
SOURCES surfacewrapper.h surfacewrapper.cpp
SOURCES workspace.h workspace.cpp
SOURCES output.h output.cpp
SOURCES qmlengine.h qmlengine.cpp
SOURCES surfacecontainer.h surfacecontainer.cpp
SOURCES layersurfacecontainer.h layersurfacecontainer.cpp
SOURCES rootsurfacecontainer.h rootsurfacecontainer.cpp
SOURCES surfaceproxy.h surfaceproxy.cpp
SOURCES wallpaperprovider.h wallpaperprovider.cpp
SOURCES wallpaperimage.h wallpaperimage.cpp
SOURCES workspacemodel.h workspacemodel.cpp

QML_FILES PrimaryOutput.qml
QML_FILES CopyOutput.qml
QML_FILES TitleBar.qml
QML_FILES Decoration.qml
QML_FILES TaskBar.qml
QML_FILES RoundedClipEffect.qml
QML_FILES SurfaceContent.qml
QML_FILES Shadow.qml
QML_FILES Border.qml
QML_FILES GeometryAnimation.qml
QML_FILES OutputMenuBar.qml
QML_FILES WorkspaceSwitcher.qml
QML_FILES WorkspaceProxy.qml
QML_FILES WindowMenu.qml

RESOURCES
"res/xx.jpg"
)

target_compile_definitions(tinywl-qtquick
target_compile_definitions(${TARGET}
PRIVATE
SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}"
PROJECT_BINARY_DIR="${PROJECT_BINARY_DIR}"
$<$<BOOL:${START_DEMO}>:START_DEMO>
WLR_USE_UNSTABLE
)

target_link_libraries(tinywl-qtquick
target_link_libraries(${TARGET}
PRIVATE
Qt6::Quick
Qt6::QuickControls2
Qt6::QuickPrivate
Waylib::WaylibServer
PkgConfig::PIXMAN
PkgConfig::WAYLAND
)

if (INSTALL_TINYWL)
install(TARGETS tinywl-qtquick DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS ${TARGET} DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
Loading