Skip to content

Commit dcb7198

Browse files
committed
fix: prevent pending state failure in window platform interface
Remove Qt::QueuedConnection and early return to ensure pending operations always execute. The previous approach using stack variable comparisons was unreliable, causing pending state to fail intermittently. By directly invoking applyPending without queued connection and removing the unnecessary early return check, we guarantee consistent pending state application for window feature updates. Log: Fixed pending state failure issue in treeland window platform interface Influence: 1. Verify window features update correctly on treeland platform 2. Test window operations in rapid succession to ensure no pending failures 3. Run stress tests to confirm stable behavior without stack variable comparisons 4. Verify backward compatibility with existing treeland window management fix: 修复窗口平台接口中 pending 状态失败问题 移除 Qt::QueuedConnection 和提前返回逻辑,确保 pending 操作始终执行。之 前使用栈变量比较的方式不可靠,导致 pending 状态间歇性失效。通过直接调用 applyPending 并移除不必要的提前返回检查,保证了窗口功能更新的 pending 状 态能够一致应用。 Log: 修复了 treeland 窗口平台接口中 pending 状态失败问题 Influence: 1. 验证 treeland 平台上窗口功能更新是否正确 2. 测试快速连续窗口操作,确保无 pending 失败 3. 运行压力测试,确认无栈变量比较带来的不稳定行为 4. 验证与现有 treeland 窗口管理的向后兼容性
1 parent 4f21861 commit dcb7198

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

src/plugins/platform/treeland/dtreelandplatformwindowinterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ void DTreeLandPlatformWindowHelper::scheduleApply()
359359
if (m_applyScheduled)
360360
return;
361361
m_applyScheduled = true;
362-
QMetaObject::invokeMethod(this, &DTreeLandPlatformWindowHelper::applyPending, Qt::QueuedConnection);
362+
QMetaObject::invokeMethod(this, &DTreeLandPlatformWindowHelper::applyPending);
363363
}
364364

365365
void DTreeLandPlatformWindowHelper::applyPending()

src/plugins/platform/treeland/dtreelandplatformwindowinterface.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ private slots:
6666

6767
template<typename T>
6868
void updateFeature(T &member, const T &value, Feature flag) {
69-
if (member == value)
70-
return;
7169
member = value;
7270
m_initialized |= flag;
7371
m_dirty |= flag;

0 commit comments

Comments
 (0)