mirror of
https://github.com/glfw/glfw.git
synced 2024-12-01 16:44:37 +00:00
Added hack for setting WM_CLASS.
This commit is contained in:
parent
a7af3b2c8f
commit
8194f1e2ae
@ -212,6 +212,7 @@ See the [GLFW documentation](http://www.glfw.org/docs/latest/).
|
|||||||
been flipped
|
been flipped
|
||||||
- [Cocoa] Bugfix: The `GLFW_KEY_F13` key was reported as
|
- [Cocoa] Bugfix: The `GLFW_KEY_F13` key was reported as
|
||||||
`GLFW_KEY_PRINT_SCREEN`
|
`GLFW_KEY_PRINT_SCREEN`
|
||||||
|
- [X11] Added setting of the `WM_CLASS` property to the initial window title
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
@ -268,6 +268,19 @@ static GLboolean createWindow(_GLFWwindow* window,
|
|||||||
XFree(hints);
|
XFree(hints);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set ICCCM WM_CLASS property
|
||||||
|
// HACK: Until a mechanism for specifying the application name is added, the
|
||||||
|
// initial window title is used as the window class name
|
||||||
|
if (strlen(wndconfig->title))
|
||||||
|
{
|
||||||
|
XClassHint* hint = XAllocClassHint();
|
||||||
|
hint->res_name = (char*) wndconfig->title;
|
||||||
|
hint->res_class = (char*) wndconfig->title;
|
||||||
|
|
||||||
|
XSetClassHint(_glfw.x11.display, window->x11.handle, hint);
|
||||||
|
XFree(hint);
|
||||||
|
}
|
||||||
|
|
||||||
if (_glfw.x11.xi.available)
|
if (_glfw.x11.xi.available)
|
||||||
{
|
{
|
||||||
// Select for XInput2 events
|
// Select for XInput2 events
|
||||||
|
Loading…
Reference in New Issue
Block a user