Skip to content

WindowState is getting reset automatically if file loading is slow #5529

@irtcloud

Description

@irtcloud

SumatraPDF version

  • Pre-release 3.7.18300

Describe the bug

In Settings file I have:

WindowState = 2
WindowPos = 562 0 795 1030

After closing all Sumatra windows, when opening smaller files from my HDD that load relatively fast, I can see first 795x1030 window is immediately drawn, then after the file is loaded the window is becoming maximized (since WindowState = 2).

But after closing all Sumatra windows, when opening larger files (like 1GB+), I can see first 795x1030 window is drawn, then after the file is loaded the window is not becoming maximized. After closing Sumatra in Settings I can see that WindowState = 1 is now saved.

In 3.5 when opening first file the Sumatra window was hidden, then only after 100% loading in background and setting correct window size according to Settings file (1=normal or 2=maximized or whatever) the window was drawn.

In 3.6 when opening first file the Sumatra window was immediately drawn with size according to Settings file, then after 100% loading the file was shown in new window tab.

So if WindowState = 2 (maximized) then:

  • Old 3.5 style was best (draw window of maximized size in bg, then show only after file load).

  • 3.6 style is ok but not great as empty window of maximized size is drawn, then we wait for file to load.

  • But 3.7 style is fully broken as first empty window of not-maximized size is drawn, then file is loaded and then window is maximized. But if file loading is slow then maximize command is getting lost and window remains of not-maximized size only. 👎

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions