mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Merge remote-tracking branch 'hanmac/utf8Title' into utf8
This commit is contained in:
commit
a508d21961
|
@ -141,6 +141,7 @@ typedef struct _GLFWwindowX11
|
||||||
Colormap colormap; // Window colormap
|
Colormap colormap; // Window colormap
|
||||||
Window handle; // Window handle
|
Window handle; // Window handle
|
||||||
Atom wmDeleteWindow; // WM_DELETE_WINDOW atom
|
Atom wmDeleteWindow; // WM_DELETE_WINDOW atom
|
||||||
|
Atom wmName; // _NET_WM_NAME atom
|
||||||
Atom wmPing; // _NET_WM_PING atom
|
Atom wmPing; // _NET_WM_PING atom
|
||||||
Atom wmState; // _NET_WM_STATE atom
|
Atom wmState; // _NET_WM_STATE atom
|
||||||
Atom wmStateFullscreen; // _NET_WM_STATE_FULLSCREEN atom
|
Atom wmStateFullscreen; // _NET_WM_STATE_FULLSCREEN atom
|
||||||
|
|
|
@ -195,6 +195,9 @@ static GLboolean hasEWMH(_GLFWwindow* window)
|
||||||
window->X11.wmStateFullscreen =
|
window->X11.wmStateFullscreen =
|
||||||
getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_STATE_FULLSCREEN");
|
getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_STATE_FULLSCREEN");
|
||||||
|
|
||||||
|
window->X11.wmName =
|
||||||
|
getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_NAME");
|
||||||
|
|
||||||
window->X11.wmPing =
|
window->X11.wmPing =
|
||||||
getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_PING");
|
getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_PING");
|
||||||
|
|
||||||
|
@ -1512,6 +1515,15 @@ void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
|
||||||
// Set window & icon title
|
// Set window & icon title
|
||||||
XStoreName(_glfwLibrary.X11.display, window->X11.handle, title);
|
XStoreName(_glfwLibrary.X11.display, window->X11.handle, title);
|
||||||
XSetIconName(_glfwLibrary.X11.display, window->X11.handle, title);
|
XSetIconName(_glfwLibrary.X11.display, window->X11.handle, title);
|
||||||
|
|
||||||
|
if(window->X11.wmName != None)
|
||||||
|
{
|
||||||
|
XChangeProperty(_glfwLibrary.X11.display, window->X11.handle,
|
||||||
|
window->X11.wmName,
|
||||||
|
XInternAtom(_glfwLibrary.X11.display, "UTF8_STRING", False),
|
||||||
|
8, PropModeReplace, (unsigned char *) title,
|
||||||
|
strlen(title));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user