Skip to content

fix: 若resizewindow()后没有任何绘图,delay_ms()不会更新窗口 - #397

Merged
Ltabsyy merged 1 commit into
x-ege:masterfrom
Ltabsyy:fix-resizewindow
Sep 2, 2026
Merged

fix: 若resizewindow()后没有任何绘图,delay_ms()不会更新窗口#397
Ltabsyy merged 1 commit into
x-ege:masterfrom
Ltabsyy:fix-resizewindow

Conversation

@Ltabsyy

@Ltabsyy Ltabsyy commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • 错误修复
    • 修复非 Windows 平台调整窗口大小后未及时刷新的问题,确保即使调整大小后没有绘制操作,窗口内容也能正常更新。

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: d4d30ca7-cb05-4b0b-a511-1a5e0e0ea729

📥 Commits

Reviewing files that changed from the base of the PR and between 8e3de3e and 01239ba.

📒 Files selected for processing (1)
  • src/window.cpp

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Walkthrough

非 Windows 分支的 resizewindow 在完成窗口表面调整和原生窗口尺寸更新后,递减 pg->update_mark_count,以便在没有后续绘制时刷新窗口。

Changes

窗口调整刷新

Layer / File(s) Summary
调整窗口后的刷新标记
src/window.cpp
resizewindow 在调用 resize_window_surface 和原生窗口 setSize 后递减 pg->update_mark_count

Estimated code review effort: 1 (简单) | ~5 分钟

Merge Risk: ⚪ Minimal · up to 01239

The change ensures the window updates after resizing even when no drawing follows. It is narrowly scoped, and no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: wysaid

Poem

小兔检查窗口调整,
更新标记轻轻下降,
没有绘制也会刷新,
画面稳定映入眼帘,
代码 review 清晰完成。

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确描述了主要变更:修复调用 resizewindow() 后未进行绘图时,delay_ms() 无法更新窗口的问题。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Ltabsyy
Ltabsyy merged commit 4148e1f into x-ege:master Sep 2, 2026
43 of 46 checks passed
@Ltabsyy
Ltabsyy deleted the fix-resizewindow branch September 2, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant