Zero any fields not explicitly filled in.

This commit is contained in:
Sam Lantinga
2010-07-14 07:25:07 -07:00
parent 6ad28bf626
commit 2d63dc10b4
2 changed files with 2 additions and 0 deletions

View File

@@ -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;

View File

@@ -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;