Skip to content

Add Window::get_fullscreen() -> bool #579

Closed

Description

@rukai

set_fullscreen takes an Option<WindowId>.
However we dont need to make get_fullscreen() return an Option<WindowId> because we can use get_current_monitor() -> WindowId instead.

The window manager (at least on X11) can set the fullscreen state so just remembering the state in winit will not be enough.

Activity

  1. added
    S - api
    C - needs discussion
    on Jun 27, 2018
  2. francesca64 commented on Jun 27, 2018

    @francesca64
    Member

    The way I'd want to address this is similar to #208, since:

    • Maximization events are necessary and it would make sense for the fullscreen API to follow the same pattern.
    • There's also a fullscreen button on macOS.
    • I tend to favor events over getters, since people presumably usually only want to know about changes, and only as often as they happen.

    So I'd go with WindowEvent::Fullscreen(Option<MonitorId>). However, I'm not opposed to having the getter as well, though I think it really should return Option<MonitorId>, for consistency with set_fullscreen. That also makes it easier to do dumb stuff with combinators.

  3. rukai commented on Jun 27, 2018

    @rukai
    ContributorAuthor

    Thanks, that all makes sense.

  4. francesca64 commented on Jul 19, 2018

    @francesca64
    Member

    Are there any WMs you recommend for testing this?

  5. rukai commented on Jul 19, 2018

    @rukai
    ContributorAuthor

    Not sure if your asking me directly? I only use i3.

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions