mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Improved X11 full screen focus control flow.
This commit is contained in:
parent
6cf15615e8
commit
21ce21cc07
@ -75,6 +75,7 @@ GLFW bundles a number of dependencies in the `deps/` directory.
|
|||||||
- [X11] Bugfix: `glfwInit` would segfault on systems without RandR
|
- [X11] Bugfix: `glfwInit` would segfault on systems without RandR
|
||||||
- [X11] Bugfix: The response to `_NET_WM_PING` was sent to the wrong window
|
- [X11] Bugfix: The response to `_NET_WM_PING` was sent to the wrong window
|
||||||
- [X11] Bugfix: Character input via XIM did not work in many cases
|
- [X11] Bugfix: Character input via XIM did not work in many cases
|
||||||
|
- [X11] Bugfix: No fallback existed for missing `_NET_ACTIVE_WINDOW` support
|
||||||
- [WGL] Removed `GLFW_USE_DWM_SWAP_INTERVAL` compile-time option
|
- [WGL] Removed `GLFW_USE_DWM_SWAP_INTERVAL` compile-time option
|
||||||
- [WGL] Bugfix: Swap interval was ignored when DWM was enabled
|
- [WGL] Bugfix: Swap interval was ignored when DWM was enabled
|
||||||
- [GLX] Added dependency on `libdl` on systems where it provides `dlopen`
|
- [GLX] Added dependency on `libdl` on systems where it provides `dlopen`
|
||||||
|
@ -778,16 +778,22 @@ static void enterFullscreenMode(_GLFWwindow* window)
|
|||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_glfw.x11.NET_ACTIVE_WINDOW)
|
||||||
|
{
|
||||||
|
// Ask the window manager to raise and focus the GLFW window
|
||||||
|
// Only focused windows with the _NET_WM_STATE_FULLSCREEN state end up
|
||||||
|
// on top of all other windows ("Stacking order" in EWMH spec)
|
||||||
|
sendEventToWM(window, _glfw.x11.NET_ACTIVE_WINDOW, 1, 0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
XRaiseWindow(_glfw.x11.display, window->x11.handle);
|
||||||
|
XSetInputFocus(_glfw.x11.display, window->x11.handle,
|
||||||
|
RevertToParent, CurrentTime);
|
||||||
|
}
|
||||||
|
|
||||||
if (_glfw.x11.NET_WM_STATE && _glfw.x11.NET_WM_STATE_FULLSCREEN)
|
if (_glfw.x11.NET_WM_STATE && _glfw.x11.NET_WM_STATE_FULLSCREEN)
|
||||||
{
|
{
|
||||||
if (_glfw.x11.NET_ACTIVE_WINDOW)
|
|
||||||
{
|
|
||||||
// Ask the window manager to raise and focus the GLFW window
|
|
||||||
// Only focused windows with the _NET_WM_STATE_FULLSCREEN state end
|
|
||||||
// up on top of all other windows ("Stacking order" in EWMH spec)
|
|
||||||
sendEventToWM(window, _glfw.x11.NET_ACTIVE_WINDOW, 1, 0, 0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ask the window manager to make the GLFW window a full screen window
|
// Ask the window manager to make the GLFW window a full screen window
|
||||||
// Full screen windows are undecorated and, when focused, are kept
|
// Full screen windows are undecorated and, when focused, are kept
|
||||||
// on top of all other windows
|
// on top of all other windows
|
||||||
@ -807,9 +813,6 @@ static void enterFullscreenMode(_GLFWwindow* window)
|
|||||||
_glfwPlatformGetMonitorPos(window->monitor, &xpos, &ypos);
|
_glfwPlatformGetMonitorPos(window->monitor, &xpos, &ypos);
|
||||||
_glfwPlatformGetVideoMode(window->monitor, &mode);
|
_glfwPlatformGetVideoMode(window->monitor, &mode);
|
||||||
|
|
||||||
XRaiseWindow(_glfw.x11.display, window->x11.handle);
|
|
||||||
XSetInputFocus(_glfw.x11.display, window->x11.handle,
|
|
||||||
RevertToParent, CurrentTime);
|
|
||||||
XMoveWindow(_glfw.x11.display, window->x11.handle, xpos, ypos);
|
XMoveWindow(_glfw.x11.display, window->x11.handle, xpos, ypos);
|
||||||
XResizeWindow(_glfw.x11.display, window->x11.handle,
|
XResizeWindow(_glfw.x11.display, window->x11.handle,
|
||||||
mode.width, mode.height);
|
mode.width, mode.height);
|
||||||
|
Loading…
Reference in New Issue
Block a user