handling
Changed m_popupContainer from PopupSurfaceContainer to SurfaceContainer
to fix tooltip damage issue caused by PR #428. This is a temporary
fix while a better solution for handling popup click events is being
developed.
Log: Fixed tooltip display issues by changing popup container
implementation
Influence:
1. Test tooltip display functionality across different applications
2. Verify popup windows and menus still work correctly
3. Check for any regression in popup interaction behavior
4. Test various popup types including context menus and tooltips
5. Verify z-ordering of popup elements remains correct
refactor: 将弹出窗口容器从 PopupSurfaceContainer 替换为 SurfaceContainer
将 m_popupContainer 从 PopupSurfaceContainer 改为 SurfaceContainer,以修
复 PR #428 导致的工具提示损坏问题。这是一个临时修复方案,同时正在开发更
好的弹出窗口点击事件处理方案。
Log: 通过更改弹出窗口容器实现修复了工具提示显示问题
Influence:
1. 测试不同应用程序中的工具提示显示功能
2. 验证弹出窗口和菜单是否仍能正常工作
3. 检查弹出窗口交互行为是否有回归问题
4. 测试各种弹出类型,包括上下文菜单和工具提示
5. 验证弹出元素的 Z 轴排序是否保持正确
- Use WOutputRenderWindow interface for output configuration
- Complete output state management with all properties
- Ensure settings only saved when configuration succeeds
The WSurface's `aboutToBeInvalidated` signal connection was incorrectly
using `QObject::connect` instead of `safeConnect`. This could lead
to issues when the WSurface object is modified using `setSurface`,
as the previous object's `aboutToBeInvalidated` signal would not be
disconnected, potentially causing a crash or unexpected behavior. This
change replaces the regular `QObject::connect` with `safeConnect` to
ensure proper disconnection and avoid potential issues when the surface
is replaced.
Influence:
1. Test replacing a WSurface multiple times with different WSurface
objects using `setSurface`.
2. Verify that the `releaseResources` function is only called when the
current WSurface is truly invalidated and not prematurely.
3. Observe application behavior under heavy WSurface replacement
scenarios to ensure stability and prevent crashes.
fix: 使用 safeConnect 连接 aboutToBeInvalidated 信号
WSurface 的 `aboutToBeInvalidated` 信号连接错误地使用了
`QObject::connect` 而不是 `safeConnect`。当使用 `setSurface` 修改
WSurface 对象时,这可能导致问题,因为前一个对象的 `aboutToBeInvalidated`
信号不会断开,可能导致崩溃或意外行为。此更改将常规的 `QObject::connect`
替换为 `safeConnect`,以确保正确断开连接并避免在表面替换时出现潜在问题。
Influence:
1. 使用 `setSurface` 多次用不同的 WSurface 对象替换 WSurface。
2. 验证 `releaseResources` 函数仅在当前 WSurface 真正失效时才被调用,而
不是过早调用。
3. 观察在大量 WSurface 替换场景下的应用程序行为,以确保稳定并防止崩溃。
* [skip CI] Translate wallpaper.en_US.ts in sq
91% of minimum 10% translated source file: 'wallpaper.en_US.ts'
on 'sq'.
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 sq
95% of minimum 10% translated source file: 'lockscreen.en_US.ts'
on 'sq'.
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 sq
100% translated source file: 'lockscreen.en_US.ts'
on 'sq'.
* [skip CI] Translate multitaskview.en_US.ts in sq
100% translated source file: 'multitaskview.en_US.ts'
on 'sq'.
* [skip CI] Translate treeland.en_US.ts in sq
100% translated source file: 'treeland.en_US.ts'
on 'sq'.
---------
Log:
- Track each WXWayland instance by uid so every session gets its own
XWayland socket
- Hide/show XWayland surfaces when switching users to prevent previous
windows leaking
为不同用户管理独立的 XWayland 会话
- 为每个 uid 记录 WXWayland 实例,实现按用户隔离的 XWayland socket
- 切换用户时自动隐藏/显示对应的 XWayland 窗口,避免旧会话窗口外泄
Add AddressSanitizer (ASAN) environment variables to the treeland
systemd service file. This aids in debugging memory-related issues
within treeland, particularly when running with ASAN enabled. The
`ASAN_SYMBOLIZER_PATH` variable points to the llvm-symbolizer, enabling
symbolization of ASAN reports. The `ASAN_OPTIONS` variable configures
ASAN to log its output to a specific file (`/tmp/treeland-asan`),
disables leak detection (due to false positives in some environments),
enables immediate abortion on error, and enables symbolization within
the log file. This change facilitates easier debugging of memory
corruption and other ASAN-detectable errors.
Influence:
1. Verify that ASAN logs are generated in the specified log file when
ASAN is enabled.
2. Ensure that the ASAN logs contain symbolized stack traces.
3. Confirm that treeland aborts when memory errors are detected with
ASAN enabled.
chore: 添加 ASAN 环境变量
将 AddressSanitizer (ASAN) 环境变量添加到 treeland systemd 服务文件中。
这有助于调试 treeland 中与内存相关的问题,尤其是在启用 ASAN 的情况下。
`ASAN_SYMBOLIZER_PATH` 变量指向 llvm-symbolizer,从而可以对 ASAN 报告
进行符号化。`ASAN_OPTIONS` 变量配置 ASAN 将其输出记录到特定文件 (`/tmp/
treeland-asan`),禁用泄漏检测(由于某些环境中的误报),在发生错误时立即
中止,并启用日志文件中的符号化。此更改有助于更轻松地调试内存损坏和其他
ASAN 可检测到的错误。
Influence:
1. 验证启用 ASAN 后,是否在指定的日志文件中生成 ASAN 日志。
2. 确保 ASAN 日志包含符号化的堆栈跟踪。
3. 确认在启用 ASAN 的情况下检测到内存错误时,treeland 会中止。
This change addresses the issue where the client process ID associated
with an XWayland surface could not be directly obtained through
`WClient`. Previously, accessing the `WClient` of an XWayland
surface always returned the XWayland process itself. To resolve
this, two virtual functions, `pid()` and `pidFD()`, have been added
to the `WObject` class and overridden in `WXWaylandSurface`. These
functions allow retrieving the actual PID and PID file descriptor
of the XWayland window's client. The `pidFD` is obtained by using
`syscall(SYS_pidfd_open, pid(), 0)`. This approach enables correct
identification of the client process owning the XWayland surface.
Influence:
1. Verify that the `pid()` function on a `WXWaylandSurface` object
returns the correct process ID of the client application, not the
XWayland process.
2. Confirm that `pidFD()` returns a valid file descriptor for the client
application's PID. Check the returned file descriptor is valid.
3. Ensure that these new functions do not negatively impact other parts
of the Waylib codebase.
4. Test multiple XWayland applications to ensure consistent and accurate
PID retrieval.
5. Test on different platforms to ensure `syscall(SYS_pidfd_open, pid(),
0)` is working correctly, and fallback gracefully if not.
feat: 暴露 XWayland surface 进程 ID
此更改解决了无法通过 `WClient` 直接获取与 XWayland surface 关联的客户
端进程 ID 的问题。 以前,访问 XWayland surface 的 `WClient` 始终返回
XWayland 进程本身。 为了解决这个问题,我们在 `WObject` 类中添加了两个虚
函数 `pid()` 和 `pidFD()`,并在 `WXWaylandSurface` 中重写了它们。 这些函
数允许检索 XWayland 窗口客户端的实际 PID 和 PID 文件描述符。 `pidFD` 通
过使用 `syscall(SYS_pidfd_open, pid(), 0)` 获得。 这种方法可以正确识别拥
有 XWayland surface 的客户端进程。
Influence:
1. 验证 `WXWaylandSurface` 对象上的 `pid()` 函数返回客户端应用程序的正确
进程 ID,而不是 XWayland 进程。
2. 确认 `pidFD()` 为客户端应用程序的 PID 返回有效的文件描述符。 检查返回
的文件描述符是否有效。
3. 确保这些新函数不会对 Waylib 代码库的其他部分产生负面影响。
4. 测试多个 XWayland 应用程序,以确保一致且准确的 PID 检索。
5. 在不同平台上进行测试,以确保 `syscall(SYS_pidfd_open, pid(), 0)` 正常
工作,如果不能正常工作,则优雅地回退。
The Debian build environment in the CI workflows for both qwlroots and
waylib has been changed from `experimental` to `unstable`. This change
was necessary because the `experimental` environment was proving to
be unstable, frequently causing CI failures. Debian `unstable` is more
reliable and now provides wlroots 0.19 which meets the required version.
The apt sources in the build workflows have been updated to reflect
this change.
Influence:
1. Monitor CI build stability for both qwlroots and waylib on the Debian
unstable environment.
2. Verify that the builds are successful and that the required
dependencies, including wlroots 0.19, are correctly installed.
3. Check for any compatibility issues introduced by the change in the
build environment.
chore: 更改 Debian 构建环境为 unstable
qwlroots 和 waylib 的 CI 工作流程中的 Debian 构建环境已从 `experimental`
更改为 `unstable`。 这一更改是必要的,因为 `experimental` 环境被证明不
稳定,经常导致 CI 失败。 Debian `unstable` 更加可靠,现在提供 wlroots
0.19,满足了所需的版本。 构建工作流程中的 apt 源已更新以反映此更改。
Influence:
1. 监控 Debian unstable 环境上 qwlroots 和 waylib 的 CI 构建稳定性。
2. 验证构建是否成功,以及是否正确安装了所需的依赖项,包括 wlroots 0.19。
3. 检查构建环境更改引入的任何兼容性问题。
This commit removes the branch filters from the `on` triggers in several
GitHub workflow files. Specifically, the `branches: - master` filter has
been removed from the `push` and `pull_request` triggers in `.github/
workflows/qwlroots-archlinux-build.yml`, `.github/workflows/qwlroots-
debian-build.yml`, `.github/workflows/treeland-archlinux-build.yml`,
`.github/workflows/waylib-archlinux-build.yml`, and `.github/workflows/
waylib-debian-build.yml`.
This change ensures that the workflows are triggered for all branches,
including feature branches and release branches, rather than being
limited to the `master` branch. This provides better coverage for
automated builds and tests whenever changes are pushed or a pull request
is created against *any* branch. This is important as the project
evolves beyond relying solely on master and introduces feature branches,
ensuring consistent CI across development.
Influence:
1. Verify that all workflows trigger correctly on pushes and pull
requests for all branches, not just master.
2. Create a pull request to a new branch and ensure that all relevant
workflows are triggered.
3. Push a commit to a new branch and verify that all relevant workflows
are triggered.
重构: 移除工作流程触发器的分支筛选器
此提交从多个 GitHub 工作流程文件的 `on` 触发器中删除了分支筛选器。
具体来说,已从 `.github/workflows/qwlroots-archlinux-build.yml`、
`.github/workflows/qwlroots-debian-build.yml`、`.github/workflows/
treeland-archlinux-build.yml`、`.github/workflows/waylib-archlinux-
build.yml` 和 `.github/workflows/waylib-debian-build.yml` 中的 `push` 和
`pull_request` 触发器中删除 `branches: - master` 筛选器。
此更改确保工作流程在所有分支(包括功能分支和发布分支)上触发,而不是仅限
于 `master` 分支。 无论何时推送更改或针对*任何*分支创建拉取请求,这都为
自动构建和测试提供了更好的覆盖范围。 这一点很重要,因为项目的发展不仅仅
依赖于 master,还引入了功能分支,确保了整个开发过程中的持续集成。
Influence:
1. 验证所有工作流程是否在所有分支(不仅仅是 master)的推送和拉取请求上正
确触发。
2. 创建一个到新分支的拉取请求,并确保所有相关的工作流程都被触发。
3. 将提交推送到一个新分支,并验证所有相关的工作流程是否被触发。
Fixes a build failure that occurs when Treeland examples are enabled,
specifically in higher versions of Qt6. The issue arises because certain
private Qt modules (like `WaylandClientPrivate`) are not automatically
included and need to be explicitly specified using `find_package`.
Failing to do so results in linker errors during the build process. This
change ensures that the necessary private modules are found, allowing
the examples to compile successfully.
Influence:
1. Build the `test_multitaskview` example with Treeland examples
enabled.
2. Verify that the build completes without any errors related to missing
Qt private modules.
3. Confirm that the compiled example runs correctly.
fix: 修复开启 treeland 示例时构建失败的问题
修复了在 Qt6 的较高版本中,启用 Treeland 示例时发生的构建失败。 出现此问
题的原因是某些私有 Qt 模块(如 `WaylandClientPrivate`)不会自动包含,需
要使用 `find_package` 显式指定。 否则,会导致构建过程中出现链接器错误。
此更改确保找到必要的私有模块,从而使示例能够成功编译。
Influence:
1. 在启用 Treeland 示例的情况下构建 `test_multitaskview` 示例。
2. 验证构建是否完成,并且没有与缺少的 Qt 私有模块相关的任何错误。
3. 确认编译后的示例可以正确运行。
The build was failing on Arch Linux due to an upgrade to Qt 6.10.
This version of Qt requires explicitly finding the private modules
(QuickPrivate, WaylandClientPrivate). This commit updates the
CMakeLists.txt files in the affected directories (src/, src/treeland-
shortcut/, waylib/examples/tinywl/, and waylib/src/server/) to
explicitly find these private modules. It also updates the minimum
required Qt version in some waylib CMakeLists.txt files to 6.8 to align
with the actual required version.
修复了在 Arch Linux 上的构建失败
由于升级到 Qt 6.10,导致在 Arch Linux 上的构建失败。 此版本的 Qt 需要显
式查找私有模块(QuickPrivate, WaylandClientPrivate)。 此提交更新了受影
响目录(src/、src/treeland-shortcut/、waylib/examples/tinywl/ 和 waylib/
src/server/)中的 CMakeLists.txt 文件,以显式查找这些私有模块。 它还在一
些 waylib CMakeLists.txt 文件中更新了最低要求的 Qt 版本到 6.8,以与实际
要求的版本保持一致。
This commit explicitly includes `GuiPrivate` and `QuickPrivate` Qt
modules in `CMakeLists.txt` for both the `waylib` and `waylib/src/
server` directories. This is necessary because Qt 6.11 and later
versions no longer implicitly include these private modules. Failing
to include them results in build failures due to missing headers and
symbols.
Log: Fixed build issue with Qt 6.11 and later versions by explicitly
including necessary private Qt modules.
Influence:
1. Verify that the project builds successfully with Qt versions 6.11
and later.
2. Ensure that all functionalities relying on Qt private modules
(e.g., custom QML components, internal Qt API usage) continue to work
as expected.
3. Test on different platforms (Linux, Windows, macOS) where Qt is used.
fix: 为 Qt 6.11 包含 Qt 私有模块
此提交在 `waylib` 和 `waylib/src/server` 目录的 `CMakeLists.txt` 中显式
包含 `GuiPrivate` 和 `QuickPrivate` Qt 模块。 这是必要的,因为 Qt 6.11
及更高版本不再隐式包含这些私有模块。 未能包含它们会导致由于缺少头文件和
符号而导致构建失败。
Log: 通过显式包含必要的私有 Qt 模块,修复了 Qt 6.11 及更高版本的构建
问题。
Influence:
1. 验证项目是否可以使用 Qt 6.11 及更高版本成功构建。
2. 确保所有依赖于 Qt 私有模块的功能(例如,自定义 QML 组件、内部 Qt API
使用)继续按预期工作。
3. 在使用 Qt 的不同平台(Linux、Windows、macOS)上进行测试。
Introduces an on-screen FPS overlay with timer-based sampling aligned
to the active screen’s refresh rate. automatic refresh-rate handling
on screen changes.
This commit fixed the SessionModel and SessionList, and enabled session
selection by adding a button to ControlAction.qml. Thus treeland can act
as a greeter of ddm, guide the start of other desktop environment.
This commit adds support for the ext-session-lock-v1 protocol to
Treeland compositor.
The implementation allows for a grace delay of 300ms for client to
properly setup locking surfaces before sending locking.
The implementation also disables animation for locking triggered by
ext-session-lock-v1.
When the lock is abandoned, if lockscreen plugin is loaded, treeland
automaticly replace lock surfaces with that provided by the plugin.
If else, the session will remain locked forever.
Implementation Details:
1. lockscreen.cpp: extend the LockScreen class to handle locking
initiated by WSessionLock object.
2. qmlengine: add a fallback LockScreen of solid grey color, in case
if the locking client erronously deleted a lock surface before unlock.
3. treeland.cpp: allow loading the lockscreen plugin without DDM support.
4. output.cpp: allow session lock surfaces to ignore exclusive zones.
5. helper.cpp: attaches WSessionLockManager and handle screen lock logics.
6. surfacewrapper.cpp: added the LockScreen type to SurfaceWrapper
This commit adds support for the Wayland ext-session-lock-v1 protocol.
1. Added Class
- WSessionLockManager
- WSessionLock
- WSessionLockSurface
2. Implementation Details
Lifecycle of WSessionLock is managed by the WSessionLockManager.
Lifecycle of WSessionLockSurface is managed by its WSessionLock.
WSessionLock handles identification of all possible states a session lock
object can experiance, they are listed as follows:
- Created: default state
- Locked: session locked (after send_locked() is sent)
- Unlocked: client sent unlock_and_destroy()
- Finished: locking denyed by server sending finish()
- Canceled: lock destroyed by client before send_locked() is sent
- Abandoned: lock abnormally destroyed by client after locking
3. tinywl
An example usage is provided in the updated tinywl compositor.
This commit added the override specifier for waylandClient() and
instantRelease() methods in class WLayerSurfacePirvate.
waylandClient() is a virtual function in class WObjectPrivate,
instantRelease() is a virtual function in clas WWrapObjectPrivate.
This commit exposes wlr_session_lock_v1_destroy as
qw_session_lock_v1::destroy(), which allows the compositor
to send finished() event on an ext_session_lock_v1 object.
qw_session_lock_v1 objects are not the owner of their handles,
thus cannot be properly destroyed via operator delete. Exposing
the destroy() method as public is necessary.
According to wayland protocol, compositor should have the ability
to deny a session lock request.
This commit addresses an issue where the application would fail with
an assertion failure related to `qw_buffer` objects not being properly
released upon exiting the application. The previous implementation
directly called `QCoreApplication::exit` or `QCoreApplication::quit`,
which would trigger the destruction of various `QObject` instances
(such as `Helper` and `QmlEngine`) *after* the Qt event loop had already
exited.
Since many of these objects relied on `deleteLater` for their
destruction, and `deleteLater` calls are ineffective once the event loop
has terminated, these objects were not being fully destructed, leading
to resource leaks and the aforementioned assertion failure.
The solution involves ensuring that all necessary objects are
explicitly destroyed *before* calling `QCoreApplication::exit` or
`QCoreApplication::quit`. Specifically:
1. A `quit()` method has been added to the `Treeland` class, which
disconnects the object from all signals and slots, and then resets the
`d_ptr` (unique pointer to the private implementation) to ensure all
Treeland related objects are properly deleted. This cleanup happens
before calling `qApp->quit()`.
2. The signal connection between `QQmlEngine::quit` and
`QCoreApplication::quit` is changed to a `Qt::QueuedConnection` to avoid
potential issues when the quit call originates from within an event
handler (e.g., a cursor button press/release event).
3. A new signal `requestQuit()` is introduced in `Helper` and emitted
instead of directly calling `qApp->quit()`. This signal is then
connected to the `Treeland::quit()` method using `Qt::QueuedConnection`.
4. In the `tinywl` example, the `QmlEngine` object is now
dynamically allocated and explicitly deleted before `app.exit()`
is called. The `Helper::requestQuit` signal is also connected to
`QmlEngine::deleteLater`.
These changes ensure that all relevant objects have been properly
cleaned up before the application terminates, resolving the assertion
failure and preventing potential resource leaks.
Influence:
1. Verify that the application exits cleanly without any assertion
failures related to `qw_buffer` or other resources.
2. Test exiting the application using various methods (e.g., the window
close button, a menu item, or a keyboard shortcut).
3. Ensure that all application data is saved correctly before exiting.
4. Test that the `LockScreen` object is properly destroyed by manually
creating and destroying a LockScreen object with the setLockScreenImpl
call in Helper.
修复程序退出前对象未正确销毁的问题
此提交修复了应用程序退出时,由于 `qw_buffer` 对象未正确释放而导
致的断言失败问题。 之前的实现直接调用 `QCoreApplication::exit` 或
`QCoreApplication::quit`,导致各种 `QObject` 实例(例如 `Helper` 和
`QmlEngine`)在 Qt 事件循环结束后才被销毁。
由于许多这些对象依赖于 `deleteLater` 进行销毁,并且一旦事件循环终止,
`deleteLater` 调用将无效,因此这些对象没有被完全销毁,从而导致资源泄漏和
前面提到的断言失败。
解决方案包括确保在调用 `QCoreApplication::exit` 或
`QCoreApplication::quit` 之前显式销毁所有必要的对象。 具体来说:
1. 在 `Treeland` 类中添加了一个 `quit()` 方法,该方法断开对象与所有
信号和槽的连接,然后重置 `d_ptr`(指向私有实现的唯一指针),以确保与
Treeland 相关的所有对象都得到正确删除。 此清理发生在调用 `qApp->quit()`
之前。
2. `QQmlEngine::quit` 和 `QCoreApplication::quit` 之间的信号连接已更改
为 `Qt::QueuedConnection`,以避免在退出调用源自事件处理程序内(例如,光
标按钮按下/释放事件)时出现潜在问题。
3. 在 `Helper` 中引入了一个新的信号 `requestQuit()`,并发出该信号而不是
直接调用 `qApp->quit()`。 然后使用 `Qt::QueuedConnection` 将此信号连接到
`Treeland::quit()` 方法。
4. 在`tinywl`示例中,`QmlEngine` 对象现在是动态分配的,并在调
用 `app.exit()` 之前显式删除。 `Helper::requestQuit` 信号也连接到
`QmlEngine::deleteLater`。
这些更改确保在应用程序终止之前已正确清理所有相关对象,从而解决了断言失败
并防止了潜在的资源泄漏。
Influence:
1. 验证应用程序是否干净地退出,而不会出现与 `qw_buffer` 或其他资源相关的
任何断言失败。
2. 使用各种方法(例如,窗口关闭按钮、菜单项或键盘快捷键)测试退出应用
程序。
3. 确保在退出之前正确保存所有应用程序数据。
4. 通过使用 Helper 中的 setLockScreenImpl 调用手动创建和销毁 LockScreen
对象来测试 LockScreen 对象是否已正确销毁。
1. Changed the destruction timing of RenderControl. Using deleteLater()
on RenderControl caused a crash when OpenGL makeCurrent() was called.
This is because the RenderControl was being deleted in a deferred
manner, potentially after the OpenGL context was already being used
or destroyed.
2. Switched to immediate deletion of RenderControl in the
WOutputRenderWindow destructor to avoid the crash.
3. Modified WBufferRenderer to use std::unique_ptr for buffer
management to ensure timely unlocking.
Influence:
1. Verify that applications using WOutputRenderWindow do not crash
on shutdown.
2. Check resource usage related to graphics buffers to ensure proper
allocation and deallocation.
3. Run performance tests to ensure that the change in deletion timing
does not negatively impact rendering performance.
4. Test the texture provider to verify the buffer is handled correctly.
fix: 改善 RenderControl 的资源管理
1. 更改了 RenderControl 的销毁时机。在 RenderControl 上使用
deleteLater() 会导致调用 OpenGL makeCurrent() 时崩溃。这是因为
RenderControl 以延迟方式被删除,可能在 OpenGL 上下文已经被使用或销毁
之后。
2. 切换到在 WOutputRenderWindow 析构函数中立即删除 RenderControl,以避
免崩溃。
3. 修改 WBufferRenderer 以使用 std::unique_ptr 进行缓冲区管理,以确保及
时解锁。
Influence:
1. 验证使用 WOutputRenderWindow 的应用程序在关闭时不会崩溃。
2. 检查与图形缓冲区相关的资源使用情况,以确保正确分配和释放。
3. 运行性能测试以确保删除时机的变化不会对渲染性能产生负面影响。
4. 测试纹理提供程序以验证缓冲区是否已正确处理。
The WQuickCursor was using a raw pointer to WCursor, which could be
accessed after the WCursor object had been destroyed during application
shutdown, leading to a heap-use-after-free error. This change replaces
the raw pointer with a QPointer, ensuring that the WQuickCursor only
accesses the WCursor object if it is still valid.
Influence:
1. Run the application and exit to ensure no heap-use-after-free error
occurs.
2. Test cursor functionalities to ensure they still work as expected.
fix: 修复程序退出时堆释放后使用问题
WQuickCursor 使用指向 WCursor 的原始指针,该指针可能在应用程序关闭期间
WCursor 对象被销毁后被访问,从而导致堆释放后使用错误。此更改将原始指针替
换为 QPointer,确保 WQuickCursor 仅在 WCursor 对象仍然有效时才访问它。
Influence:
1. 运行应用程序并退出,确保不会发生堆释放后使用错误。
2. 测试光标功能,确保它们仍然按预期工作。
The verbosity of cursor input and touch event logs has been reduced
from `QtDebugMsg` to `QtInfoMsg`. The high volume of debug logs was
overwhelming during development and debugging, making it difficult to
identify important information. By reducing the default log level,
only essential cursor-related information will be displayed unless debug
logging is specifically enabled. This change improves the clarity and
usability of log output during development.
Influence:
1. Verify cursor functionality remains unaffected by the log level
change.
2. Confirm that important cursor events are still logged at the
`QtInfoMsg` level.
3. Enable debug logging to ensure detailed cursor information is
available when needed.
4. Test with different input devices (mouse, touchpad, touch screen) to
ensure consistent behavior.
refactor: 降低光标相关日志的详细程度
光标输入和触摸事件日志的详细程度已从 `QtDebugMsg` 降低到 `QtInfoMsg`。
大量的调试日志在开发和调试过程中造成了信息过载,难以识别重要信息。 通过
降低默认日志级别,除非专门启用调试日志记录,否则只会显示基本的光标相关信
息。 此更改提高了开发期间日志输出的清晰度和可用性。
Influence:
1. 验证光标功能是否未受日志级别更改的影响。
2. 确认重要的光标事件仍然以 `QtInfoMsg` 级别记录。
3. 启用调试日志记录以确保在需要时可以使用详细的光标信息。
4. 使用不同的输入设备(鼠标、触摸板、触摸屏)进行测试,以确保行为一致。
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