Skip to content

onWindowEnterFullScreen and onWindowLeaveFullScreen are never called on windows. #560

Description

@j7126

On version 0.5.0, the enter-full-screen (onWindowEnterFullScreen) and leave-full-screen (onWindowLeaveFullScreen) events don't seem to ever be emitted on windows.

I am setting full screen using WindowManager.setFullScreen.

While debugging the behaviour, it seems that when HandleWindowProc is called after entering or leaving fullscreen with a WM_SIZE message, wParam is always 0 (SIZE_RESTORED), whereas it is expected to be 2 (SIZE_MAXIMIZED) in order to trigger the enter-full-screen event.

window_manager/windows/window_manager_plugin.cpp line 268

...
} else if (message == WM_SIZE) {
    if (window_manager->IsFullScreen() && wParam == SIZE_MAXIMIZED &&
        window_manager->last_state != STATE_FULLSCREEN_ENTERED) {
      _EmitEvent("enter-full-screen");
      window_manager->last_state = STATE_FULLSCREEN_ENTERED;
    } else if (!window_manager->IsFullScreen() && wParam == SIZE_RESTORED &&
               window_manager->last_state == STATE_FULLSCREEN_ENTERED) {
      window_manager->ForceChildRefresh();
      _EmitEvent("leave-full-screen");
      window_manager->last_state = STATE_NORMAL;
    } else if (window_manager->last_state != STATE_FULLSCREEN_ENTERED) {
...

There was also a similar issue from 2 years ago, which seems to have been resolved at the time #396

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions