Thanks to visit codestin.com
Credit goes to github.com

Skip to content

GlfwException thrown when toggeling WindowMode from Fullscreen to Normal #1093

@BlakkM9

Description

@BlakkM9

Summary

When initializing a (GLFW) window in WindowMode.Fullscreen and toggle to WindowMode.Normal later on, it throws
Silk.NET.GLFW.GlfwException: 'InvalidValue: Invalid window size 0x0'

Steps to reproduce

  • Platform: Desktop
  • Framework Version: .NET 6
  • API: Vulkan
  • API Version: Vulkan 1.3
  1. Create a GLFW window with WindowState set to WindowState.Fullscreen (before calling window.Run()).
  2. Set WindowState of the window to WindowState.Normal after window.Run() was called.

Comments

I think this is caused by _nonFullscreenPosition and _nonFullscreenSize never being set when the window is created in fullscreen (or any other not normal mode) and thus being <0, 0> here.
Only place where these two are actually set is when setting the window state to normal (I guess) here.

Not 100% sure how to fix it and the project is pretty complex so I figured it is best to just open an issue (also this is probably fixed by just adding 2 lines somewhere).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions