Skip to content

Add WindowEvent::Mapped #3144

Open
Open

Description

@colinmarc

At least on Wayland, it's useful to know when your window is actually presented. In general, this would allow delaying some logic until the "final" initial state of the window is known.

I'd like to suggest a WindowEvent::Mapped, which would fire when the compositor sends wl_surface@enter. I don't know anything about how other platforms work so I can't suggest a mechanism there, but I can't imagine it's all that different.

Activity

  1. added
    S - api
    C - needs discussion
    on Oct 15, 2023
  2. MarijnS95 commented on Nov 1, 2023

    @MarijnS95
    Member

    On Android this might possibly be implemented by the actual onPause and onResume callbacks. Though a NativeWindow on Android is really just a buffer producer which could send its frames anywhere, not necessarily the display compositor (but we know the Activity around it at least).

  3. added this to the Version 0.31.0 milestone on Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C - needs discussionS - api

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions