diff --git a/src/video/x11/SDL_x11events.c b/src/video/x11/SDL_x11events.c index 9c3387f8b..514a98d7c 100644 --- a/src/video/x11/SDL_x11events.c +++ b/src/video/x11/SDL_x11events.c @@ -381,6 +381,7 @@ X11_DispatchEvent(_THIS) req->requestor, req->target); #endif + SDL_zero(sevent); sevent.xany.type = SelectionNotify; sevent.xselection.selection = req->selection; sevent.xselection.target = None; diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c index c417e6647..85b2a85b0 100644 --- a/src/video/x11/SDL_x11window.c +++ b/src/video/x11/SDL_x11window.c @@ -972,6 +972,7 @@ X11_SetWindowMaximized(_THIS, SDL_Window * window, SDL_bool maximized) if (X11_IsWindowMapped(_this, window)) { XEvent e; + SDL_zero(e); e.xany.type = ClientMessage; e.xclient.message_type = _NET_WM_STATE; e.xclient.format = 32;