Skip to content

Added support for fullscreen options and proper fullscreen behaviors in macos #473

Closed

Description

@edwin0cheng

This is a tracking issue for improvements of PR #465 :

  • Currently disregards whatever monitor is passed for setting fullscreen, always using whichever monitor has the keyboard focus. enterFullScreenMode should work for this, but it appears to be absent from core-foundation.
  • Similarly, get_current_monitor always returns the currently focused monitor, rather than the monitor the window is on. CGGetDisplaysWithRect could be used to find the monitor that the majority of the window is on. But it is absent from core-foundation too.
  • We should let user to control the FullScreen Options by expose it in WindowBuilderExt.

Here is the related PR for in core-foundation:

And related discussion: #460 (comment)

Activity

  1. added
    DS - appkit
    on Apr 22, 2018
  2. added
    D - average
    P - normal
    S - platform parity
    on May 6, 2018
  3. francesca64 commented on May 15, 2018

    @francesca64
    Member

    Is anything else blocking this? If you don't have time at the moment, I'd be happy to implement this.

  4. francesca64 commented on May 15, 2018

    @francesca64
    Member

    Turns out that we don't need CGGetDisplaysWithRect at all (and using it correctly with DPI and coordinate spaces is tricky). All it takes is msg_send![window, screen]!

  5. francesca64 commented on May 16, 2018

    @francesca64
    Member

    I've only addressed get_current_monitor. #521

    enterFullScreenMode works pretty differently from toggleFullScreen. It pops our view out into a "private" fullscreen window, which not only means our window delegate's windowDidEnterFullScreen/etc. isn't triggered, but we also don't get events at all. If you fullscreen to a different screen than the window is on, then the window remains visible where it was in addition to having the fullscreen view.

    Getting that to work correctly seems like it will be involved, so I'm not presently up to pursuing this further.

  6. edwin0cheng commented on May 16, 2018

    @edwin0cheng
    ContributorAuthor

    Thanks for your help !!

    • The main problem is, i found that i do not have another screen to let me implement/test these features. Have to wait until i come back home next month. 😅

    • Actuallly i did not know how enterFullScreenMode works, but would it involve willUseFullScreenPresentationOptions:? If so, we can set the bookkeeping data there too. On the other hand, if using enterFullScreenMode is that complicated, do we have any other way to do it ? The goal here is choosing which monitor to go to fullscreen. Although google-fu failed to find any information about it, would it possible to move the NSWindow to another screen first, and call toggleFullScreen ?

  7. francesca64 commented on May 16, 2018

    @francesca64
    Member

    You can supply the same options to enterFullScreenMode (and more). It should work fine to just move the window and toggleFullScreen, and it's at least better than nothing.

    Optimistically, enterFullScreenMode isn't that complicated to work with, and I'm just not very familiar with Cocoa yet. It does have some advantages, i.e. it fullscreens without the transition animation.

  8. madsmtm commented on Sep 8, 2022

    @madsmtm
    Member

    It seems like this issue has been long fixed, please reopen if that's not the case

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

    D - averageDS - appkitP - normalS - platform parity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions