mirror of https://github.com/encounter/SDL.git
Fix regression causing crashes when running without a window manager.
This commit is contained in:
parent
965a0da901
commit
e0771482f6
|
@ -525,20 +525,23 @@ X11_DispatchEvent(_THIS)
|
||||||
long border_bottom = 0;
|
long border_bottom = 0;
|
||||||
if (data->xwindow) {
|
if (data->xwindow) {
|
||||||
Atom _net_frame_extents = X11_XInternAtom(display, "_NET_FRAME_EXTENTS", 0);
|
Atom _net_frame_extents = X11_XInternAtom(display, "_NET_FRAME_EXTENTS", 0);
|
||||||
Atom type;
|
Atom type = None;
|
||||||
int format;
|
int format;
|
||||||
unsigned long nitems, bytes_after;
|
unsigned long nitems = 0, bytes_after;
|
||||||
unsigned char *property;
|
unsigned char *property;
|
||||||
X11_XGetWindowProperty(display, data->xwindow,
|
X11_XGetWindowProperty(display, data->xwindow,
|
||||||
_net_frame_extents, 0, 16, 0,
|
_net_frame_extents, 0, 16, 0,
|
||||||
XA_CARDINAL, &type, &format,
|
XA_CARDINAL, &type, &format,
|
||||||
&nitems, &bytes_after, &property);
|
&nitems, &bytes_after, &property);
|
||||||
|
|
||||||
|
if (type != None && nitems == 4)
|
||||||
|
{
|
||||||
border_left = ((long*)property)[0];
|
border_left = ((long*)property)[0];
|
||||||
border_right = ((long*)property)[1];
|
border_right = ((long*)property)[1];
|
||||||
border_top = ((long*)property)[2];
|
border_top = ((long*)property)[2];
|
||||||
border_bottom = ((long*)property)[3];
|
border_bottom = ((long*)property)[3];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (xevent.xconfigure.x != data->last_xconfigure.x ||
|
if (xevent.xconfigure.x != data->last_xconfigure.x ||
|
||||||
xevent.xconfigure.y != data->last_xconfigure.y) {
|
xevent.xconfigure.y != data->last_xconfigure.y) {
|
||||||
|
|
Loading…
Reference in New Issue