mirror of
https://github.com/glfw/glfw.git
synced 2024-11-11 04:53:50 +00:00
Fixed window position being incorrect on some WMs.
This commit is contained in:
parent
670070e61a
commit
a6a5fa937c
@ -122,6 +122,8 @@ See the [GLFW documentation](http://www.glfw.org/docs/latest/).
|
|||||||
of the actual resolution of the selected video mode
|
of the actual resolution of the selected video mode
|
||||||
- [X11] Bugfix: Screensaver override for full screen windows had a possible
|
- [X11] Bugfix: Screensaver override for full screen windows had a possible
|
||||||
race condition
|
race condition
|
||||||
|
- [X11] Bugfix: The reported window position did not account for the size of
|
||||||
|
the window frame on some WMs
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
@ -151,6 +153,7 @@ skills.
|
|||||||
|
|
||||||
- Bobyshev Alexander
|
- Bobyshev Alexander
|
||||||
- artblanc
|
- artblanc
|
||||||
|
- arturo
|
||||||
- Matt Arsenault
|
- Matt Arsenault
|
||||||
- Keith Bauer
|
- Keith Bauer
|
||||||
- John Bartholomew
|
- John Bartholomew
|
||||||
|
@ -985,6 +985,17 @@ void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)
|
|||||||
XTranslateCoordinates(_glfw.x11.display, window->x11.handle, _glfw.x11.root,
|
XTranslateCoordinates(_glfw.x11.display, window->x11.handle, _glfw.x11.root,
|
||||||
0, 0, &x, &y, &child);
|
0, 0, &x, &y, &child);
|
||||||
|
|
||||||
|
if (child != None)
|
||||||
|
{
|
||||||
|
int left, top;
|
||||||
|
|
||||||
|
XTranslateCoordinates(_glfw.x11.display, window->x11.handle, child,
|
||||||
|
0, 0, &left, &top, &child);
|
||||||
|
|
||||||
|
x -= left;
|
||||||
|
y -= top;
|
||||||
|
}
|
||||||
|
|
||||||
if (xpos)
|
if (xpos)
|
||||||
*xpos = x;
|
*xpos = x;
|
||||||
if (ypos)
|
if (ypos)
|
||||||
|
Loading…
Reference in New Issue
Block a user