antonypro/QGoodWindow

Black area at showing mainwindow.

luoqiqiqi75 opened this issue · 4 comments

Hi goodwindow,
fist of all, this is an awesome project! Like ♥

  • problem:
    A black frame flashes on program mainwindow showing.

  • screenshots:
    333b42df-b32f-412d-8d2c-e7539b832ca3

  • platform:
    Qt5.15.2 + MSVC2019_x64 + Win11/Win10

  • analysis:
    I have not seen this before 2.4.1 commit, which solves high resolusion resizing bug. So I guess it may affect by window size resizing, I try to comment this code, and this problem SOLVED, simply do nothing at updateWindowSize().
    Why this 3x resize method is added? Any consequence without main window resizing?

// src/qgoodwindow.cpp line 3391
void QGoodWindow::updateWindowSize()
{
    QTimer::singleShot(0, this, [=]{
        const int border_width = BORDERWIDTH();
        m_self_generated_resize_event = true;
        m_main_window->resize(1, 1);
        m_main_window->resize(width() + border_width, height() + border_width);
        m_main_window->resize(size());
        m_self_generated_resize_event = false;
    });
}

Hi, @luoqiqiqi75!

Please test QGoodWindow-2.4.2-beta1 and report if the bug also occurs.

The cited code is modified and present only on SWP_SHOWWINDOW event in this version.

Thanks!

Tested with GoodShowCase example in QGoodWindow-2.4.2-beta1 folder:

  • screenshot when trying to close
    image

No more resizing effect, however there is still one black screen flash on every widget showing, which seems to fix native states. Is it possible to refresh native states only without updating screen?

Hi, @luoqiqiqi75!

I made some improvements on QGoodWindow startup time, and the flashing was attenuated.

You can see the progress here: https://github.com/antonypro/QGoodWindow/tree/test/QGoodWindow-2.4.2-beta2

Thanks!

Hi, @luoqiqiqi75! The startup time was reduced on version 2.4.2. So I will close this issue.