Add Nebula.Windows with Sway IPC backend
Introduces a new `core/windows` module (`Nebula.Windows`) with `WindowService`, window/workspace models, and a Sway IPC backend for live window tracking and control (focus, close, move/resize, snap, maximize/restore, minimize, workspace switch). The desktop shell now links this module, uses compositor focus for top-bar active app text, and adds an Open Windows section in the launcher with focus/close actions. Also updates application metadata handling to parse `StartupWMClass` and map window `app_id`/class to friendly names and icons, and revises Sway config/docs for the new floating-first Desktop 0.2 behavior with temporary compositor-provided decorations.
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
if(NOT TARGET Qt6::Qml)
|
||||
project(NebulaWindows LANGUAGES CXX)
|
||||
find_package(Qt6 6.4 REQUIRED COMPONENTS Core Gui Qml Network)
|
||||
qt_standard_project_setup(REQUIRES 6.4)
|
||||
endif()
|
||||
|
||||
if(NOT TARGET Qt6::Network)
|
||||
find_package(Qt6 6.4 REQUIRED COMPONENTS Network)
|
||||
endif()
|
||||
|
||||
if(NOT TARGET NebulaApplications)
|
||||
add_subdirectory(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/../applications"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nebula-applications"
|
||||
)
|
||||
endif()
|
||||
|
||||
qt_add_library(NebulaWindows STATIC)
|
||||
|
||||
qt_add_qml_module(NebulaWindows
|
||||
URI Nebula.Windows
|
||||
VERSION 1.0
|
||||
RESOURCE_PREFIX /qt/qml
|
||||
SOURCES
|
||||
WindowTypes.hpp
|
||||
WindowBackend.hpp
|
||||
WindowModel.hpp
|
||||
WindowModel.cpp
|
||||
WorkspaceModel.hpp
|
||||
WorkspaceModel.cpp
|
||||
WindowService.hpp
|
||||
WindowService.cpp
|
||||
backends/sway/SwayIpcClient.hpp
|
||||
backends/sway/SwayIpcClient.cpp
|
||||
backends/sway/SwayWindowBackend.hpp
|
||||
backends/sway/SwayWindowBackend.cpp
|
||||
)
|
||||
|
||||
target_include_directories(NebulaWindows
|
||||
PUBLIC
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
PRIVATE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/backends/sway"
|
||||
)
|
||||
|
||||
target_link_libraries(NebulaWindows
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Qml
|
||||
Qt6::Network
|
||||
NebulaApplications
|
||||
)
|
||||
|
||||
set_target_properties(NebulaWindows PROPERTIES
|
||||
AUTOMOC ON
|
||||
)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
target_compile_options(NebulaWindows PRIVATE -Wall -Wextra)
|
||||
endif()
|
||||
Reference in New Issue
Block a user