mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-30 08:51:03 +00:00
Protect usage of shape extension.
Should fix bug #34552. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@34016 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
85cc4d778c
commit
d98abdb5b9
6 changed files with 1099 additions and 1326 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2011-10-17 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* configure.ac: Test for X shape extension
|
||||||
|
* configure: Regenerate
|
||||||
|
* config.h.in: Regenerate
|
||||||
|
* Source/x11/XGServerWindow.m (-restrictWindow:toImage:),
|
||||||
|
* Source/x11/XWindowBuffer.m (-_exposeRect:): Protect usage of
|
||||||
|
shape extension.
|
||||||
|
Should fix bug #34552.
|
||||||
|
|
||||||
2011-10-13 Eric Wasylishen <ewasylishen@gmail.com>
|
2011-10-13 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
* Source/cairo/GNUmakefile:
|
* Source/cairo/GNUmakefile:
|
||||||
|
|
|
@ -60,7 +60,9 @@
|
||||||
#if HAVE_XCURSOR
|
#if HAVE_XCURSOR
|
||||||
#include <X11/Xcursor/Xcursor.h>
|
#include <X11/Xcursor/Xcursor.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_XSHAPE
|
||||||
#include <X11/extensions/shape.h>
|
#include <X11/extensions/shape.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "x11/XGDragView.h"
|
#include "x11/XGDragView.h"
|
||||||
#include "x11/XGInputServer.h"
|
#include "x11/XGInputServer.h"
|
||||||
|
@ -3076,6 +3078,7 @@ static BOOL didCreatePixmaps;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_XSHAPE
|
||||||
if ([[image backgroundColor] alphaComponent] * 256 <= ALPHA_THRESHOLD)
|
if ([[image backgroundColor] alphaComponent] * 256 <= ALPHA_THRESHOLD)
|
||||||
{
|
{
|
||||||
// The mask computed here is only correct for unscaled images.
|
// The mask computed here is only correct for unscaled images.
|
||||||
|
@ -3100,6 +3103,7 @@ static BOOL didCreatePixmaps;
|
||||||
{
|
{
|
||||||
XFreePixmap(dpy, pixmap);
|
XFreePixmap(dpy, pixmap);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This method is a fast implementation of move that only works
|
/* This method is a fast implementation of move that only works
|
||||||
|
|
|
@ -28,16 +28,15 @@
|
||||||
|
|
||||||
#include "x11/XGServer.h"
|
#include "x11/XGServer.h"
|
||||||
#include "x11/XGServerWindow.h"
|
#include "x11/XGServerWindow.h"
|
||||||
|
|
||||||
#include "x11/XWindowBuffer.h"
|
#include "x11/XWindowBuffer.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <sys/ipc.h>
|
#include <sys/ipc.h>
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_XSHAPE
|
||||||
#include <X11/extensions/shape.h>
|
#include <X11/extensions/shape.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static XWindowBuffer **window_buffers;
|
static XWindowBuffer **window_buffers;
|
||||||
static int num_window_buffers;
|
static int num_window_buffers;
|
||||||
|
@ -509,6 +508,7 @@ accuracy, we do the test using int: s.
|
||||||
if (use_shm)
|
if (use_shm)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#ifdef HAVE_XSHAPE
|
||||||
/* HACK: lets try to use shaped windows to get some use out of
|
/* HACK: lets try to use shaped windows to get some use out of
|
||||||
destination alpha */
|
destination alpha */
|
||||||
if (has_alpha && use_shape_hack)
|
if (has_alpha && use_shape_hack)
|
||||||
|
@ -585,6 +585,7 @@ static int warn = 0;
|
||||||
XFreePixmap(display, p);
|
XFreePixmap(display, p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif // HAVE_XSHAPE
|
||||||
|
|
||||||
if (pending_event)
|
if (pending_event)
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,6 +47,9 @@
|
||||||
/* Define to 1 if you have the `Xt' library (-lXt). */
|
/* Define to 1 if you have the `Xt' library (-lXt). */
|
||||||
#undef HAVE_LIBXT
|
#undef HAVE_LIBXT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `shape' extension. */
|
||||||
|
#undef HAVE_XSHAPE
|
||||||
|
|
||||||
/* Define to 1 if you have the <memory.h> header file. */
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
#undef HAVE_MEMORY_H
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
|
13
configure.ac
13
configure.ac
|
@ -166,6 +166,19 @@ if test $set_x_paths = yes; then
|
||||||
]
|
]
|
||||||
,)
|
,)
|
||||||
|
|
||||||
|
have_xshape=no
|
||||||
|
AC_CHECK_HEADERS(X11/extensions/shape.h,
|
||||||
|
have_xshape=yes,,
|
||||||
|
[#include <X11/Xlib.h>])
|
||||||
|
if test $have_xshape = yes; then
|
||||||
|
AC_CHECK_LIB(Xext, XShapeCombineMask,
|
||||||
|
[
|
||||||
|
LIBS="-lXext $LIBS"
|
||||||
|
AC_DEFINE(HAVE_XSHAPE, 1, [Define to enable Xshape support])
|
||||||
|
]
|
||||||
|
,)
|
||||||
|
fi
|
||||||
|
|
||||||
LIBS="$X_LIBS $LIBS"
|
LIBS="$X_LIBS $LIBS"
|
||||||
fi
|
fi
|
||||||
AC_SUBST(X_PRE_LIBS)
|
AC_SUBST(X_PRE_LIBS)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue