Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve window creation #767

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Improve window creation #767

wants to merge 3 commits into from

Conversation

alichraghi
Copy link
Member

@alichraghi alichraghi commented Nov 3, 2024

Description

Testing

Hello Swapchain

TODO list:

  • ECF_FULLSCREEN
  • ECF_MAXIMIZED
  • Multiple monitors
  • switch from/to fullscreen

- ECF_BORDERLESS
- ECF_UI_RESIZABLE and ECF_PROGRAM_RESIZABLE
- ECF_MINIMIZED
- ECF_MOUSE_CAPTURE
- ECF_ALWAYS_ON_TOP

Signed-off-by: Ali Cheraghi <[email protected]>
@alichraghi alichraghi marked this pull request as draft November 3, 2024 17:26
Signed-off-by: Ali Cheraghi <[email protected]>
creationParams.flags |= IWindow::ECF_CAN_RESIZE;
if (creationParams.flags.hasFlags(IWindow::ECF_CAN_MAXIMIZE) || creationParams.flags.hasFlags(IWindow::ECF_CAN_MINIMIZE))
creationParams.flags |= IWindow::ECF_UI_RESIZABLE;
if (creationParams.flags.hasFlags(IWindow::ECF_FULLSCREEN))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I wonder why games have full screen vs windowed borderless fullscreen, do we need to consider this as well? Why are you adding borderless flag when you detect fullscreen?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i did some researching and apparently in windows, the only difference between fullscreen and windowed borderless fullscreen is that the former has the HWND_TOPMOST flag. so:

  • fullscreen: borderless + always-on-top + monitor sized
  • windowed borderless fullscreen: borderless + monitor sized

Signed-off-by: Ali Cheraghi <[email protected]>
@alichraghi alichraghi marked this pull request as ready for review November 8, 2024 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants