mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 21:14:35 +00:00
X11: Fix BadMatch focusing a window on non-EWMH WM
When the WM does not support EWMH or there is no WM running, GLFW falls
back to XSetInputFocus, which will emit BadMatch if the window is not
viewable, which will terminate the program.
Bug spotted on IRC.
(cherry picked from commit aa5e313561
)
This commit is contained in:
parent
0938462616
commit
487e0419a7
@ -118,7 +118,7 @@ information on what to include when reporting a bug.
|
||||
|
||||
## Changelog
|
||||
|
||||
There is nothing here yet.
|
||||
- [X11] Bugfix: `glfwFocusWindow` could terminate on older WMs or without a WM
|
||||
|
||||
|
||||
## Contact
|
||||
|
@ -2457,7 +2457,7 @@ void _glfwPlatformFocusWindow(_GLFWwindow* window)
|
||||
{
|
||||
if (_glfw.x11.NET_ACTIVE_WINDOW)
|
||||
sendEventToWM(window, _glfw.x11.NET_ACTIVE_WINDOW, 1, 0, 0, 0, 0);
|
||||
else
|
||||
else if (_glfwPlatformWindowVisible(window))
|
||||
{
|
||||
XRaiseWindow(_glfw.x11.display, window->x11.handle);
|
||||
XSetInputFocus(_glfw.x11.display, window->x11.handle,
|
||||
|
Loading…
Reference in New Issue
Block a user