Skip to content

Commit

Permalink
Fix build for gtk-quartz.
Browse files Browse the repository at this point in the history
  • Loading branch information
chergert committed Aug 14, 2009
1 parent a3d862d commit 5d69bd0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
9 changes: 8 additions & 1 deletion configure.ac
Expand Up @@ -55,6 +55,9 @@ PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.12.0])
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)

GDK_BACKEND=`pkg-config --variable=target gtk+-2.0`
AM_CONDITIONAL(HAVE_X11, [test x"$GDK_BACKEND" = x"x11"])

AM_PATH_PYTHON([2.4], [
AC_PATH_PROG(PYTHON_CONFIG, python$PYTHON_VERSION-config)
if test x"$PYTHON_CONFIG" == x""; then
Expand All @@ -69,7 +72,11 @@ AM_PATH_PYTHON([2.4], [
fi
# Kind of a hacky way to get this, but that's alright..
PYTHON_SHARED_LIB="libpython${PYTHON_VERSION}.so"
if test x"$GDK_BACKEND" == x"quartz"; then
PYTHON_SHARED_LIB="libpython${PYTHON_VERSION}.dylib"
else
PYTHON_SHARED_LIB="libpython${PYTHON_VERSION}.so"
fi
AC_SUBST(PYTHON_SHARED_LIB)
PKG_CHECK_MODULES(PYGTK,
Expand Down
4 changes: 4 additions & 0 deletions src/Makefile.am
Expand Up @@ -36,3 +36,7 @@ INCLUDES = \
$(PYTHON_CFLAGS) \
$(PYGTK_CFLAGS) \
-DPYTHON_SHARED_LIB="\"$(PYTHON_SHARED_LIB)\""

if HAVE_X11
INCLUDES += -DHAVE_X11
endif
10 changes: 8 additions & 2 deletions src/widget-tree.c
Expand Up @@ -25,7 +25,9 @@
#include "widget-tree.h"

#include <string.h>
#if HAVE_X11
#include <gdk/gdkx.h>
#endif


enum
Expand Down Expand Up @@ -389,8 +391,12 @@ append_widget(GtkTreeStore *model,

if (widget->window)
{
window_info = g_strdup_printf("%p (XID 0x%x)", widget->window,
(int)GDK_WINDOW_XID(widget->window));
#if HAVE_X11
window_info = g_strdup_printf("%p (XID 0x%x)", widget->window,
(int)GDK_WINDOW_XID(widget->window));
#else
window_info = g_strdup("");
#endif
}
else
{
Expand Down

0 comments on commit 5d69bd0

Please sign in to comment.