GLFW title when in fullscreen
Monkey Targets Forums/Desktop/GLFW title when in fullscreen
| ||
When GLFW builds are fullscreen on Windows but don't have focus their name on the taskbar is "GLFW Window" instead of the window title. I've tested editing the GLFW files and it works to force a project specific window title, but I'm not sure of the correct monkey kosher project agnostic solution to fixing this is so it always uses the correct window title. |
| ||
when glfwgame.cpp reads if( !fullscreen ){ glfwSetWindowPos( (desktopMode.Width-width)/2,(desktopMode.Height-height)/2 ); glfwSetWindowTitle( _STRINGIZE(CFG_GLFW_WINDOW_TITLE) ); } there probably isn't a kosher way (?) only setting it anyway, outside the if. if that doesn't fail on mac or something, i think mark sibly could change that |
| ||
Try this fix in OnCreate():#GLFW_WINDOW_FULLSCREEN = True #GLFW_WINDOW_TITLE = "my Monkey X Window" #GLFW_WINDOW_WIDTH = 1024 ' 2560 #GLFW_WINDOW_HEIGHT = 768 ' 1440 Import mojo Extern Function UpdateGlfwWindowTitle:Void() = "glfwSetWindowTitle( _STRINGIZE(CFG_GLFW_WINDOW_TITLE) ); //" Public Class MojoApp Extends App Method OnCreate:Int() SetUpdateRate(60) UpdateGlfwWindowTitle() ' call it in OnCreate Return 0 End Method OnUpdate:Int() If KeyHit(KEY_ESCAPE) Then EndApp Return 0 End Method OnRender:Int() Cls(64,64,64) Return 0 End End Function Main:Int() New MojoApp Return 0 End |
| ||
Thank you for both posting. Danilo, tested your solution and it does appear to work. We can make sure to update window title in that way whenever we switch to/from fullscreen if need be. |