Skip to content

The window fails to initialize properly after a screen size change. #1270

Description

@HoshinoStarry

Specification

  • pywebview version: 4.4.1
  • operating system: Windows 11 Pro 23H2 22631.2715
  • web renderer: edgechromium

Description

Some problematic code:

while True:  # Enters this loop if the user can initialize the pywebview on their device.
    if load:  # Using the global variable 'load' to control the program initalize the window or not.
        load = False  # Set false to make sure only one main window on the desktop.
        webview.create_window('example', app)  # Using Flask as application backbone.
        webview.start(debug=True)
    time.sleep(1)
 
# This program have a thread to handle some event about the tray (using pystray), one of the event is if the user click the icon on the tray, the global variable 'load' will set true that let the main loop to initalize the pywebview again.

The screen record about this problem (after screen size changed):

https://drive.google.com/file/d/1nQ8Sjo9jL2Tf1zqcCkU4uUAAEBX56v3r/view?usp=drive_link

Practicalities

  • NO I cannot to work on this issue myself.

  • NO I am prepared to support this issue financially.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions