The m_config member variable contained garbage value instead of
nullptr because C++ doesn't auto-initialize pointer members.
This caused invalid memory access and crash during startup.
Initialize m_config to nullptr to ensure proper initial state.
1. Set server socket to non-blocking mode to prevent accept() calls from
blocking the main thread indefinitely.
2. Improved wl_os_accept_cloexec function to use accept4 with SOCK_CLOEXEC
flag as the preferred method on modern Linux systems, with fallback to
traditional accept() + fcntl approach for compatibility.
3. Added proper error handling for ENOSYS case when accept4 is not supported.
The blocking issue occurred when the Wayland server was waiting for client
connections, causing the entire compositor to freeze. This fix follows the
same pattern used in libwayland for robust socket handling.
Log: Fixed Wayland server socket blocking in accept() calls
Influence:
1. Test server startup and client connection establishment
2. Verify proper handling of multiple concurrent client connections
3. Check compatibility on systems without accept4 support
4. Ensure no regression in socket file descriptor management
修复:修复Wayland服务器连接处理中的socket阻塞问题
1. 将服务器socket设置为非阻塞模式,防止accept()调用无限期阻塞主线程。
2. 改进wl_os_accept_cloexec函数,在现代Linux系统上优先使用带SOCK_CLOEXEC
标志的accept4方法,同时为兼容性保留传统的accept() + fcntl方法作为后备。
3. 为不支持accept4的ENOSYS情况添加了适当的错误处理。
当Wayland服务器等待客户端连接时会发生阻塞问题,导致整个合成器冻结。此修复
遵循libwayland中用于健壮socket处理的相同模式。
Log: 修复Wayland服务器socket在accept()调用中的阻塞问题
Influence:
1. 测试服务器启动和客户端连接建立
2. 验证多个并发客户端连接的正确处理
3. 检查在不支持accept4的系统上的兼容性
4. 确保socket文件描述符管理中没有回归
Changed the visibility condition for window titles in the multitask view
from checking 'highlighted' to checking the surfaceItemDelegate state.
This ensures titles are only shown when in taskview mode, not during
other states like window dragging or animation transitions.
The previous implementation could show titles during transitions when
they shouldn't be visible, causing visual artifacts. The new condition
properly aligns with the intended UI behavior where titles should only
appear in the stable taskview state.
Log: Fixed window titles appearing during transitions in multitask view
Influence:
1. Test multitask view to verify titles only appear in taskview state
2. Check window dragging and transitions to ensure titles remain hidden
3. Verify title visibility with empty/non-empty titles
4. Test with different window states and transitions
fix: 修正窗口标题可见性条件
将多任务视图中窗口标题的可见性条件从检查'highlighted'改为检查
surfaceItemDelegate状态。这确保标题仅在taskview模式下显示,而不是在窗口
拖动或动画过渡等其他状态时显示。
之前的实现在不应显示标题的过渡期间可能会显示标题,导致视觉伪影。新条件正
确符合预期的UI行为,即标题应仅在稳定的taskview状态下出现。
Log: 修复多任务视图中窗口标题在过渡期间出现的问题
Influence:
1. 测试多任务视图,验证标题仅在taskview状态下显示
2. 检查窗口拖动和过渡,确保标题保持隐藏
3. 验证空/非空标题的可见性
4. 测试不同窗口状态和过渡
1. Fixed a crash issue where clients created through the security
context could not obtain the corresponding WClient object.
2. Clients created via security context use a new socket connection,
which is not managed by WSocket by default.
3. The wlroots protocol provides limited information for monitoring
such wl_clients.
4. This commit adapts the wlroots implementation: in
`security_context_handle_commit`, a new WSocket object is created for
the listening socket, and the new wl_client object created from this
socket is added to WClient for management.
Influence:
1. Test the creation of clients using the security context.
2. Verify that the created clients can correctly obtain the WClient
object.
3. Ensure that newly created sockets are correctly managed.
修复:修复通过安全上下文创建的客户端崩溃问题
1. 修复了通过安全上下文创建的客户端无法获取对应的 WClient 对象导致崩溃的
问题。
2. 通过安全上下文创建的客户端使用新的套接字连接,默认情况下不由 WSocket
管理。
3. wlroots 协议为监控此类 wl_clients 提供的相关信息有限。
4. 本次提交采纳了 wlroots 的实现:在 `security_context_handle_commit`
中,为监听的套接字创建一个新的 WSocket 对象,并将由此套接字创建的新
wl_client 对象添加到 WClient 中进行管理。
Influence:
1. 测试使用安全上下文创建客户端的过程。
2. 验证创建的客户端能否正确获取 WClient 对象。
3. 确保新创建的套接字能够得到正确的管理。
DConfig object creation involves D-Bus communication, which may block
when placed in the main thread. This commit adapt dconfig2cpp tool to
generate DConfig wrapper safely running in another thread, to avoid this
problem.
Since obtaining DBus interface & calling DBus functions may block
current thread, it's better to place DBus-related codes out of the main
thread. This commit puts DBus call to separate thread if possible.
- Added include for `wxdgtoplevelsurface.h`
- Added include for `qwxdgshell.h`
- Handled initialization check for XDG toplevel surface
- Updated logic to set owns output and ensure surface position validity for XDG toplevel surface
- Added support to set Xwayland position from surface when initialized
Background:
When the window is destroyed while being dragged, `endMoveResize` is triggered. If `config` function is called after the window is destroyed, it will crash. Therefore, the check for `initialized` is added due to its reset in `reset_xdg_surface` where an `xdg_surface` implementation is reset under the following conditions:
1) A surface is unmapped due to a commit with NULL buffer
2) The `xdg_surface` role object is destroyed
3) `wlr_xdg_surface` is destroyed
1. Fixed an issue where the client window's refresh rate was incorrect
when using multiple monitors.
2. The problem was caused by sending `frame_done` notifications to the
client window regardless of which screen refreshed. This resulted in
double the `frame_done` notifications being sent when using two screens.
3. The solution is to only send `frame_done` notifications to the
surface when the screen with the highest refresh rate, where the surface
is located, commits. This behavior is consistent with how wlroots and
mutter handle it.
4. The code was modified in `WOutputRenderWindow::doRender` to track
which outputs were actually committed and then the `WSurfaceItem` checks
that it only sends `notifyFrameDone` if the `framePacingOutput` was
committed.
5. Added logging for when there is no `WOutputRenderWindow`.
Influence:
1. Test with multiple monitors with different refresh rates.
2. Verify that the client window's refresh rate matches the refresh rate
of the screen it's primarily on.
3. Use a tool like http://testufo.com/ to visually confirm the correct
refresh rate.
4. Test moving the window between screens with different refresh rates
and observe the refresh rate change.
fix: 修复多显示器刷新率错误问题
1. 修复了使用多个显示器时客户端窗口刷新率不正确的问题。
2. 问题的原因是无论哪个屏幕刷新,都会向客户端窗口发送 `frame_done` 通
知。这导致在使用两个屏幕时发送双倍的 `frame_done` 通知。
3. 解决方案是仅在表面所在的具有最高刷新率的屏幕提交时才向该表面发送
`frame_done` 通知。此行为与 wlroots 和 mutter 的处理方式一致。
4. 修改了 `WOutputRenderWindow::doRender` 中的代码以跟踪实际提交的输出,
然后 `WSurfaceItem` 检查它是否仅在 `framePacingOutput` 已提交时才发送
`notifyFrameDone`。
5. 添加了在没有 `WOutputRenderWindow` 时的日志记录。
Influence:
1. 使用具有不同刷新率的多个显示器进行测试。
2. 验证客户端窗口的刷新率与其主要所在的屏幕的刷新率相匹配。
3. 使用 http://testufo.com/ 等工具以直观地确认正确的刷新率。
4. 测试在具有不同刷新率的屏幕之间移动窗口并观察刷新率的变化。
1. The previous logic only redrew the surface when the buffer changed,
which is insufficient.
2. Firefox frequently updates the frame callback list using
`WLR_SURFACE_STATE_FRAME_CALLBACK_LIST`. Receiving such commits should
also trigger a redraw to trigger the frame done event for the surface.
3. This fixes an issue where Firefox windows would often not refresh
until the mouse was moved.
Influence:
1. Verify that Firefox windows now refresh correctly without requiring
mouse movement.
2. Ensure that other applications are not negatively affected by this
change.
3. Check for any performance regressions related to the increased redraw
frequency.
fix: 当帧回调列表更新时重绘
1. 之前的逻辑仅在缓冲区更改时才重绘表面,这不足够。
2. Firefox 经常使用 `WLR_SURFACE_STATE_FRAME_CALLBACK_LIST` 更新帧回调列
表。收到此类提交也应触发重绘,以触发表面的帧完成事件。
3. 这修复了 Firefox 窗口经常不刷新直到鼠标移动的问题。
Influence:
1. 验证 Firefox 窗口现在可以正确刷新,而无需移动鼠标。
2. 确保其他应用程序不会受到此更改的负面影响。
3. 检查与增加的重绘频率相关的任何性能下降。
Treeland will stuck in lockscreen after crash recovery, which is caused
by unintended login request for (for DDM) already logined user. This
commit adds a new DaemonMessages type, which is used to convey logined
users from DDM after socket connected, to avoid this problem.
1. Add callback for disableRender, to ensure render is exactly disabled
before DDM doing further actions;
2. Revoke all evdev devices before VT switch (at disableRender()), to
prevent accidental input events during switch;
3. Refine logic of switchToUser, take care of showing lockscreen after
switch;
4. Make event function args const
This commit aims to improve the overall robustness of the code,
potentially addressing a rare crash scenario related to window
animations. While the exact cause of the crash is difficult to
reproduce, the changes implemented here are believed to mitigate the
issue. Specifically, the commit includes two key modifications:
1. **SurfaceWrapper Destruction:** Enhanced the `SurfaceWrapper`
destructor to properly handle and delete animation objects
(`m_minimizeAnimation`, `m_showDesktopAnimation`). Additionally,
disconnect signals before deleting m_decoration and m_titleBar.
This ensures that these objects are properly cleaned up when the
`SurfaceWrapper` is destroyed, preventing potential dangling pointers
or memory leaks that could lead to crashes, especially in scenarios
involving complex window state transitions.
2. **QmlEngine Component Ownership:** Modified the ownership
of objects created using `QmlEngine::createComponent`.
The ownership is now explicitly set to follow the parent
object using `QQmlEngine::setObjectOwnership(item,
QQmlEngine::objectOwnership(parent))`. This change ensures that the
QML engine correctly manages the lifecycle of these objects, preventing
potential issues related to object deletion or memory management if the
parent object is destroyed before the created component.
These changes are intended to make the application more stable and
resilient to unexpected conditions, particularly those involving
animations and object lifetime management within the QML engine.
Influence:
1. Thoroughly test window animations, including opening, closing,
minimizing, maximizing, and transitioning between different window
states.
2. Test application under heavy load and stress conditions to trigger
potential race conditions or memory leaks related to object creation
and destruction.
3. Monitor application logs for any warnings or errors related to QML
component creation or object lifetime management.
4. Try to reproduce corner cases when animations are interrupted.
重构: 提高代码健壮性
本次提交旨在提高代码的整体健壮性,可能修复与窗口动画相关的罕见崩溃情况。
虽然崩溃的确切原因难以重现,但相信此处实现的更改可以缓解该问题。具体来
说,此提交包括两个关键修改:
1. **SurfaceWrapper 析构:** 增强了 `SurfaceWrapper` 析构函数,可以正确
处理和删除动画对象(`m_minimizeAnimation`, `m_showDesktopAnimation`)。此
外,在删除 m_decoration 和 m_titleBar 之前断开信号连接。这样可以确保在销
毁 `SurfaceWrapper` 时正确清理这些对象,防止潜在的悬空指针或内存泄漏,否
则可能导致崩溃,尤其是在涉及复杂窗口状态转换的情况下。
2. **QmlEngine 组件所有权:** 修改了使用 `QmlEngine::createComponent`
创建的对象的所有权。现在,使用 `QQmlEngine::setObjectOwnership(item,
QQmlEngine::objectOwnership(parent))` 将所有权显式设置为跟随父对象。此更
改确保 QML 引擎正确管理这些对象的生命周期,防止在父对象在创建的组件之前
被销毁时,可能导致与对象删除或内存管理相关的问题。
这些更改旨在使应用程序更加稳定并能够适应意外情况,尤其是涉及 QML 引擎内
动画和对象生命周期管理的情况。
Influence:
1. 全面测试窗口动画,包括打开、关闭、最小化、最大化以及在不同窗口状态之
间转换。
2. 在高负载和压力条件下测试应用程序,以触发与对象创建和销毁相关的潜在竞
争条件或内存泄漏。
3. 监视应用程序日志,查找与 QML 组件创建或对象生命周期管理相关的任何警告
或错误。
4. 尝试重现动画中断时的极端情况。
Fixes: linuxdeepin/treeland#528
the crash originates from improper signal-slot disconnection and object
deletion order, leading to use-after-free scenarios in QObject desructor
chain, especially involving SurfaceWrapper.
Fixes: linuxdeepin/treeland#528
Log:
1. Move D-Bus includes to fix potential header conflicts
2. Add new D-Bus signal handler for systemd-logind's PrepareForSleep
3. Implement onPrepareForSleep slot to manage rendering during hibernate
4. Improve session management with proper signal connections
5. Add logging for better debugging of power management events
The changes address the brief black screen issue that occurs during
system standby/hibernate transitions by properly managing the rendering
state through systemd-logind's PrepareForSleep signal. When entering
hibernate, we now explicitly disable rendering to prevent visual
artifacts, and re-enable it after waking up. The D-Bus signal handlers
have been reorganized for better maintainability and proper header
inclusion order.
fix: 解决待机时短暂黑屏问题
1. 移动 D-Bus 头文件包含位置以修复潜在的头文件冲突
2. 添加对 systemd-logind PrepareForSleep 信号的新 D-Bus 处理器
3. 实现 onPrepareForSleep 槽函数来管理休眠期间的渲染状态
4. 通过改进的信号连接提升会话管理功能
5. 添加日志记录以便更好地调试电源管理事件
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. 添加详细的日志记录用于调试复制操作
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.
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.
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;
* [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>
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.
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 置空。
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 被正确锁定和解锁,并且没有发生内存
泄漏。
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
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. 修改多个源文件以使用标准化日志分类
这些更改提供了统一的日志框架,改进了整个代码库的日志管理能力。集中化的系
统提高了可维护性,并确保不同组件之间日志格式的一致性。
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:
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
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
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
- 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.
- 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:
- 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.
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:
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。这提供了更好的错误提示信息,并在编译时提供了更强的类型安
全保证。
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 版本的兼容性
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,以反映最近的实现更
改,并确保组件间的协议版本一致性。
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. 清理未使用的代码可提高代码可维护性并减少技术债务
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]] 属性。
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. 解决其他次要的代码风格和结构问题