x11: send move/resize events when waiting on fullscreen change.
Otherwise we ignore the Configure/etc events when they come in because the window is already in an identical state as far as SDL is concerned. Fixes #5593. May also fix: Issue #5572. Issue #5595.main
parent
b798e49c92
commit
9edd411a83
|
@ -27,6 +27,7 @@
|
||||||
#include "../SDL_pixels_c.h"
|
#include "../SDL_pixels_c.h"
|
||||||
#include "../../events/SDL_keyboard_c.h"
|
#include "../../events/SDL_keyboard_c.h"
|
||||||
#include "../../events/SDL_mouse_c.h"
|
#include "../../events/SDL_mouse_c.h"
|
||||||
|
#include "../../events/SDL_events_c.h"
|
||||||
|
|
||||||
#include "SDL_x11video.h"
|
#include "SDL_x11video.h"
|
||||||
#include "SDL_x11mouse.h"
|
#include "SDL_x11mouse.h"
|
||||||
|
@ -1385,12 +1386,19 @@ X11_SetWindowFullscreenViaWM(_THIS, SDL_Window * window, SDL_VideoDisplay * _dis
|
||||||
attrs.x, attrs.y, &x, &y, &childReturn);
|
attrs.x, attrs.y, &x, &y, &childReturn);
|
||||||
|
|
||||||
if (!caught_x11_error) {
|
if (!caught_x11_error) {
|
||||||
if ((x != orig_x) || (y != orig_y) || (attrs.width != orig_w) || (attrs.height != orig_h)) {
|
SDL_bool window_changed = SDL_FALSE;
|
||||||
window->x = x;
|
if ((x != orig_x) || (y != orig_y)) {
|
||||||
window->y = y;
|
SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_MOVED, x, y);
|
||||||
window->w = attrs.width;
|
window_changed = SDL_TRUE;
|
||||||
window->h = attrs.height;
|
}
|
||||||
break; /* window moved, time to go. */
|
|
||||||
|
if ((attrs.width != orig_w) || (attrs.height != orig_h)) {
|
||||||
|
SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_RESIZED, attrs.width, attrs.height);
|
||||||
|
window_changed = SDL_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window_changed) {
|
||||||
|
break; /* window changed, time to go. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue