parent
72fe4617bb
commit
61c320b5e5
@ -0,0 +1,33 @@
|
|||||||
|
From 0717474feca8753bce7b8933bd10b3bab62a2f14 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Frediano Ziglio <freddy77@gmail.com>
|
||||||
|
Date: Sat, 12 Feb 2022 21:12:57 +0000
|
||||||
|
Subject: [PATCH] Do not process X11 events in vdagent_x11_create
|
||||||
|
|
||||||
|
Processing events requires some more initialisation between
|
||||||
|
VDAgentDisplay and vdagent_x11.
|
||||||
|
Postpone that after initialisation.
|
||||||
|
This fix a crash on Fedora 36, see
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=2042877.
|
||||||
|
|
||||||
|
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
|
||||||
|
---
|
||||||
|
src/vdagent/x11.c | 3 ---
|
||||||
|
1 file changed, 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/vdagent/x11.c b/src/vdagent/x11.c
|
||||||
|
index 05a41d7..4af4bdc 100644
|
||||||
|
--- a/src/vdagent/x11.c
|
||||||
|
+++ b/src/vdagent/x11.c
|
||||||
|
@@ -302,9 +302,6 @@ struct vdagent_x11 *vdagent_x11_create(UdscsConnection *vdagentd,
|
||||||
|
x11->height[i] = attrib.height;
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* Flush output buffers and consume any pending events */
|
||||||
|
- vdagent_x11_do_read(x11);
|
||||||
|
-
|
||||||
|
return x11;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.38.1
|
||||||
|
|
@ -0,0 +1,48 @@
|
|||||||
|
From bcbbea34d93d07d33b767f808ff3adf628b1ea0f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Victor Toso <victortoso@redhat.com>
|
||||||
|
Date: Fri, 13 Jan 2023 13:54:06 +0100
|
||||||
|
Subject: [PATCH] vdagent: Remove watch event on vdagent_display_destroy()
|
||||||
|
|
||||||
|
To avoid main loop calling it when GIOChannel for x11 was already
|
||||||
|
destroyed.
|
||||||
|
|
||||||
|
Related: https://bugzilla.redhat.com/show_bug.cgi?id=2145004
|
||||||
|
Signed-off-by: Victor Toso <victortoso@redhat.com>
|
||||||
|
---
|
||||||
|
src/vdagent/display.c | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/vdagent/display.c b/src/vdagent/display.c
|
||||||
|
index 790d9ad..602ab65 100644
|
||||||
|
--- a/src/vdagent/display.c
|
||||||
|
+++ b/src/vdagent/display.c
|
||||||
|
@@ -60,6 +60,7 @@ struct VDAgentDisplay {
|
||||||
|
UdscsConnection *vdagentd;
|
||||||
|
int debug;
|
||||||
|
GIOChannel *x11_channel;
|
||||||
|
+ guint io_watch_source_id;
|
||||||
|
VDAgentMutterDBus *mutter;
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -296,7 +297,8 @@ VDAgentDisplay* vdagent_display_create(UdscsConnection *vdagentd, int debug, int
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
- g_io_add_watch(display->x11_channel, G_IO_IN, x11_io_channel_cb, display);
|
||||||
|
+ display->io_watch_source_id =
|
||||||
|
+ g_io_add_watch(display->x11_channel, G_IO_IN, x11_io_channel_cb, display);
|
||||||
|
|
||||||
|
|
||||||
|
/* Since we are started at the same time as the wm,
|
||||||
|
@@ -323,7 +325,7 @@ void vdagent_display_destroy(VDAgentDisplay *display, int vdagentd_disconnected)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
-
|
||||||
|
+ g_source_remove(display->io_watch_source_id);
|
||||||
|
g_clear_pointer(&display->x11_channel, g_io_channel_unref);
|
||||||
|
vdagent_x11_destroy(display->x11, vdagentd_disconnected);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.39.0
|
||||||
|
|
Loading…
Reference in new issue