Skip to content

State of the Windows platform ? #1429

@filnet

Description

@filnet

Hi,

As a foreword, I am new to Rust and winit. Also, English is not my native language, so please take what follows with a grain of salt.

My understanding about winit on Windows is that:

  • it was recently updated quite heavily (in 0.20.0) to go from multi threaded to single threaded.
  • it has some complexity due to how Windows handles resizing and moving windows (switches to a modal mode where event query methods do not return anymore).

I've been looking at the code to address some issues [1][2][3] and it looks like the Windows code has inherited some complexity from the time it was multi threaded (?).

Thing's I have noticed:

  • there is some code duplication regarding event handling and runner state changes (in runner::process_event, runner::main_events_cleared and runner::draw_events_cleared)
  • state changes are located a bit everywhere and are not always consistent or enforced.
  • DeferredNewEvents handling seems brittle in particular when control flow is WaitUntil.
  • [nitpick] why the single runner.rs file in the event_loop directory

I am open to be given directions or to discuss ways to improve the situation if it needs to.

[1] #1391
[2] #1427
[3] #1428

PS: Looks like some projects are rolling back their winit 0.20.0 update because of issue [1].
See aclysma/skulpin#39

PPS : I have two PRs open :

Metadata

Metadata

Assignees

No one assigned

    Labels

    DS - win32Affects the Win32/Windows backendS - metaProject governance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions