Skip to content

Commit 4e48c6e

Browse files
committed
all: refactor windows code out of core
There are still some links from core to window but its now separate enough to fix PanelWindow in qml tooling.
1 parent 1adad9e commit 4e48c6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1171
-1142
lines changed

CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,6 @@ boption(SERVICE_GREETD "Greetd" ON)
6464
boption(SERVICE_UPOWER "UPower" ON)
6565
boption(SERVICE_NOTIFICATIONS "Notifications" ON)
6666

67-
if (NOT DEFINED GIT_REVISION)
68-
execute_process(
69-
COMMAND git rev-parse HEAD
70-
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
71-
OUTPUT_VARIABLE GIT_REVISION
72-
OUTPUT_STRIP_TRAILING_WHITESPACE
73-
)
74-
endif()
75-
7667
add_compile_options(-Wall -Wextra)
7768

7869
if (FRAME_POINTERS)

src/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
qt_add_executable(quickshell main.cpp)
22

3+
target_link_libraries(quickshell PRIVATE ${QT_DEPS} quickshell-build)
4+
35
install(TARGETS quickshell RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
46

7+
add_subdirectory(build)
58
add_subdirectory(core)
9+
add_subdirectory(ipc)
10+
add_subdirectory(window)
611
add_subdirectory(io)
712
add_subdirectory(widgets)
813

src/build/CMakeLists.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
add_library(quickshell-build INTERFACE)
2+
3+
if (NOT DEFINED GIT_REVISION)
4+
execute_process(
5+
COMMAND git rev-parse HEAD
6+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
7+
OUTPUT_VARIABLE GIT_REVISION
8+
OUTPUT_STRIP_TRAILING_WHITESPACE
9+
)
10+
endif()
11+
12+
if (CRASH_REPORTER)
13+
set(CRASH_REPORTER_DEF 1)
14+
else()
15+
set(CRASH_REPORTER_DEF 0)
16+
endif()
17+
18+
if (DISTRIBUTOR_DEBUGINFO_AVAILABLE)
19+
set(DEBUGINFO_AVAILABLE 1)
20+
else()
21+
set(DEBUGINFO_AVAILABLE 0)
22+
endif()
23+
24+
configure_file(build.hpp.in build.hpp @ONLY ESCAPE_QUOTES)
25+
26+
target_include_directories(quickshell-build INTERFACE ${CMAKE_CURRENT_BINARY_DIR})
File renamed without changes.

src/core/CMakeLists.txt

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
find_package(CLI11 CONFIG REQUIRED)
22

33
qt_add_library(quickshell-core STATIC
4-
main.cpp
54
plugin.cpp
65
shell.cpp
76
variants.cpp
87
rootwrapper.cpp
9-
proxywindow.cpp
108
reload.cpp
119
rootwrapper.cpp
1210
qmlglobal.cpp
1311
qmlscreen.cpp
1412
region.cpp
1513
persistentprops.cpp
16-
windowinterface.cpp
17-
floatingwindow.cpp
18-
panelinterface.cpp
19-
popupwindow.cpp
2014
singleton.cpp
2115
generation.cpp
2216
scan.cpp
@@ -43,32 +37,20 @@ qt_add_library(quickshell-core STATIC
4337
paths.cpp
4438
instanceinfo.cpp
4539
common.cpp
46-
ipc.cpp
4740
)
4841

49-
if (CRASH_REPORTER)
50-
set(CRASH_REPORTER_DEF 1)
51-
else()
52-
set(CRASH_REPORTER_DEF 0)
53-
endif()
54-
55-
if (DISTRIBUTOR_DEBUGINFO_AVAILABLE)
56-
set(DEBUGINFO_AVAILABLE 1)
57-
else()
58-
set(DEBUGINFO_AVAILABLE 0)
59-
endif()
60-
61-
add_library(quickshell-build INTERFACE)
62-
63-
configure_file(build.hpp.in build.hpp @ONLY ESCAPE_QUOTES)
64-
65-
target_include_directories(quickshell-build INTERFACE ${CMAKE_CURRENT_BINARY_DIR})
6642
target_link_libraries(quickshell-core PRIVATE quickshell-build)
6743

68-
qt_add_qml_module(quickshell-core URI Quickshell VERSION 0.1)
44+
qt_add_qml_module(quickshell-core
45+
URI Quickshell
46+
VERSION 0.1
47+
IMPORTS Quickshell._Window
48+
)
49+
50+
target_link_libraries(quickshell-core PRIVATE ${QT_DEPS} CLI11::CLI11)
6951

70-
target_link_libraries(quickshell-core PRIVATE ${QT_DEPS} Qt6::QuickPrivate CLI11::CLI11)
7152
qs_pch(quickshell-core)
53+
qs_pch(quickshell-coreplugin)
7254

7355
target_link_libraries(quickshell PRIVATE quickshell-coreplugin)
7456

0 commit comments

Comments
 (0)