Commit Graph

1267 Commits

Author SHA1 Message Date
rewine e14a6a4935 fix: resolve window resize crash during image capture
1. Add wlr_buffer.h header to access buffer locking functionality
2. Lock buffer during copy operation to prevent race conditions
3. Implement comprehensive validation of source and destination buffers
4. Add dynamic constraint updating when buffer size mismatches occur
5. Handle client buffer source explicitly for better compatibility
6. Add detailed logging for debugging copy operations

The changes fix a critical crash that occurred during window resizing by
ensuring proper buffer synchronization and validation. The fix includes
safety checks to validate buffer dimensions, pointer validity, and
proper constraint handling when sizes change. By locking buffers during
copy operations and properly handling client buffer sources, we prevent
race conditions that could lead to crashes during window resizing.

fix: 修复录窗口时resize崩溃

1. 添加 wlr_buffer.h 头文件以访问缓冲区锁定功能
2. 在复制操作期间锁定缓冲区以防止竞争条件
3. 实现对源缓冲区和目标缓冲区的全面验证
4. 在缓冲区大小不匹配时动态更新约束条件
5. 显式处理客户端缓冲区源以提高兼容性
6. 添加详细的日志记录用于调试复制操作
2025-08-21 11:49:25 +08:00
April & May 3aa68efc92 fix: fix wrong display render issue when switching VT too quickly
When cooperating with DDM, switching VT will not drop DRM FD. This makes
treeland still able to draw to the DRM after VT switch, which will cause
wrong display rendering when switching VT too quickly. This commit
cooperate new treeland-ddm-v1 protocol and expose interface to enable /
disable global rendering, which is used in DDM to control render before
/ after TTY switching, to solve the render issue.
2025-08-21 11:48:26 +08:00
April & May 547da09cbf Totally disable lockscreen animation when switching TTY to prevent stuck for switching too quickly
Treeland will failed to deactivate session when the animation is still
playing, and get the whole VT stuck. Disable all animation to prevent it
as mostly as possible.
2025-08-20 09:45:28 +08:00
April & May c2094e85d2 feat: Support TTY switching with DDM
1. Remove dependence of seatd-dde.service, use system provided seatd
service;
2. Add private wayland protocol treeland-private-protocol.xml for IPC
3. Acquire VT control immediately after first rendering complete;
4. Call DDM to switch VT when Ctrl+Alt+Fx is pressed, if available;
5. Expose wayland request for deactivate and re-activate session to DDM;
2025-08-20 09:45:28 +08:00
transifex-integration[bot] 511473c286
Updates for project TreeLand (#515)
* [skip CI] Translate lockscreen.en_US.ts in fi

77% of minimum 10% translated source file: 'lockscreen.en_US.ts'
on 'fi'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* [skip CI] Translate lockscreen.en_US.ts in fi

100% translated source file: 'lockscreen.en_US.ts'
on 'fi'.

* [skip CI] Translate wallpaper.en_US.ts in fi

66% of minimum 10% translated source file: 'wallpaper.en_US.ts'
on 'fi'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format

* [skip CI] Translate wallpaper.en_US.ts in fi

100% translated source file: 'wallpaper.en_US.ts'
on 'fi'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
Co-authored-by: zccrs <zhangjide@deepin.org>
2025-08-19 16:18:46 +08:00
YaoBing Xiao b3e5f82d83 feat(waylib): add WBufferDumper utility for dumping buffer contents to image files
- WBufferDumper provides functionality to dump buffer data as images for debugging and analysis.
2025-08-19 15:03:34 +08:00
rewine cf91ae1312 refactor: use unified CI build preset with Werror
1. Replace manual CMake configuration with --preset ci in all ArchLinux
workflows
2. Add new CI build preset in CMakePresets.json with -Werror enabled
3. Remove redundant per-project CMake configuration steps
4. Simplify workflow steps by combining configure and build phases
5. Maintain compatibility with existing build requirements while
standardizing

The changes standardize build configuration across projects using a
centralized CMake preset. This ensures consistent build behavior while
maintaining the strict -Werror flag for CI builds. The update simplifies
workflow maintenance and improves build reliability by using CMake's
modern preset system.
2025-08-18 16:01:51 +08:00
rewine d1adcf4739 build: enable -Werror compiler flag
1. Added -Werror compiler flag to treat warnings as errors
2. This enforces stricter code quality standards
3. Helps catch potential issues early in development
4. Improves overall code reliability and maintainability

build: 启用 -Werror 编译器标志

1. 添加 -Werror 编译器标志将警告视为错误
2. 这执行了更严格的代码质量标准
3. 有助于在开发早期发现潜在问题
4. 提高整体代码的可靠性与可维护性
2025-08-15 10:14:06 +08:00
rewine 4cb9bd7c47
fix: prevent crash during preview item handling (#512)
1. Replace WWrapPointer with QPointer for SurfaceWrapper
2. Add shellSurface() check before accessing preview item properties
3. Fix race condition where SurfaceWrapper might be invalid

The changes prevent a crash that occurred when accessing a
SurfaceWrapper object after it had been invalidated. Using QPointer
with an explicit shellSurface() validity check ensures we don't access
dangling pointers, as the SurfaceWrapper::aboutToBeInvalidated signal
doesn't nullify WWrapPointer in time.

fix: 修复预览项处理时的崩溃问题

1. 将 SurfaceWrapper 的指针类型从 WWrapPointer 改为 QPointer
2. 在访问预览项属性前增加 shellSurface() 有效性检查
3. 解决 SurfaceWrapper 被标记为无效后仍被访问的竞态条件

这些修改解决了在 SurfaceWrapper 对象被销毁后仍然尝试访问其属性导致的崩溃
问题。使用 QPointer 并配合显式的 shellSurface() 有效性检查,可以确保不会
访问到悬空指针,因为 SurfaceWrapper::aboutToBeInvalidated 信号无法及时将
WWrapPointer 置空。
2025-08-14 16:37:04 +08:00
zccrs 10652f2741
fix: prevent cursor flicker during screen recording
1.  Remove `WBufferRenderer::resetTextureProvider` to avoid accidentally
cleaning the cached buffer in `WBufferRenderer` when switching from a
software cursor to a hardware cursor.
2.  The root cause was that switching from a software cursor
to a hardware cursor inadvertently cleared the cached buffer
in `WBufferRenderer`, causing the buffer referenced by
`BufferRendererProxy` to become null.
3.  The `resetTextureProvider` function was originally introduced in
the `WOutputLayer` implementation (https://github.com/vioken/waylib/
commit/ea814c44), and the buffer lock/unlock mechanism was introduced
in https://github.com/vioken/waylib/commit/35fdcb72. The lock/unlock
mechanism is a new design, so manually resetting the buffer is no longer
necessary.
4.  Update `WSGTextureProvider::setBuffer` to emit `textureChanged()`
signal when `buffer` is not null and the buffer object is not changed,
but maybe the buffer's content is changed.

Influence:
1.  Verify that the cursor no longer flickers during screen recording,
especially when switching between software and hardware cursors.
2.  Test screen sharing and ensure that the shared content is displayed
correctly without any visual artifacts.
3.  Check the buffer management to ensure that buffers are properly
locked and unlocked, and that no memory leaks occur.

fix: 修复录屏时光标闪烁问题

1.  移除 `WBufferRenderer::resetTextureProvider` 以避免在从软光标切换到
硬光标时意外清理 `WBufferRenderer` 中的缓存 buffer。
2.  根本原因是,从软光标切换到硬光标时,无意中清除了 `WBufferRenderer`
中的缓存 buffer,导致 `BufferRendererProxy` 引用的 buffer 变为 null。
3.  `resetTextureProvider` 函数最初是在 `WOutputLayer` 实现中引入的
(https://github.com/vioken/waylib/commit/ea814c44),buffer 锁/解锁机制是
在 https://github.com/vioken/waylib/commit/35fdcb72 中引入的。 锁/解锁机
制是一种新的设计,因此不再需要手动重置 buffer。
4.  更新 `WSGTextureProvider::setBuffer`,当 `buffer` 不为 null 且
buffer 对象没有更改时,发出 `textureChanged()` 信号,但 buffer 的内容可
能会更改。

Influence:
1.  验证在屏幕录制过程中,尤其是在软件和硬件光标之间切换时,光标不再
闪烁。
2.  测试屏幕共享,确保共享内容显示正确,没有任何视觉伪影。
3.  检查 buffer 管理,确保 buffer 被正确锁定和解锁,并且没有发生内存
泄漏。
2025-08-12 20:48:50 +08:00
rewine 672fdba375 docs: add comprehensive logging guidelines and update module logging
Add detailed logging guidelines for both treeland and waylib modules,
and update logging implementation across multiple files to follow the
new standards.

1. Create comprehensive logging documentation covering:
   - Category organization patterns for treeland and waylib
   - Log level usage guidelines
   - Best practices for message formatting and context
   - Implementation examples for both module types
   - Debugging tips and common mistakes to avoid

2. Update waylib modules with new logging categories:
   - wcursor.cpp: Add detailed cursor-related categories and update
logging statements
   - winputdevice.cpp: Add input device category and improve debug
messages
   - woutput.cpp: Add output-related categories and enhance buffer/
output logging
   - wseat.cpp: Replace old logging categories with new structured ones
   - wsocket.cpp: Add socket management category and improve connection
logging

3. Remove outdated logging categories:
   - Remove lcGeneral from wglobal.cpp
   - Remove obsolete qLcWlrCursor and related categories

4. Improve logging quality throughout:
   - Add contextual information to log messages
   - Use appropriate log levels for different message types
   - Add missing debug statements for important state changes
   - Fix incorrect
2025-08-11 18:21:02 +08:00
rewine af951c4194 feat: add centralized logging system and standardize log usage
1. Added new centralized logging system in common/treelandlogging.h
and .cpp
2. Replaced local logging categories with standardized ones across all
modules
3. Added comprehensive logging category definitions covering all system
components
4. Updated CMakeLists.txt to include new logging files
5. Modified multiple source files to use the standardized logging
categories

The changes provide a unified logging framework across the entire
codebase, enabling better log management and filtering. The centralized
system improves maintainability and ensures consistent log formatting
across different components.

feat: 添加集中化日志系统并规范日志使用

1. 在 common/treelandlogging.h 和 .cpp 中添加了新的集中化日志系统
2. 替换所有模块中的本地日志分类为标准化分类
3. 添加了涵盖所有系统组件的综合日志分类定义
4. 更新 CMakeLists.txt 以包含新的日志文件
5. 修改多个源文件以使用标准化日志分类

这些更改提供了统一的日志框架,改进了整个代码库的日志管理能力。集中化的系
统提高了可维护性,并确保不同组件之间日志格式的一致性。
2025-08-11 18:21:02 +08:00
YaoBing Xiao 501533e4c8 feat: ssd title bar displays the window title information
Fixes: linuxdeepin/treeland#501

Log:
2025-08-11 11:25:21 +08:00
YaoBing Xiao 7642cb91cf fix: maximize/restore icon in the SSD title bar displays incorrectly
updates the condition to use surface.shellSurface.isMaximized, ensuring the icon
accurately reflects the window's maximized state when using the shell surface.

Fixes: linuxdeepin/treeland#501

Log:
2025-08-11 11:25:21 +08:00
transifex-integration[bot] b48e9f3a7d [skip CI] Translate lockscreen.en_US.ts in es
90% of minimum 10% translated source file: 'lockscreen.en_US.ts'
on 'es'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format
2025-08-08 10:19:35 +08:00
transifex-integration[bot] c48f8dcf6a [skip CI] Translate lockscreen.en_US.ts in es
90% of minimum 10% translated source file: 'lockscreen.en_US.ts'
on 'es'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format
2025-08-08 10:19:35 +08:00
transifex-integration[bot] 3ac5fb78b4 [skip CI] Translate lockscreen.en_US.ts in es
90% of minimum 10% translated source file: 'lockscreen.en_US.ts'
on 'es'.

Sync of partially translated files: 
untranslated content is included with an empty translation 
or source language content depending on file format
2025-08-08 10:19:35 +08:00
rewine 6c921b8ed4 fix: resolve multiple compiler warnings
1. Fix multiple compiler warning issues across various header files
2. Corrected template typedef naming in qobject.h for better clarity
3. Removed semicolons after QW_FUNC_MEMBER macros in several header
files
4. Added missing compiler warning disables for -Wreorder in
qtwaylandscanner.cpp
5. Fixed Q_DECLARE_FLAGS macro usage in surfacewrapper.h
6. Fixed W_DECLARE_PUBLIC macro usage in winputdevice.cpp

These changes eliminate compiler warnings during the build process while
maintaining full functionality and improving code consistency across
the codebase.

修复: 解决多个编译器警告

1. 修复多个头文件中的编译器警告问题
2. 在 qobject.h 中修正了模板类型定义名称以提高清晰度
3. 在多个头文件中移除了 QW_FUNC_MEMBER 宏后的分号
4. 在 qtwaylandscanner.cpp 中添加了缺失的 -Wreorder 警告禁用指令
5. 修正了 surfacewrapper.h 中的 Q_DECLARE_FLAGS 宏使用
6. 修正了 winputdevice.cpp 中的 W_DECLARE_PUBLIC 宏使用

这些修改在保持完整功能的同时消除了构建过程中的编译器警告
2025-08-08 10:03:45 +08:00
YaoBing Xiao a1895f9161 fix(waylib): prevent duplicate signal connections using Qt::UniqueConnection
- Initialize Content pointer to nullptr for safety.
- Use Qt::UniqueConnection when connecting BlitTextureProvider::textureChanged
to Content::update, both in Content and WRenderBufferBlitterPrivate, to avoid
multiple identical connections and ensure the slot is triggered only once per
signal emission.
2025-08-08 10:01:54 +08:00
YaoBing Xiao 7176521287 fix(waylib): prevent crash by safely managing textureChanged connection
- Add QMetaObject::Connection and QMutex members to WQuickTextureProxyPrivate
to track and protect the textureChanged signal connection.
- Disconnect previous textureChanged connections in initSourceItem to
avoid dangling or duplicate connections.
- Use a mutex to ensure thread-safety when establishing the textureChanged
connection in updatePaintNode.

This change helps prevent occasional crashes when moving the cursor by ensuring
signals are properly managed and connections are safely handled.

Fixes: #494

Log:
2025-08-08 10:01:54 +08:00
rewine d2df8a0a11 fix: use exec to replace process and avoid duplicate logs in treeland.sh
- Use exec to replace treeland.sh process with treeland, avoiding dual processes
- Include all user arguments in --try-exec test for environment consistency
- Disable systemd logs from treeland.sh to prevent duplicate journal entries
- Add English comments explaining the process replacement logic

This resolves the issue where treeland.sh and treeland would run as separate
processes, and eliminates duplicate log entries in journalctl.
2025-08-07 21:41:46 +08:00
YaoBing Xiao 26b0e3eebb fix(waylib): Occasional crash when moving the cursor
Use the q pointer as the context object host.
Use QPointer to prevent crash when WOutputCursor is
destroyed during signal handling.

Fixes: linuxdeepin/treeland#490

Log:
2025-08-07 19:10:41 +08:00
rewine 1e6625bd9b fix: improve type safety in render buffer node
1. Replace generic static_assert with Qt-specific type check
2. Use QtPrivate::HasQ_OBJECT_Macro to ensure proper QObject inheritance
3. Add explicit QObject include for better header dependency management
4. Maintain existing functionality while improving compile-time safety

The change replaces a generic type trait check with Qt's specific type
validation mechanism, ensuring that template parameters properly inherit
from QObject. This provides better error messages and stronger type
safety guarantees during compilation.

fix: 改进渲染缓冲节点的类型安全性

1. 用 Qt 特定的类型检查替换通用的 static_assert
2. 使用 QtPrivate::HasQ_OBJECT_Macro 确保正确的 QObject 继承关系
3. 添加显式的 QObject 包含头文件以改善头文件依赖管理
4. 在保持现有功能的同时提高编译时的安全性

该修改将通用类型特征检查替换为 Qt 的特定类型验证机制,确保模板参数正确地
继承自 QObject。这提供了更好的错误提示信息,并在编译时提供了更强的类型安
全保证。
2025-08-07 19:08:26 +08:00
rewine aa645014b8 chore: enable Qt logging context and adjust cursor shape manager version
1. Added QT_MESSAGELOGCONTEXT definition to enable detailed logging in
Qt applications
2. Downgraded cursor shape manager protocol version from 2 to 1
temporarily due to wlroots version constraints
3. The changes help with debugging while maintaining compatibility with
current wlroots version (pre-0.20)

chore: 启用 Qt 日志上下文并调整光标形状管理器版本

1. 添加 QT_MESSAGELOGCONTEXT 定义以启用 Qt 应用程序的详细日志记录功能
2. 由于 wlroots 版本限制(尚未升级到 0.20),临时将光标形状管理器协议版
本从 2 降级为 1
3. 这些更改有助于调试,同时保持与当前 wlroots 版本的兼容性
2025-08-07 19:08:26 +08:00
rewine 795309a4aa refactor: update cursor shape manager version to 2
Update the version number of the CURSOR_SHAPE_MANAGER_V1 protocol from
1 to 2 to reflect recent implementation changes and ensure protocol
version consistency across components.

refactor: 更新光标形状管理器版本至 2

将 CURSOR_SHAPE_MANAGER_V1 协议的版本号从 1 更新至 2,以反映最近的实现更
改,并确保组件间的协议版本一致性。
2025-08-07 19:08:26 +08:00
rewine bba9eca457 fix: remove unused setOutputProxy function
1. Remove setOutputProxy method from Helper class
2. Delete corresponding declaration in header file
3. The function was never implemented and not used anywhere in the
codebase
4. Cleaning up unused code improves code maintainability and reduces
technical debt

fix: 移除未使用的 setOutputProxy 函数

1. 从 Helper 类中移除 setOutputProxy 方法
2. 同时删除头文件中的相应声明
3. 该函数从未被实现且代码库中没有任何使用
4. 清理未使用的代码可提高代码可维护性并减少技术债务
2025-08-07 19:08:26 +08:00
rewine 3a013bcf5a fix: replace Q_EMIT and Q_SLOTS with signals/slots
Replace all instances of Q_EMIT with the modern signal
emission syntax
and replace Q_SLOTS with the modern slots syntax. Also add
[[maybe_unused]] attributes to parameters that are intentionally unused.

fix: 替换 Q_EMIT 和 Q_SLOTS 为 Qt5 风格的信号/槽

替换所有 Q_EMIT 为现代风格的信号发射语法,并将 Q_SLOTS 替换为现代风格的槽语法。
同时为故意未使用的参数添加 [[maybe_unused]] 属性。
2025-08-07 19:08:26 +08:00
rewine 4cb0da6d21 fix: resolve compilation warnings and improve code structure
1. Fix order of member variable initialization in qw_interface
constructor
2. Move add_compile_options after ASAN flags to ensure proper priority
3. Fix member variable order in TreelandConfig to match declaration
4. Add [[maybe_unused]] attribute to unused function parameters
5. Fix surface wrapper bitfield member ordering
6. Fix cursor image index comparison type mismatch
7. Fix various minor code style and structure issues

fix: 解决编译警告并改进代码结构

1. 修复 qw_interface 构造函数中成员变量的初始化顺序
2. 将 add_compile_options 移至 ASAN 标志之后以确保优先级
3. 修复 TreelandConfig 中成员变量顺序以匹配声明
4. 为未使用的函数参数添加 [[maybe_unused]] 属性
5. 修复 surface wrapper 位域成员顺序
6. 修复光标图像索引比较的类型不匹配问题
7. 解决其他次要的代码风格和结构问题
2025-08-07 19:08:26 +08:00
rewine 97c07bd06f chore(debian): update version to 0.6.2
log: 0.6.2
2025-08-04 18:19:28 +08:00
YaoBing Xiao 78ee985666 fix(waylib): the screen flickering issue during screencopy
Added resetGlState() call immediately after ending frame to ensure correct
OpenGL state before committing outputs in doRender(), improving GPU context
handling, prevent gles2-render exception in wlroots.

Fixes: linuxdeepin/treeland#488

Log:
2025-08-04 18:18:53 +08:00
rewine ce2c4057b4 fix: resolve library versioning and installation path issues
1. Add proper versioning to libtreeland and capture module with VERSION
and SOVERSION properties
2. Remove duplicate and unnecessary qml directory installation commands
that were causing conflicts
3. Add XCB dependency to libtreeland target_link_libraries for improved
X11 compatibility
4. Clean up commented-out installation code that was no longer needed

fix: 解决库版本和安装路径问题

1. 为 libtreeland 和 capture 模块添加正确的版本信息,使用 VERSION 和
SOVERSION 属性
2. 移除导致冲突的重复 qml 目录安装命令
3. 在 libtreeland 的 target_link_libraries 中添加 XCB 依赖以提升 X11 兼
容性
4. 清理不再需要的注释掉的安装代码
2025-08-04 17:41:01 +08:00
rewine e4ca014d0e chore(debian): update version to 0.6.1
log: 0.6.1
2025-08-01 13:58:04 +08:00
rewine 0ef3153e20 fix: improve D-Bus connection handling and QML hover visibility
1. Add proper boolean parameter passing in LockScreen component method
calls
2. Fix QML hover state reference to use correct item ID
3. Add error handling for D-Bus connection failure in Helper class
4. Improve logging for D-Bus connection issues

The changes address three different issues:
- LockScreen component methods now properly pass boolean parameters
- QML hover state visualization was incorrectly referencing the parent
container
- D-Bus connection failure handling was missing proper error reporting

fix: 改进 D-Bus 连接处理和 QML 悬停可见性

1. 在 LockScreen 组件方法调用中添加正确的布尔参数传递
2. 修复 QML 悬停状态引用以使用正确组件ID
3. 在 Helper 类中添加 D-Bus 连接失败的错误处理
4. 增强 D-Bus 连接问题的日志记录

这些修改解决了三个不同问题:
- LockScreen 组件方法现在能正确传递布尔参数
- QML 悬停状态显示错误引用了父容器的问题已修复
- D-Bus 连接失败处理缺少错误报告的问题得到解决
2025-08-01 13:32:16 +08:00
YaoBing Xiao f96555f5e3 feat: CLI option: switch from --disable-debug-view to --enable-debug-view
- Replace `disableDebugView` logic with `enableDebugView` for improved clarity.
- Avoid displaying debug view during Debug compilation

Log:
2025-08-01 13:06:55 +08:00
YaoBing Xiao b7b6708a4b fix(waylib): Specify required rendering flags in WSGRenderFootprintNode
The QRhi-based render() implementation in WSGRenderFootprintNode relies on explicit rendering
flags to ensure correct and efficient rendering behavior. This commit introduces an override
for the flags() method, returning a combination of QSGRenderNode::NoExternalRendering and
QSGRenderNode::BoundedRectRendering. These flags clarify the rendering node's capabilities
to the Qt scene graph, preventing potential rendering issues or crashes.
This change may address issues reported in https://github.com/linuxdeepin/treeland/issues/478.

Log:
2025-08-01 10:16:45 +08:00
rewine 7e13237fd7 chore(debian): update version to 0.6.0
Log: New version adapt to wlroots-0.19
2025-07-31 21:38:28 +08:00
rewine 5cee95f2aa fix: improve image capture error handling and code structure
1. Replace Q_ASSERT with proper error handling in image capture code
2. Add comprehensive validation checks for null pointers and invalid
states
3. Replace manual memory management with RAII-style helper classes
4. Move constraint building logic to dedicated helper struct
5. Add proper copyright headers to source files
6. Update CMakeLists.txt with consistent TODO markers
7. Implement WPixmanRegion class for automatic region management
8. Add detailed debug logging for capture operations

The changes enhance code reliability by properly handling error
conditions instead of relying on assertions, improve memory safety
through better resource management, and make the code more maintainable

with clearer structure and documentation.

fix: 改进图像捕获错误处理和代码结构

1. 在图像捕获代码中替换 Q_ASSERT 为适当的错误处理
2. 添加全面的空指针和无效状态验证检查
3. 使用 RAII 风格的辅助类替代手动内存管理
4. 将约束构建逻辑移至专用辅助结构体
5. 为源文件添加正确的版权标头
6. 在 CMakeLists.txt 中使用一致的 TODO 标记
7. 实现 WPixmanRegion
2025-07-31 20:37:24 +08:00
rewine a503276e46 feat: add foreign toplevel image capture support
1. Added support for Wayland foreign toplevel image capture protocol
2. Implemented capture source creation and handling in Helper class
3. Added new protocol files for ext-image-capture-source and ext-
foreign-toplevel-list
4. Created WExtImageCaptureSourceV1Impl for handling actual image
capture logic
5. Added findSurfaceByHandle method to support reverse lookup from
protocol handles
6. Implemented frame scheduling and buffer copying with format
constraints handling

feat: 添加外部顶层窗口图像捕获支持

1. 添加对 Wayland 外部顶层窗口图像捕获协议的支持
2. 在 Helper 类中实现捕获源创建和处理逻辑
3. 添加了 ext-image-capture-source 和 ext-foreign-toplevel-list 的新协议
文件
4. 创建 WExtImageCaptureSourceV1Impl 类来处理实际的图像捕获逻辑
5. 添加 findSurfaceByHandle 方法以支持从协议句柄进行反向查找
6. 实现帧调度和缓冲区复制,并处理格式约束条件
2025-07-31 20:37:24 +08:00
rewine 72f4ff54a6 feat: add image capture source support
1. Add new header files for ext_image_capture_source_v1
2. Implement QW_CLASS_OBJECT for ext_image_capture_source_v1 with
signals and methods
3. Add interface header for ext_image_capture_source_v1
4. Improve ext_image_copy_capture_frame_v1 with proper object model
and methods

feat: 添加图像捕获源支持

1. 为 ext_image_capture_source_v1 添加新头文件
2. 使用信号和方法实现 ext_image_capture_source_v1 的 QW_CLASS_OBJECT
3. 添加 ext_image_capture_source_v1 的接口头文件
4. 通过正确的对象模型和方法改进 ext_image_copy_capture_frame_v1
2025-07-31 20:37:24 +08:00
April & May c3501eac2b chore: Use parameter to control lockscreen animation instead of property
Use parameter to control lockscreen animation instead of QML property.
2025-07-31 19:29:34 +08:00
April & May 5f767e541f fix: Check virtual device for QInputEvent
Qt will create virtual device for QInputEvent when no physical device
available (e.g. switched to another VT), which will leads to a failed
assertion and make treeland crash. This commit applies a special guarded
getter for such case.
2025-07-31 19:29:34 +08:00
April & May efa48c3154 fix: Skip lockscreen animation when switching back from TTY
When switching back from TTY the Greeter will be re-created, and somehow
leads to an incorrect lockscreen animation on HiRes screen. This commit
adds skip function to lockscreen animation, and skips the animation when
the first time it adds to an output.
2025-07-31 19:29:34 +08:00
April & May cd0478c044 feat: Support TTY switching
Support TTY switching by calling wlr_session_change_vt(). Currently not
working with ddm because of the VT_BOUND mode.
2025-07-31 19:29:34 +08:00
April & May 5a8e15f1c7 feat: Add qwlroots interface for wl_session object
Add qwlroots interface for wl_session object, which can serve for VT
switching.
2025-07-31 19:29:34 +08:00
JiDe Zhang 60c30ec0db ci: Trigger waylib builds when qwlroots changes
This commit modifies the GitHub Actions workflows for waylib builds to
ensure they are triggered when qwlroots code changes occur, since waylib
depends on qwlroots.

Changes:
1. Added 'qwlroots/**' to the paths trigger for waylib-archlinux-build.yml
2. Added 'qwlroots/**' to the paths trigger for waylib-debian-build.yml
3. Updated README.md to document the CI workflow dependencies
4. Updated README.zh_CN.md to maintain consistency across all language versions

This ensures proper dependency management and prevents build failures
when qwlroots modifications affect waylib compilation.

ci: 当qwlroots代码修改时触发waylib构建

此提交修改了waylib构建的GitHub Actions工作流,确保在qwlroots
代码发生变化时触发waylib构建,因为waylib依赖于qwlroots。

变更内容:
1. 在waylib-archlinux-build.yml的路径触发器中添加'qwlroots/**'
2. 在waylib-debian-build.yml的路径触发器中添加'qwlroots/**'
3. 更新README.md文档记录CI工作流的依赖关系
4. 更新README.zh_CN.md保持所有语言版本文档的一致性

这确保了正确的依赖管理,防止qwlroots修改影响waylib编译时
出现构建失败的情况。
2025-07-30 17:57:57 +08:00
rewine b68ea9f76e fix: remove unused quit full button and add helper activation
1. Remove the unused "quitFullBtn" Loader component that was not visible
2. Add Helper.activateSurface call before maximizing window
3. This ensures proper window activation before state change

fix: 删除未使用的退出全屏按钮并添加窗口激活

1. 移除了未使用的 "quitFullBtn" Loader 组件
2. 在窗口最大化前添加了 Helper.activateSurface 调用
3. 这确保了在状态改变前正确激活窗口
2025-07-30 17:57:37 +08:00
rewine 6c1aab65be fix: prevent title bar and window buttons from stealing focus
1. Added Qt.NoFocus policy to title bar component to prevent keyboard
focus
2. Added focusPolicy to all window control buttons (minimize, close,
maximize)
3. Ensures focus remains with active window content during window
operations
4. Improves accessibility and prevents focus-related UI glitches

fix: 防止标题栏和窗口按钮获取焦点

1. 为标题栏组件添加 Qt.NoFocus 策略以阻止键盘焦点
2. 为所有窗口控制按钮(最小化、关闭、最大化)添加 focusPolicy
3. 确保窗口操作期间焦点保留在活动窗口内容上
4. 提升可访问性并防止焦点相关的界面故障
2025-07-30 16:45:53 +08:00
YaoBing Xiao 837d349e96 feat: add wl_drm support
Add wl_drm protocol
2025-07-30 15:32:25 +08:00
immortalrover a6134c2e40 feat: create ext-data-control manager
support ext-data-control-v1 protocol
2025-07-29 20:33:01 +08:00
zccrs 26b95540cd
fix: Handle VT switching keys (#469)
* fix: Handle VT switching keys

This commit addresses an issue where the XF86Switch_VT_1 to
XF86Switch_VT_12 keys were not properly handled by Qt. Qt does not
directly support these keys. The fix involves converting these keys to
Ctrl+Alt+F1 through Ctrl+Alt+F12 when the Ctrl and Alt modifiers are
already pressed. This enables users to switch virtual terminals within
the Wayland environment using these key combinations, matching the
expected behavior on traditional Linux systems. This conversion only
happens when Ctrl+Alt are already pressed, preventing accidental mapping
of other keys.

fix: 处理 VT 切换键

此提交解决了一个 Qt 无法正确处理 XF86Switch_VT_1 到 XF86Switch_VT_12
键的问题。Qt 不直接支持这些键。此修复包括将这些键转换为 Ctrl+Alt+F1
到 Ctrl+Alt+F12(如果 Ctrl 和 Alt 修改键已被按下)。这使得用户能够在
Wayland 环境中使用这些组合键切换虚拟终端,从而匹配传统 Linux 系统上的预
期行为。此转换仅在 Ctrl+Alt 已被按下时发生,防止意外映射其他键。
2025-07-25 11:00:58 +08:00