<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="/blog/assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hack Note (Posts about debugging)</title><link>https://samsonwang.github.io/blog/</link><description></description><atom:link href="https://samsonwang.github.io/blog/tags/debugging.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2017-2026 &lt;a href="mailto:wangzhilv@gmail.com"&gt;Samson Wang&lt;/a&gt; 
&lt;a rel="license" href="https://creativecommons.org/licenses/by-nc/4.0/"&gt;
&lt;img alt="cc-by-nc 4.0" style="padding-bottom:2px" src="/images/cc-by-nc.png" /&gt;&lt;/a&gt;
</copyright><lastBuildDate>Fri, 30 Oct 2026 08:01:27 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>记录一次 Qt 屏幕定位排查：为什么隐藏窗口“感受不到”显示器变更</title><link>https://samsonwang.github.io/blog/posts/2026/debug-qt-stale-screen-on-windows/</link><dc:creator>Samson Wang</dc:creator><description>&lt;div&gt;&lt;p&gt;
项目 LaunchyQt（Qt 5.12.10 / MSVC2017 / Windows）遇到一个问题：把显示器从 4K 换成 2K 之后唤出主界面，它仍然按 4K 的尺寸居中，落在屏幕偏右下、甚至压到边缘。排查到最后发现，根源不是坐标算错了，而是“隐藏窗口根本没有 HWND，所以收不到 Windows 的屏幕变化消息”。本文记录整个排查过程，并顺带把 Windows 屏幕变化消息的机制梳理清楚。&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://samsonwang.github.io/blog/posts/2026/debug-qt-stale-screen-on-windows/"&gt;Read more…&lt;/a&gt; (8 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>debugging</category><category>qt</category><category>windows</category><guid>https://samsonwang.github.io/blog/posts/2026/debug-qt-stale-screen-on-windows/</guid><pubDate>Wed, 28 Oct 2026 01:55:54 GMT</pubDate></item></channel></rss>