Make sure we have XShape symbols before we allow a shaped window.
This commit is contained in:
parent
21dfc93ebd
commit
7ae528ef48
1 changed files with 12 additions and 8 deletions
|
@ -27,14 +27,18 @@
|
||||||
#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;
|
||||||
result->window = window;
|
if (SDL_X11_HAVE_XSHAPE) { /* Make sure X server supports it. */
|
||||||
result->alphacutoff = 0;
|
result = malloc(sizeof(SDL_WindowShaper));
|
||||||
result->usershownflag = 0;
|
result->window = window;
|
||||||
result->driverdata = malloc(sizeof(SDL_ShapeData));
|
result->alphacutoff = 0;
|
||||||
window->shaper = result;
|
result->usershownflag = 0;
|
||||||
int resized_properly = X11_ResizeWindowShape(window);
|
result->driverdata = malloc(sizeof(SDL_ShapeData));
|
||||||
assert(resized_properly == 0);
|
window->shaper = result;
|
||||||
|
int resized_properly = X11_ResizeWindowShape(window);
|
||||||
|
assert(resized_properly == 0);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue