Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: VNote首次启动时窗口闪烁 #2576

Open
znsoooo opened this issue Dec 31, 2024 · 0 comments
Open

Bug: VNote首次启动时窗口闪烁 #2576

znsoooo opened this issue Dec 31, 2024 · 0 comments

Comments

@znsoooo
Copy link

znsoooo commented Dec 31, 2024

Describe the bug

当关闭了 设置 - 通用 - 最小化到系统托盘 功能时,关闭VNote软件并再次打开,窗口会发生闪烁:

To Reproduce

见上。

Expected behavior

窗口布局没有闪烁,直接显示成最终状态。

Screenshots

录屏视频:

vnote-bug.mp4

Desktop (please complete the following information):

  • OS: Windows 11
  • Version 3.8.12

Additional context

这个问题虽然可以通过启用开关来减小影响(但是首次启动时还是会闪烁),但是这也许本身是个小问题,是否考虑一下能否解决?

我查看了源代码,也许产生问题是这样的原因:

加载上次关闭窗口位置的功能,位于 mainwindow.cpploadStateAndGeometry 函数,该函数被kickOffOnStart 函数调用,再上一层是 main 函数。

main.cppmain 函数的局部代码:

...

MainWindow window;
window.show();

QObject::connect(...);
...

// Let MainWindow show first to decide the screen on which app is running.
...

window.kickOffOnStart(cmdOptions.m_pathsToOpen);

...

如果将 window.show() 的代码移动到 window.kickOffOnStart 函数调用后面,是否能够解决问题:

...

MainWindow window;

...

window.kickOffOnStart(cmdOptions.m_pathsToOpen);
window.show(); // 移动到这里

...
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

No branches or pull requests

1 participant