Fri, 11 Mar 2022 01:43:20 -0600
Remove X specifics from Pidgin
Testing Done:
Compiled only
Reviewed at https://reviews.imfreedom.org/r/1325/
| pidgin/gtkconv.c | file | annotate | diff | comparison | revisions | |
| pidgin/gtkmedia.c | file | annotate | diff | comparison | revisions |
--- a/pidgin/gtkconv.c Fri Mar 11 01:27:50 2022 -0600 +++ b/pidgin/gtkconv.c Fri Mar 11 01:43:20 2022 -0600 @@ -31,10 +31,6 @@ #define BUF_LONG (4096) -#ifdef HAVE_X11 -# include <X11/Xlib.h> -#endif - #include <gdk/gdkkeysyms.h> #include <talkatu.h>
--- a/pidgin/gtkmedia.c Fri Mar 11 01:27:50 2022 -0600 +++ b/pidgin/gtkmedia.c Fri Mar 11 01:43:20 2022 -0600 @@ -222,42 +222,6 @@ return FALSE; } -#ifdef HAVE_X11 -static int -pidgin_x_error_handler(Display *display, XErrorEvent *event) -{ - const gchar *error_type; - switch (event->error_code) { -#define XERRORCASE(type) case type: error_type = #type; break - XERRORCASE(BadAccess); - XERRORCASE(BadAlloc); - XERRORCASE(BadAtom); - XERRORCASE(BadColor); - XERRORCASE(BadCursor); - XERRORCASE(BadDrawable); - XERRORCASE(BadFont); - XERRORCASE(BadGC); - XERRORCASE(BadIDChoice); - XERRORCASE(BadImplementation); - XERRORCASE(BadLength); - XERRORCASE(BadMatch); - XERRORCASE(BadName); - XERRORCASE(BadPixmap); - XERRORCASE(BadRequest); - XERRORCASE(BadValue); - XERRORCASE(BadWindow); -#undef XERRORCASE - default: - error_type = "unknown"; - break; - } - purple_debug_error("media", "A %s Xlib error has occurred. " - "The program would normally crash now.\n", - error_type); - return 0; -} -#endif - static const GActionEntry media_action_entries[] = { { "Hangup", pidgin_media_hangup_activate_cb }, { "Hold", NULL, NULL, "false", pidgin_media_hold_change_state_cb }, @@ -310,10 +274,6 @@ GtkWidget *vbox; media->priv = pidgin_media_get_instance_private(media); -#ifdef HAVE_X11 - XSetErrorHandler(pidgin_x_error_handler); -#endif - g_action_map_add_action_entries(G_ACTION_MAP(media), media_action_entries, G_N_ELEMENTS(media_action_entries), media);