x11: Always initialize all fields of XEvents sent via XSendEvent
The X server ignores the send_event and serial in incoming XEvents, so they were not initialized when calling XSendEvent in a few places. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2641 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2964>
This commit is contained in:
parent
6b57ab8975
commit
dddaf19d07
@ -157,7 +157,7 @@ on_frame_close_request (GtkWindow *window,
|
|||||||
{
|
{
|
||||||
GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (window));
|
GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (window));
|
||||||
GtkWidget *content;
|
GtkWidget *content;
|
||||||
XClientMessageEvent ev;
|
XClientMessageEvent ev = { 0 };
|
||||||
Window client_xwindow;
|
Window client_xwindow;
|
||||||
Atom delete_window_atom;
|
Atom delete_window_atom;
|
||||||
|
|
||||||
|
@ -1129,7 +1129,7 @@ static void
|
|||||||
process_selection_request (MetaX11Display *x11_display,
|
process_selection_request (MetaX11Display *x11_display,
|
||||||
XEvent *event)
|
XEvent *event)
|
||||||
{
|
{
|
||||||
XSelectionEvent reply;
|
XSelectionEvent reply = { 0 };
|
||||||
|
|
||||||
if (x11_display->wm_sn_selection_window != event->xselectionrequest.owner ||
|
if (x11_display->wm_sn_selection_window != event->xselectionrequest.owner ||
|
||||||
x11_display->wm_sn_atom != event->xselectionrequest.selection)
|
x11_display->wm_sn_atom != event->xselectionrequest.selection)
|
||||||
|
@ -222,7 +222,7 @@ meta_sync_counter_send_request (MetaSyncCounter *sync_counter)
|
|||||||
{
|
{
|
||||||
MetaWindow *window = sync_counter->window;
|
MetaWindow *window = sync_counter->window;
|
||||||
MetaX11Display *x11_display = window->display->x11_display;
|
MetaX11Display *x11_display = window->display->x11_display;
|
||||||
XClientMessageEvent ev;
|
XClientMessageEvent ev = { 0, };
|
||||||
gint64 wait_serial;
|
gint64 wait_serial;
|
||||||
|
|
||||||
if (sync_counter->sync_request_counter == None ||
|
if (sync_counter->sync_request_counter == None ||
|
||||||
|
@ -126,7 +126,7 @@ send_icccm_message (MetaWindow *window,
|
|||||||
* data[1] time stamp
|
* data[1] time stamp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
XClientMessageEvent ev;
|
XClientMessageEvent ev = { 0 };
|
||||||
MetaX11Display *x11_display = window->display->x11_display;
|
MetaX11Display *x11_display = window->display->x11_display;
|
||||||
|
|
||||||
ev.type = ClientMessage;
|
ev.type = ClientMessage;
|
||||||
@ -235,7 +235,7 @@ send_configure_notify (MetaWindow *window)
|
|||||||
MetaX11Display *x11_display = window->display->x11_display;
|
MetaX11Display *x11_display = window->display->x11_display;
|
||||||
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
|
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
|
||||||
MetaWindowX11Private *priv = meta_window_x11_get_instance_private (window_x11);
|
MetaWindowX11Private *priv = meta_window_x11_get_instance_private (window_x11);
|
||||||
XEvent event;
|
XEvent event = { 0 };
|
||||||
|
|
||||||
g_assert (!window->override_redirect);
|
g_assert (!window->override_redirect);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user