Skip to content

Commit 4a82949

Browse files
committed
feat(wayland): custom layershell implementation
A fair amount of things are broken but not in the layershell interface itself. The shell window platform extensions are next in line for refactoring and relevent issues will be fixed then. Same for docs.
1 parent b0567a5 commit 4a82949

21 files changed

+1167
-401
lines changed

.clang-format

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ SpaceBeforeInheritanceColon: false
3131
SpaceBeforeParens: ControlStatementsExceptControlMacros
3232
SortIncludes: CaseSensitive
3333
PointerAlignment: Left
34-
PackConstructorInitializers: NextLine
34+
PackConstructorInitializers: CurrentLine
3535
LineEnding: LF
3636
InsertBraces: false
37-
BreakConstructorInitializers: AfterColon
37+
BreakConstructorInitializers: BeforeComma
3838
BreakBeforeBraces: Custom
39-
BreakInheritanceList: AfterColon
39+
BreakInheritanceList: BeforeComma
4040
AllowAllParametersOfDeclarationOnNextLine: false
4141
AllowAllArgumentsOnNextLine: false
4242
AlwaysBreakTemplateDeclarations: Yes

CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ set(QT_MIN_VERSION "6.6.0")
55
set(CMAKE_CXX_STANDARD 20)
66
set(CMAKE_CXX_STANDARD_REQUIRED ON)
77

8-
option(LAYERSHELL "Enable wayland layershell support" ON)
9-
108
option(WAYLAND "Enable wayland support" ON)
119

1210
add_compile_options(-Wall -Wextra)

Justfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ clean:
3030
rm -rf {{builddir}}
3131

3232
run *ARGS='': build
33-
{{builddir}}/quickshell {{ARGS}}
33+
{{builddir}}/src/core/quickshell {{ARGS}}

src/core/CMakeLists.txt

+1-10
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,4 @@ qt_add_executable(quickshell
1616

1717
qt_add_qml_module(quickshell URI QuickShell)
1818

19-
target_link_libraries(quickshell PRIVATE ${QT_DEPS} quickshell-wayland)
20-
21-
if (LAYERSHELL)
22-
find_package(LayerShellQt REQUIRED)
23-
24-
target_link_libraries(quickshell PRIVATE LayerShellQtInterface)
25-
target_compile_definitions(quickshell PRIVATE CONF_LAYERSHELL)
26-
27-
target_sources(quickshell PRIVATE layershell.cpp)
28-
endif()
19+
target_link_libraries(quickshell PRIVATE ${QT_DEPS} quickshell-waylandplugin)

src/core/layershell.cpp

-300
This file was deleted.

src/core/main.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
#include "rootwrapper.hpp"
1212

13-
#ifdef CONF_LAYERSHELL
14-
#include <LayerShellQt/shell.h>
15-
#endif
16-
1713
int main(int argc, char** argv) {
1814
const auto app = QGuiApplication(argc, argv);
1915
QGuiApplication::setApplicationName("quickshell");
@@ -42,10 +38,6 @@ int main(int argc, char** argv) {
4238
return -1;
4339
}
4440

45-
#if CONF_LAYERSHELL
46-
LayerShellQt::Shell::useLayerShell();
47-
#endif
48-
4941
// Base window transparency appears to be additive.
5042
// Use a fully transparent window with a colored rect.
5143
QQuickWindow::setDefaultAlphaBuffer(true);

src/core/proxywindow.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ class ProxyWindowBase: public Reloadable {
154154
void colorChanged();
155155
void maskChanged();
156156

157-
private slots:
157+
protected slots:
158+
virtual void onWidthChanged();
159+
virtual void onHeightChanged();
158160
void onMaskChanged();
159-
void onWidthChanged();
160-
void onHeightChanged();
161161
void onScreenDestroyed();
162162

163163
protected:

src/core/qmlscreen.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
#include <qscreen.h>
88
#include <qtypes.h>
99

10-
QuickShellScreenInfo::QuickShellScreenInfo(QObject* parent, QScreen* screen):
11-
QObject(parent), screen(screen) {
10+
QuickShellScreenInfo::QuickShellScreenInfo(QObject* parent, QScreen* screen)
11+
: QObject(parent)
12+
, screen(screen) {
1213

1314
if (this->screen != nullptr) {
1415
// clang-format off

0 commit comments

Comments
 (0)