Hello Guest

Windowed Fullscreen broken?

  • 1 Replies
  • 2523 Views
Windowed Fullscreen broken?
« on: December 20, 2021, 22:53:42 »
Been trying to create a windowed fullscreen project on startup based on documentation so that I can have the title bar, but can't seem to get it work unless the window is of a specific smaller size. I just keep getting the regular fullscreen mode.
I havent seen any reliable info for a solution

Code: [Select]
glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);
glfwWindowHint(GLFW_DECORATED, GLFW_TRUE);

long primaryMonitor = glfwGetPrimaryMonitor();
final GLFWVidMode videoMode = glfwGetVideoMode(primaryMonitor);

if (isFullscreen() == GLFW_TRUE)
    mWindow = glfwCreateWindow(videoMode.width(), videoMode.height(), getTitle(), primaryMonitor, NULL);
else
    mWindow = glfwCreateWindow(getWidth(), getHeight(), getTitle(), NULL, NULL);

Re: Windowed Fullscreen broken?
« Reply #1 on: December 28, 2021, 18:05:02 »
Try this:
mWindow = glfwCreateWindow(videoMode.width(), videoMode.height()-100, getTitle(), primaryMonitor, NULL);

if that works, I suppose you want to find the decoration height. I don't know how to do this though.