openssl-1.1: add patches for CVE-2024-2511 and CVE-2024-4741
[oi-userland.git] / components / library / gtk+ / patches / 17-unregister-callback.patch
blob83ed659a1d18b235282bb1fe83ec384141e8ddd5
1 --- gtk+-2.24.33/modules/input/gtkimcontextxim.c.orig
2 +++ gtk+-2.24.33/modules/input/gtkimcontextxim.c
3 @@ -145,6 +145,8 @@
4 static void xim_info_display_closed (GdkDisplay *display,
5 gboolean is_error,
6 GtkXIMInfo *info);
7 +static void xim_instantiate_callback (Display *display, XPointer client_data,
8 + XPointer call_data);
10 static GObjectClass *parent_class;
12 @@ -391,6 +393,26 @@
13 if (info->display_closed_cb)
14 g_signal_handler_disconnect (display, info->display_closed_cb);
16 + if (info->reconnecting)
17 + {
18 + GdkDisplay *display;
20 + display = gdk_screen_get_display (info->screen);
21 + XUnregisterIMInstantiateCallback (GDK_DISPLAY_XDISPLAY (display),
22 + NULL, NULL, NULL,
23 + xim_instantiate_callback,
24 + (XPointer)info);
25 + }
26 + else if (info->im)
27 + {
28 + XIMCallback im_destroy_callback;
30 + im_destroy_callback.client_data = NULL;
31 + im_destroy_callback.callback = NULL;
32 + XSetIMValues (info->im,
33 + XNDestroyCallback, &im_destroy_callback,
34 + NULL);
35 + }
36 if (info->xim_styles)
37 XFree (info->xim_styles);
38 g_free (info->locale);