Windowed Fullscreen broken?

Started by Murderface, December 20, 2021, 22:53:42

Previous topic - Next topic

Murderface

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

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);

jakethesnake

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.