Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Added XFlush() so changes happen immediately instead of waiting for t…
Browse files Browse the repository at this point in the history
…he next event loop.
  • Loading branch information
slouken committed Jan 19, 2011
1 parent 601abbf commit 4f663bc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/video/x11/SDL_x11window.c
Expand Up @@ -746,6 +746,8 @@ X11_CreateWindow(_THIS, SDL_Window * window)
}
#endif

XFlush(display);

return 0;
}

Expand Down Expand Up @@ -858,6 +860,7 @@ X11_SetWindowTitle(_THIS, SDL_Window * window)
}
#endif
}
XFlush(display);
}

void
Expand Down Expand Up @@ -906,6 +909,7 @@ X11_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
} else {
XDeleteProperty(display, data->xwindow, _NET_WM_ICON);
}
XFlush(display);
}

void
Expand Down Expand Up @@ -934,6 +938,7 @@ X11_SetWindowPosition(_THIS, SDL_Window * window)
y = window->y;
}
XMoveWindow(display, data->xwindow, x, y);
XFlush(display);
}

void
Expand All @@ -945,6 +950,7 @@ X11_SetWindowSize(_THIS, SDL_Window * window)
if (SDL_IsShapedWindow(window))
X11_ResizeWindowShape(window);
XResizeWindow(display, data->xwindow, window->w, window->h);
XFlush(display);
}

void
Expand All @@ -954,6 +960,7 @@ X11_ShowWindow(_THIS, SDL_Window * window)
Display *display = data->videodata->display;

XMapRaised(display, data->xwindow);
XFlush(display);
}

void
Expand All @@ -963,6 +970,7 @@ X11_HideWindow(_THIS, SDL_Window * window)
Display *display = data->videodata->display;

XUnmapWindow(display, data->xwindow);
XFlush(display);
}

void
Expand All @@ -972,6 +980,7 @@ X11_RaiseWindow(_THIS, SDL_Window * window)
Display *display = data->videodata->display;

XRaiseWindow(display, data->xwindow);
XFlush(display);
}

static void
Expand Down Expand Up @@ -1020,6 +1029,7 @@ X11_SetWindowMaximized(_THIS, SDL_Window * window, SDL_bool maximized)
XDeleteProperty(display, data->xwindow, _NET_WM_STATE);
}
}
XFlush(display);
}

void
Expand All @@ -1037,6 +1047,7 @@ X11_MinimizeWindow(_THIS, SDL_Window * window)
Display *display = data->videodata->display;

XIconifyWindow(display, data->xwindow, displaydata->screen);
XFlush(display);
}

void
Expand Down Expand Up @@ -1111,6 +1122,7 @@ X11_DestroyWindow(_THIS, SDL_Window * window)
#endif
if (data->created) {
XDestroyWindow(display, data->xwindow);
XFlush(display);
}
SDL_free(data);
}
Expand Down

0 comments on commit 4f663bc

Please sign in to comment.