Commit 7ae528ef authored by Ryan C. Gordon's avatar Ryan C. Gordon

Make sure we have XShape symbols before we allow a shaped window.

parent 21dfc93e
...@@ -27,7 +27,9 @@ ...@@ -27,7 +27,9 @@
#include "SDL_x11video.h" #include "SDL_x11video.h"
SDL_WindowShaper* X11_CreateShaper(SDL_Window* window) { SDL_WindowShaper* X11_CreateShaper(SDL_Window* window) {
SDL_WindowShaper* result = malloc(sizeof(SDL_WindowShaper)); SDL_WindowShaper* result = NULL;
if (SDL_X11_HAVE_XSHAPE) { /* Make sure X server supports it. */
result = malloc(sizeof(SDL_WindowShaper));
result->window = window; result->window = window;
result->alphacutoff = 0; result->alphacutoff = 0;
result->usershownflag = 0; result->usershownflag = 0;
...@@ -35,6 +37,8 @@ SDL_WindowShaper* X11_CreateShaper(SDL_Window* window) { ...@@ -35,6 +37,8 @@ SDL_WindowShaper* X11_CreateShaper(SDL_Window* window) {
window->shaper = result; window->shaper = result;
int resized_properly = X11_ResizeWindowShape(window); int resized_properly = X11_ResizeWindowShape(window);
assert(resized_properly == 0); assert(resized_properly == 0);
}
return result; return result;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment