mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 20:28:49 -05:00
Added support for _NET_WM_ICON_NAME.
This commit is contained in:
parent
797e936311
commit
06074bc698
|
@ -142,6 +142,7 @@ typedef struct _GLFWwindowX11
|
|||
Window handle; // Window handle
|
||||
Atom wmDeleteWindow; // WM_DELETE_WINDOW atom
|
||||
Atom wmName; // _NET_WM_NAME atom
|
||||
Atom wmIconName; // _NET_WM_ICON_NAME atom
|
||||
Atom wmPing; // _NET_WM_PING atom
|
||||
Atom wmState; // _NET_WM_STATE atom
|
||||
Atom wmStateFullscreen; // _NET_WM_STATE_FULLSCREEN atom
|
||||
|
|
|
@ -198,6 +198,9 @@ static GLboolean hasEWMH(_GLFWwindow* window)
|
|||
window->X11.wmName =
|
||||
getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_NAME");
|
||||
|
||||
window->X11.wmIconName =
|
||||
getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_ICON_NAME");
|
||||
|
||||
window->X11.wmPing =
|
||||
getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_PING");
|
||||
|
||||
|
@ -1512,6 +1515,8 @@ void _glfwPlatformCloseWindow(_GLFWwindow* window)
|
|||
|
||||
void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
|
||||
{
|
||||
Atom type = XInternAtom(_glfwLibrary.X11.display, "UTF8_STRING", False);
|
||||
|
||||
#if defined(X_HAVE_UTF8_STRING)
|
||||
Xutf8SetWMProperties(_glfwLibrary.X11.display,
|
||||
window->X11.handle,
|
||||
|
@ -1530,12 +1535,19 @@ void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
|
|||
|
||||
if (window->X11.wmName != None)
|
||||
{
|
||||
Atom type = XInternAtom(_glfwLibrary.X11.display, "UTF8_STRING", False);
|
||||
XChangeProperty(_glfwLibrary.X11.display, window->X11.handle,
|
||||
window->X11.wmName, type, 8,
|
||||
PropModeReplace,
|
||||
(unsigned char*) title, strlen(title));
|
||||
}
|
||||
|
||||
if (window->X11.wmIconName != None)
|
||||
{
|
||||
XChangeProperty(_glfwLibrary.X11.display, window->X11.handle,
|
||||
window->X11.wmIconName, type, 8,
|
||||
PropModeReplace,
|
||||
(unsigned char*) title, strlen(title));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user