Commit d1974514 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

configure.in added checks for X11 Shape Extension and build the shaped

2007-02-26  Sven Neumann  <sven@gimp.org>

	* configure.in
	* plug-ins/common/screenshot.c: added checks for X11 Shape
	Extension and build the shaped window feature conditionally.

svn path=/trunk/; revision=21993
parent cc6a517f
2007-02-26 Sven Neumann <sven@gimp.org>
* configure.in:
* plug-ins/common/screenshot.c: added checks for X11 Shape
Extension and build the shaped window feature conditionally.
2007-02-26 Sven Neumann <sven@gimp.org>
* app/core/gimp-transform-region.c: added more const qualifiers.
......@@ -905,13 +905,14 @@ if test "$gdk_target" = x11; then
dnl doc-shooter is X11 specific
DOC_SHOOTER=doc-shooter
gimp_save_CFLAGS="$CFLAGS"
gimp_save_LDFLAGS="$LDFLAGS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
dnl Test for Xmu
enable_gimp_remote=yes
if test -z "$LIBXMU"; then
gimp_save_CFLAGS="$CFLAGS"
gimp_save_LDFLAGS="$LDFLAGS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
AC_CHECK_LIB(Xmu, XmuClientWindow,
[AC_CHECK_HEADERS(X11/Xmu/WinUtil.h,
GIMP_REMOTE='gimp-remote-gimp_app_version$(EXEEXT)';
......@@ -920,10 +921,17 @@ if test "$gdk_target" = x11; then
LIBXMU="$X_LIBS $X_PRE_LIBS -lX11 -lXmu -lXt",
[enable_gimp_remote="no (XMU header file not found)"],[#include <gdk/gdkx.h>])],
[enable_gimp_remote="no (XMU library not found)"], -lXt -lX11)
CFLAGS="$gimp_save_CFLAGS"
LDFLAGS="$gimp_save_LDFLAGS"
LIBSCREENSHOT="$LIBXMU"
fi
dnl Check for shaped window extension
AC_CHECK_LIB(Xext, XShapeGetRectangles,
[AC_CHECK_HEADERS(X11/extensions/shape.h,
LIBSCREENSHOT="$LIBSCREENSHOT -lXext",,[#include <gdk/gdkx.h>])],,
-lX11 -lXext)
CFLAGS="$gimp_save_CFLAGS"
LDFLAGS="$gimp_save_LDFLAGS"
else
enable_gimp_remote="no (building for $gdk_target)"
fi
......
......@@ -36,7 +36,10 @@
#if defined(GDK_WINDOWING_X11)
#include <gdk/gdkx.h>
#ifdef HAVE_X11_EXTENSIONS_SHAPE_H
#include <X11/extensions/shape.h>
#endif /* HAVE_X11_EXTENSIONS_SHAPE_H */
#ifdef HAVE_X11_XMU_WINUTIL_H
#include <X11/Xmu/WinUtil.h>
......@@ -636,12 +639,13 @@ static GdkRegion *
window_get_shape (GdkScreen *screen,
GdkNativeWindow window)
{
GdkRegion *shape = NULL;
#if defined(GDK_WINDOWING_X11)
Display *x_dpy = GDK_SCREEN_XDISPLAY (screen);
XRectangle *rects;
gint rect_count;
gint rect_order;
GdkRegion *shape = NULL;
#if defined(GDK_WINDOWING_X11) && defined(HAVE_X11_EXTENSIONS_SHAPE_H)
Display *x_dpy = GDK_SCREEN_XDISPLAY (screen);
XRectangle *rects;
gint rect_count;
gint rect_order;
rects = XShapeGetRectangles (x_dpy, window, ShapeBounding,
&rect_count, &rect_order);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment