Skip to content

Commit

Permalink
X11: Fix parent window handle initialization
Browse files Browse the repository at this point in the history
This should have been initialized to the screen root, not None.  This
issue was introduced by fe57e3c.

Fixes glfw#1620.
  • Loading branch information
elmindreda committed Jan 14, 2020
1 parent aa5e313 commit 9372ba9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/x11_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ static GLFWbool createNativeWindow(_GLFWwindow* window,

_glfwGrabErrorHandlerX11();

window->x11.parent = _glfw.x11.root;
window->x11.handle = XCreateWindow(_glfw.x11.display,
_glfw.x11.root,
0, 0, // Position
Expand Down Expand Up @@ -1258,12 +1259,6 @@ static void processEvent(XEvent *event)

switch (event->type)
{
case CreateNotify:
{
window->x11.parent = event->xcreatewindow.parent;
return;
}

case ReparentNotify:
{
window->x11.parent = event->xreparent.parent;
Expand Down

0 comments on commit 9372ba9

Please sign in to comment.