Glfw: Low resolution titlebar on Retina Macs on 10.10

Created on 18 Jan 2015  路  5Comments  路  Source: glfw/glfw

I just bought a 13" Retina Mac and noticed that GLFW-created windows have a low-resolution titlebar (the window buttons in the top left corner and the window title text). The GLFW_USE_RETINA cmake flag is on, but I think this only affects the GL rendering surface (but on the screenshot it looks like the rendering is also low resolution, the _GLFW_USE_RETINA flag is definitely set though and in the debugger the setWantsBestResolution code path is taken):

#if defined(_GLFW_USE_RETINA)
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
    if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6)
        [window->ns.view setWantsBestResolutionOpenGLSurface:YES];
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
#endif /*_GLFW_USE_RETINA*/

lowres-titlebar-osx

bug macOS verified

Most helpful comment

Since this is an app bundle, I know it's possible to fix this problem by adding:

<key>NSHighResolutionCapable</key>
<true/>

To the app bundle's Info.plist file (located at *.app/Contents/Info.plist path).

In fact, I do not know of any other way except that. If you don't include that key, the app may or may not get treated as HiDPI-capable depending on some factors, which can result in low resolution window decorations, etc.

If someone knows an alternative reliable way to achieve this without needing to modify Info.plist, please share.

All 5 comments

Since this is an app bundle, I know it's possible to fix this problem by adding:

<key>NSHighResolutionCapable</key>
<true/>

To the app bundle's Info.plist file (located at *.app/Contents/Info.plist path).

In fact, I do not know of any other way except that. If you don't include that key, the app may or may not get treated as HiDPI-capable depending on some factors, which can result in low resolution window decorations, etc.

If someone knows an alternative reliable way to achieve this without needing to modify Info.plist, please share.

What @shurcooL said.

I will add a better plist template for the next release.

Was this a change from 10.9 or has it always worked this way? I can't recall anyone mentioning this before 10.10 was released.

If someone will end up here using search. This indeed fixes an issue but if does not for you, try to change application path. It appears that OSX caching plist partially. After I moved app to a /tmp (for testing) the option have applied.
Have fun.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aleck099 picture aleck099  路  3Comments

~
snbharath picture snbharath  路  3Comments

elmindreda picture elmindreda  路  4Comments

matiTechno picture matiTechno  路  4Comments

Tbwas picture Tbwas  路  4Comments