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

Windowedfullscreen fix #5243

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public void setDisplayModeSetting(DisplayModeSetting displayModeSetting) {
setDisplayModeSetting(displayModeSetting, true);
}

@SuppressWarnings({"checkstyle:WhitespaceAround", "checkstyle:WhitespaceAfter"})
Khaled-Dridi marked this conversation as resolved.
Show resolved Hide resolved
public void setDisplayModeSetting(DisplayModeSetting displayModeSetting, boolean resize) {
long window = GLFW.glfwGetCurrentContext();
switch (displayModeSetting) {
Expand All @@ -88,13 +89,15 @@ public void setDisplayModeSetting(DisplayModeSetting displayModeSetting, boolean
break;
case WINDOWED_FULLSCREEN:
GLFWVidMode vidMode = desktopResolution.get();
GLFW.glfwSetWindowMonitor(window,
MemoryUtil.NULL,
0,
0,
vidMode.width(),
vidMode.height(),
GLFW.GLFW_DONT_CARE);
for(int i=0;i<2;i++){
GLFW.glfwSetWindowMonitor(window,
MemoryUtil.NULL,
0,
0,
vidMode.width(),
vidMode.height(),
GLFW.GLFW_DONT_CARE);
}
Khaled-Dridi marked this conversation as resolved.
Show resolved Hide resolved
GLFW.glfwSetWindowAttrib(window, GLFW.GLFW_DECORATED, GLFW.GLFW_FALSE);
config.setDisplayModeSetting(displayModeSetting);
config.setWindowedFullscreen(true);
Expand Down