Fix bug #1430: inverted logic in X11 ConfigureNotify (resize) handling. SDL-1.2
authorOzkan Sezer <sezeroz@gmail.com>
Thu, 02 Aug 2018 10:47:28 +0300
branchSDL-1.2
changeset 1206620cbaf8965fb
parent 12064 788f2622621a
child 12076 3e05d58dc84f
Fix bug #1430: inverted logic in X11 ConfigureNotify (resize) handling.

Patch from Norihiro Kamae <norihiro@nagater.net>: Condition to be
ignored should be both width and height are same to the pending
size. If not, ie., width or height is different, the resize event
should be processed.
src/video/x11/SDL_x11events.c
     1.1 --- a/src/video/x11/SDL_x11events.c	Tue Jul 31 21:47:20 2018 +0300
     1.2 +++ b/src/video/x11/SDL_x11events.c	Thu Aug 02 10:47:28 2018 +0300
     1.3 @@ -849,8 +849,8 @@
     1.4  #endif
     1.5  		if ((X11_PendingConfigureNotifyWidth != -1) &&
     1.6  		    (X11_PendingConfigureNotifyHeight != -1)) {
     1.7 -		    if ((xevent.xconfigure.width != X11_PendingConfigureNotifyWidth) &&
     1.8 -			(xevent.xconfigure.height != X11_PendingConfigureNotifyHeight)) {
     1.9 +		    if ((xevent.xconfigure.width == X11_PendingConfigureNotifyWidth) &&
    1.10 +			(xevent.xconfigure.height == X11_PendingConfigureNotifyHeight)) {
    1.11  			    /* Event is from before the resize, so ignore. */
    1.12  			    break;
    1.13  		    }