pidgin: 01aacfd2: Make gtkmedia.c compilable on systems wi...
nosnilmot at pidgin.im
nosnilmot at pidgin.im
Mon Jul 27 21:20:44 EDT 2009
-----------------------------------------------------------------
Revision: 01aacfd22ff67062c112876f31e2846de3db05c5
Ancestor: 1858011415a1cac17e46a156ce1d9d5e8243ee26
Author: nosnilmot at pidgin.im
Date: 2009-07-28T01:18:46
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/01aacfd22ff67062c112876f31e2846de3db05c5
Modified files:
pidgin/gtkmedia.c
ChangeLog:
Make gtkmedia.c compilable on systems without X11 (as long as they're Win32)
-------------- next part --------------
============================================================
--- pidgin/gtkmedia.c b95fccb6922ee9995300b2298a5d2c7ff5bd6df9
+++ pidgin/gtkmedia.c 853da35970f524a309a0b34732fb4cd2aa50b33e
@@ -38,6 +38,10 @@
#ifdef USE_VV
#include "media-gst.h"
+#ifdef _WIN32
+#include <gdk/gdkwin32.h>
+#endif
+
#include <gst/interfaces/xoverlay.h>
#define PIDGIN_TYPE_MEDIA (pidgin_media_get_type())
@@ -213,6 +217,7 @@ pidgin_media_delete_event_cb(GtkWidget *
return FALSE;
}
+#ifdef HAVE_X11
static int
pidgin_x_error_handler(Display *display, XErrorEvent *event)
{
@@ -246,6 +251,7 @@ pidgin_x_error_handler(Display *display,
error_type);
return 0;
}
+#endif
static void
menu_hangup(gpointer data, guint action, GtkWidget *item)
@@ -303,7 +309,9 @@ pidgin_media_init (PidginMedia *media)
GtkWidget *vbox;
media->priv = PIDGIN_MEDIA_GET_PRIVATE(media);
+#ifdef HAVE_X11
XSetErrorHandler(pidgin_x_error_handler);
+#endif
vbox = gtk_vbox_new(FALSE, 0);
gtk_container_add(GTK_CONTAINER(media), vbox);
@@ -450,10 +458,19 @@ realize_cb_cb(PidginMediaRealizeData *da
PidginMediaPrivate *priv = data->gtkmedia->priv;
gulong window_id;
+#ifdef _WIN32
if (data->participant == NULL)
+ window_id = GDK_WINDOW_HWND(priv->local_video->window);
+ else
+ window_id = GDK_WINDOW_HWND(priv->remote_video->window);
+#elif defined(HAVE_X11)
+ if (data->participant == NULL)
window_id = GDK_WINDOW_XWINDOW(priv->local_video->window);
else
window_id = GDK_WINDOW_XWINDOW(priv->remote_video->window);
+#else
+# error "Unsupported windowing system"
+#endif
purple_media_set_output_window(priv->media, data->session_id,
data->participant, window_id);
More information about the Commits
mailing list