MovingBlocks / Terasology

Terasology - open source voxel world
http://terasology.org
Apache License 2.0
3.64k stars 1.32k forks source link

Bug on trying to change display settings to windowed fullscreen #5228

Closed firasmestiri closed 1 month ago

firasmestiri commented 3 months ago

General Info

Terasology Launcher Version: 4.8.0 Terasology Version: 5.3.0 Operating System: Windows 10 x64 Onboard / Dedicated Graphics: Nvidia gtx 1650ti Java Version: Version 8 361

What you were trying to do

I was attempting to change the display settings to windowed fullscreen to be able to easily switch windows etc..

What actually happened

The screen was still showing the taskbar

How to reproduce

  1. Select Terasology version '5.3.0'
  2. Start Terasology
  3. Go to settings then video settings
  4. Change the display mode to windowed fullscreen

Log details

No crash

Screenshots

here's a link to a video recording showing the process

https://drive.google.com/file/d/1-eZ1HBAPBV6kSBvPoEG-LBjZGtJhWacp/view?usp=sharing

BenjaminAmos commented 3 months ago

I can reproduce this. The game window appears to be rendering underneath the taskbar, rather than on-top of it.

It might be worth investigating if this is related to LWJGL/GLFW: https://github.com/MovingBlocks/Terasology/blob/1b480337c5bc193e0c1345c241d6348eaad44182/engine/src/main/java/org/terasology/engine/core/subsystem/lwjgl/LwjglDisplayDevice.java#L89-L100

soloturn commented 3 months ago

@BenjaminAmos reproduce with development version as well? in any case it would be really cool to release a new version, now new java version is stable. there is an ancient stackoverflow entry which looks kind of related: https://stackoverflow.com/questions/6790600/java-gui-hides-windows-taskbar

BenjaminAmos commented 3 months ago

I always try to reproduce issues with the latest development source where I can. This issue was still reproducable as of https://github.com/MovingBlocks/Terasology/commit/1b480337c5bc193e0c1345c241d6348eaad44182.

As for a new release, I would like to resolve some of the more severe issues with #5150 first, which I an currently working through.

Khaled-Dridi commented 2 months ago

I can reproduce this. The game window appears to be rendering underneath the taskbar, rather than on-top of it.

It might be worth investigating if this is related to LWJGL/GLFW:

https://github.com/MovingBlocks/Terasology/blob/1b480337c5bc193e0c1345c241d6348eaad44182/engine/src/main/java/org/terasology/engine/core/subsystem/lwjgl/LwjglDisplayDevice.java#L89-L100

hi i reproduced it and i found out that when you go from full screen to windowed full screen the task bar is hidden but when i go from windowed to windowed full screen the task bar will appear

Khaled-Dridi commented 2 months ago

I can reproduce this. The game window appears to be rendering underneath the taskbar, rather than on-top of it. It might be worth investigating if this is related to LWJGL/GLFW: https://github.com/MovingBlocks/Terasology/blob/1b480337c5bc193e0c1345c241d6348eaad44182/engine/src/main/java/org/terasology/engine/core/subsystem/lwjgl/LwjglDisplayDevice.java#L89-L100

hi i reproduced it and i found out that when you go from full screen to windowed full screen the task bar is hidden but when i go from windowed to windowed full screen the task bar will appear

i have a video proof of it

https://github.com/MovingBlocks/Terasology/assets/95275414/84d6933a-83e1-452c-b9a4-3045e1914f60

Khaled-Dridi commented 1 month ago

I can reproduce this. The game window appears to be rendering underneath the taskbar, rather than on-top of it.

It might be worth investigating if this is related to LWJGL/GLFW:

https://github.com/MovingBlocks/Terasology/blob/1b480337c5bc193e0c1345c241d6348eaad44182/engine/src/main/java/org/terasology/engine/core/subsystem/lwjgl/LwjglDisplayDevice.java#L89-L100

yes it was because of this code in engine/src/main/java/org/terasology/engine/core/subsystem/lwjgl/LwjglDisplayDevice.java GLFW.glfwSetWindowMonitor(window, MemoryUtil.NULL, 0, 0, vidMode.width(), vidMode.height(), GLFW.GLFW_DONT_CARE); i made it run twice and it worked