Skip to content

Commit 604cc3f

Browse files
committed
Always enable photo shape source functionality
Remove unneeded includes, macros, and configure checks
1 parent 536d7a5 commit 604cc3f

4 files changed

Lines changed: 1 addition & 73 deletions

File tree

‎generic/shape.c‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,6 @@
1111

1212
#include "shapeInt.h"
1313

14-
#ifdef __WIN32__
15-
#define SUPPORTS_PHOTO_REGION
16-
#else
17-
#if (SHAPE_PHOTO == 1)
18-
#define SUPPORTS_PHOTO_REGION
19-
#endif
20-
#endif
21-
22-
#ifdef SUPPORTS_PHOTO_REGION
23-
#include <tkInt.h>
24-
#endif
2514
#include <X11/Xutil.h>
2615

2716
#define min(x,y) ((x)<(y) ? (x) : (y))
@@ -55,12 +44,9 @@ static int shapeText(Tk_Window tkwin, Tcl_Interp *interp,
5544
static int shapeWindow(Tk_Window tkwin, Tcl_Interp *interp,
5645
int x, int y, int op, int kind, int objc,
5746
Tcl_Obj *const objv[]);
58-
#ifdef SUPPORTS_PHOTO_REGION
5947
static int shapePhoto(Tk_Window tkwin, Tcl_Interp *interp,
6048
int x, int y, int op, int kind, int objc,
6149
Tcl_Obj *const objv[]);
62-
#endif
63-
6450
static int shapeCmd(ClientData clientData, Tcl_Interp *interp,
6551
int objc, Tcl_Obj *const objv[]);
6652

@@ -379,7 +365,6 @@ shapeWindow(
379365
return Shape_CombineWindow(interp, tkwin, kind, op, x, y, srcwin);
380366
}
381367

382-
#ifdef SUPPORTS_PHOTO_REGION
383368
static int
384369
shapePhoto(
385370
Tk_Window tkwin,
@@ -469,7 +454,6 @@ shapePhoto(
469454
Tk_FreePixmap(dpy, maskDrawable);
470455
return result;
471456
}
472-
#endif
473457

474458
static int
475459
shapeSetUpdateOps(
@@ -486,25 +470,19 @@ shapeSetUpdateOps(
486470
"-offset",
487471
"-bounding", "-clip", "-both",
488472
"bitmap", "rectangles", "reset", "text", "window",
489-
#ifdef SUPPORTS_PHOTO_REGION
490473
"photo",
491-
#endif
492474
NULL
493475
};
494476
static enum optkind optk[] = {
495477
offsetargs,
496478
shapekind, shapekind, shapekind,
497479
sourceargs, sourceargs, sourceargs, sourceargs, sourceargs
498-
#ifdef SUPPORTS_PHOTO_REGION
499480
, sourceargs
500-
#endif
501481
};
502482
static shapeApplicator applicators[] = {
503483
NULL, NULL, NULL, NULL,
504484
shapeBitmap, shapeRects, shapeReset, shapeText, shapeWindow,
505-
#ifdef SUPPORTS_PHOTO_REGION
506485
shapePhoto,
507-
#endif
508486
NULL
509487
};
510488

‎unix/Makefile.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ GENERIC_DIR = $(TOP_DIR)/generic
5050
UNIX_DIR = $(TOP_DIR)/unix
5151
INCLUDE_DIR = $(TOP_DIR)/include
5252
# ----------------------------------------------------------------------
53-
CFLAGS = -g -DSHAPE_PHOTO=@SHAPE_PHOTO@
53+
CFLAGS = -g
5454
CC_SWITCHES = $(CFLAGS) ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
5555
-I${INCLUDE_DIR} -I${GENERIC_DIR} -I${UNIX_DIR} \
5656
-I${TK_INCLUDE_DIR} ${TK_XINCLUDES} -I${TCL_INCLUDE_DIR} \

‎unix/configure‎

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -492,52 +492,6 @@ else
492492
fi
493493

494494

495-
echo $ac_n "checking for TkPhotoGetValidRegion""... $ac_c" 1>&6
496-
if eval "test \"`echo '$''{'ac_cv_func_TkPhotoGetValidRegion'+set}'`\" = set"; then
497-
echo $ac_n "(cached) $ac_c" 1>&6
498-
else
499-
cat > conftest.$ac_ext <<EOF
500-
#line 501 "configure"
501-
#include "confdefs.h"
502-
/* System header to define __stub macros and hopefully few prototypes,
503-
which can conflict with char TkPhotoGetValidRegion(); below. */
504-
#include <assert.h>
505-
/* Override any gcc2 internal prototype to avoid an error. */
506-
char TkPhotoGetValidRegion();
507-
508-
int main() { return 0; }
509-
int t() {
510-
511-
/* The GNU C library defines this for functions which it implements
512-
to always fail with ENOSYS. Some functions are actually named
513-
something starting with __ and the normal name is an alias. */
514-
#if defined (__stub_TkPhotoGetValidRegion) || defined (__stub___TkPhotoGetValidRegion)
515-
choke me
516-
#else
517-
TkPhotoGetValidRegion();
518-
#endif
519-
520-
; return 0; }
521-
EOF
522-
if eval $ac_link; then
523-
rm -rf conftest*
524-
eval "ac_cv_func_TkPhotoGetValidRegion=yes"
525-
else
526-
rm -rf conftest*
527-
eval "ac_cv_func_TkPhotoGetValidRegion=no"
528-
fi
529-
rm -f conftest*
530-
531-
fi
532-
if eval "test \"`echo '$ac_cv_func_'TkPhotoGetValidRegion`\" = yes"; then
533-
echo "$ac_t""yes" 1>&6
534-
SHAPE_PHOTO=1
535-
else
536-
echo "$ac_t""no" 1>&6
537-
SHAPE_PHOTO=0
538-
fi
539-
540-
541495

542496
if test $TCL_SHARED_BUILD -eq 1; then
543497
PRIMARY_TARGET='$(SOFILE)'
@@ -679,7 +633,6 @@ s%@LIBS@%$LIBS%g
679633
s%@exec_prefix@%$exec_prefix%g
680634
s%@prefix@%$prefix%g
681635
s%@program_transform_name@%$program_transform_name%g
682-
s%@SHAPE_PHOTO@%$SHAPE_PHOTO%g
683636
s%@CC@%$CC%g
684637
s%@PRIMARY_TARGET@%$PRIMARY_TARGET%g
685638
s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g

‎unix/configure.in‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ TCL_BIN_DIR=$TK_EXEC_PREFIX/bin
6565

6666
AC_CHECK_LIB(Xext, XShapeQueryVersion, :, AC_MSG_ERROR(X extension library not available), $TK_XLIBSW)
6767

68-
AC_CHECK_FUNC(TkPhotoGetValidRegion, SHAPE_PHOTO=1, SHAPE_PHOTO=0)
69-
AC_SUBST(SHAPE_PHOTO)
70-
7168
if test $TCL_SHARED_BUILD -eq 1; then
7269
PRIMARY_TARGET='$(SOFILE)'
7370
else

0 commit comments

Comments
 (0)