Skip to content

Commit

Permalink
Fix bug #1430: inverted logic in X11 ConfigureNotify (resize) handling.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sezero committed Aug 2, 2018
1 parent 59ec36b commit f10b27c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/video/x11/SDL_x11events.c
Expand Up @@ -849,8 +849,8 @@ printf("ConfigureNotify! (resize: %dx%d)\n", xevent.xconfigure.width, xevent.xco
#endif
if ((X11_PendingConfigureNotifyWidth != -1) &&
(X11_PendingConfigureNotifyHeight != -1)) {
if ((xevent.xconfigure.width != X11_PendingConfigureNotifyWidth) &&
(xevent.xconfigure.height != X11_PendingConfigureNotifyHeight)) {
if ((xevent.xconfigure.width == X11_PendingConfigureNotifyWidth) &&
(xevent.xconfigure.height == X11_PendingConfigureNotifyHeight)) {
/* Event is from before the resize, so ignore. */
break;
}
Expand Down

0 comments on commit f10b27c

Please sign in to comment.