Update xeyes to 1.2.0

This commit is contained in:
matthieu
2021-08-29 17:50:32 +00:00
parent d691d86121
commit d0fc556e06
15 changed files with 773 additions and 190 deletions

View File

@@ -1,3 +1,92 @@
commit adde23dc8724dc6f793b0c68143dc34818f7f6f4
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Aug 1 16:41:00 2021 -0700
xeyes 1.2.0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 09e50de77da82430cbada93cf58544af2441fd83
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Aug 1 16:38:48 2021 -0700
Remove redundant declaration of hypot() for SVR4 systems
Fixes gcc warning:
Eyes.c:54:15: warning: redundant redeclaration of hypot [-Wredundant-decls]
extern double hypot(double, double);
^~~~~
since it's already declared in <math.h>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 7517441ffa1aecb6f565217149762267d145e11e
Author: Keith Packard <keithp@keithp.com>
Date: Mon Mar 23 08:55:53 2020 -0700
Clean up compiler warnings
Add (char *) casts to initializers in Xt structs.
Remove unused variables.
Signed-off-by: Keith Packard <keithp@keithp.com>
commit 420c2d8517246c9e422739cadb7acb29e35a3bed
Author: Keith Packard <keithp@keithp.com>
Date: Wed Aug 7 12:17:24 2013 +0200
Use XI2 raw events to notice when mouse moves [v2]
v2:
We only need Xi version 2.0, not 2.2
Suggested-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
commit 3f2af30bd94ea3012bc1d1bde82f7c9a1c4dea27
Author: Keith Packard <keithp@keithp.com>
Date: Fri Jul 26 18:46:45 2013 -0700
Add support for the 'Present' extension. [v3]
This makes updating the eyes nicely vblank synchronized.
v2:
Ensure extensions exist before calling query_version
These calls add calls to xcb_get_extension_data before calling
query_version calls, as those calls will mark the connection
with an error if made against an X server without the
extension present.
Suggested-by: Uli Schlachter <psychon@znc.in>
v3:
check the 'present' field in the return from
xcb_get_extension_data; the xcb_get_extension_data call will
always succeed (save for out of memory), the only way to tell
if the extension is supported in the target X server is to
test the 'present' field in the query extension reply value.
Signed-off-by: Keith Packard <keithp@keithp.com>
commit 46dac260d384e034aaabd576d9b818d39f4821c6
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Nov 21 17:02:46 2018 -0800
Update configure.ac bug URL for gitlab migration
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 7922b89288d463a29f742fbb48ab38b3ec485dff
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Nov 16 21:56:11 2018 -0800
Update README for gitlab migration
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit abb6802af0d82c196fd94b8dc94549ba64754cb5
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Mar 9 17:24:55 2018 -0800
@@ -508,7 +597,7 @@ Date: Wed Jul 20 19:31:53 2005 +0000
configure cache, you cache it, and the cached value is probably wrong.
commit c903caebf875d510cbd1f720ccc02bd03250d7c6
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
Date: Fri Jul 1 18:07:18 2005 +0000
Xeyes build system

View File

@@ -48,36 +48,40 @@ from the X Consortium.
# include <X11/extensions/shape.h>
# include <X11/Xlibint.h>
# include <stdlib.h>
#if (defined(SVR4) || defined(SYSV) && defined(i386))
extern double hypot(double, double);
#endif
# include <X11/extensions/XInput2.h>
#define offset(field) XtOffsetOf(EyesRec, eyes.field)
#define goffset(field) XtOffsetOf(WidgetRec, core.field)
static XtResource resources[] = {
{XtNwidth, XtCWidth, XtRDimension, sizeof(Dimension),
{(char *) XtNwidth, (char *) XtCWidth, XtRDimension, sizeof(Dimension),
goffset(width), XtRImmediate, (XtPointer) 150},
{XtNheight, XtCHeight, XtRDimension, sizeof(Dimension),
{(char *) XtNheight, (char *) XtCHeight, XtRDimension, sizeof(Dimension),
goffset(height), XtRImmediate, (XtPointer) 100},
{XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
offset(pixel[PART_PUPIL]), XtRString, XtDefaultForeground},
{XtNoutline, XtCForeground, XtRPixel, sizeof(Pixel),
offset(pixel[PART_OUTLINE]), XtRString, XtDefaultForeground},
{XtNcenterColor, XtCBackground, XtRPixel, sizeof (Pixel),
offset(pixel[PART_CENTER]), XtRString, XtDefaultBackground},
{XtNreverseVideo, XtCReverseVideo, XtRBoolean, sizeof (Boolean),
{(char *) XtNforeground, (char *) XtCForeground, XtRPixel, sizeof(Pixel),
offset(pixel[PART_PUPIL]), XtRString, (char *) XtDefaultForeground},
{(char *) XtNbackgroundPixmap, (char *) XtCPixmap, XtRPixmap, sizeof(Pixmap),
XtOffsetOf(CoreRec,core.background_pixmap),
XtRImmediate, (XtPointer)None},
{(char *) XtNoutline, (char *) XtCForeground, XtRPixel, sizeof(Pixel),
offset(pixel[PART_OUTLINE]), XtRString, (char *) XtDefaultForeground},
{(char *) XtNcenterColor, (char *) XtCBackground, XtRPixel, sizeof (Pixel),
offset(pixel[PART_CENTER]), XtRString, (char *) XtDefaultBackground},
{(char *) XtNreverseVideo, (char *) XtCReverseVideo, XtRBoolean, sizeof (Boolean),
offset (reverse_video), XtRImmediate, (XtPointer) FALSE},
{XtNbackingStore, XtCBackingStore, XtRBackingStore, sizeof (int),
offset (backing_store), XtRString, "default"},
{XtNshapeWindow, XtCShapeWindow, XtRBoolean, sizeof (Boolean),
{(char *) XtNbackingStore, (char *) XtCBackingStore, (char *) XtRBackingStore, sizeof (int),
offset (backing_store), XtRString, (char *) "default"},
{(char *) XtNshapeWindow, (char *) XtCShapeWindow, XtRBoolean, sizeof (Boolean),
offset (shape_window), XtRImmediate, (XtPointer) TRUE},
#ifdef XRENDER
{XtNrender, XtCBoolean, XtRBoolean, sizeof(Boolean),
{(char *) XtNrender, (char *) XtCBoolean, XtRBoolean, sizeof(Boolean),
offset(render), XtRImmediate, (XtPointer) TRUE },
#endif
{XtNdistance, XtCBoolean, XtRBoolean, sizeof(Boolean),
#ifdef PRESENT
{(char *) XtNpresent, (char *) XtCBoolean, XtRBoolean, sizeof(Boolean),
offset(present), XtRImmediate, (XtPointer) TRUE },
#endif
{(char *) XtNdistance, (char *) XtCBoolean, XtRBoolean, sizeof(Boolean),
offset(distance), XtRImmediate, (XtPointer) FALSE },
};
@@ -113,6 +117,218 @@ static void ClassInitialize(void)
WidgetClass eyesWidgetClass = (WidgetClass) &eyesClassRec;
#ifdef PRESENT
static void CheckPresent(EyesWidget w) {
const xcb_query_extension_reply_t *xfixes_ext_reply;
const xcb_query_extension_reply_t *damage_ext_reply;
const xcb_query_extension_reply_t *present_ext_reply;
xcb_xfixes_query_version_cookie_t xfixes_cookie;
xcb_xfixes_query_version_reply_t *xfixes_reply;
xcb_damage_query_version_cookie_t damage_cookie;
xcb_damage_query_version_reply_t *damage_reply;
xcb_present_query_version_cookie_t present_cookie;
xcb_present_query_version_reply_t *present_reply;
if (!w->eyes.present)
return;
xcb_prefetch_extension_data(xt_xcb(w), &xcb_xfixes_id);
xcb_prefetch_extension_data(xt_xcb(w), &xcb_damage_id);
xcb_prefetch_extension_data(xt_xcb(w), &xcb_present_id);
xfixes_ext_reply = xcb_get_extension_data(xt_xcb(w), &xcb_xfixes_id);
damage_ext_reply = xcb_get_extension_data(xt_xcb(w), &xcb_damage_id);
present_ext_reply = xcb_get_extension_data(xt_xcb(w), &xcb_present_id);
if (xfixes_ext_reply == NULL || !xfixes_ext_reply->present
|| damage_ext_reply == NULL || !damage_ext_reply->present
|| present_ext_reply == NULL || !present_ext_reply->present)
{
w->eyes.present = FALSE;
}
if (!w->eyes.present)
return;
/* Now tell the server which versions of the extensions we support */
xfixes_cookie = xcb_xfixes_query_version(xt_xcb(w),
XCB_XFIXES_MAJOR_VERSION,
XCB_XFIXES_MINOR_VERSION);
damage_cookie = xcb_damage_query_version(xt_xcb(w),
XCB_DAMAGE_MAJOR_VERSION,
XCB_DAMAGE_MINOR_VERSION);
present_cookie = xcb_present_query_version(xt_xcb(w),
XCB_PRESENT_MAJOR_VERSION,
XCB_PRESENT_MINOR_VERSION);
xfixes_reply = xcb_xfixes_query_version_reply(xt_xcb(w),
xfixes_cookie,
NULL);
free(xfixes_reply);
damage_reply = xcb_damage_query_version_reply(xt_xcb(w),
damage_cookie,
NULL);
free(damage_reply);
present_reply = xcb_present_query_version_reply(xt_xcb(w),
present_cookie,
NULL);
free(present_reply);
}
static void MakePresentData(EyesWidget w) {
if (!w->eyes.present)
return;
if (!w->eyes.back_buffer) {
xcb_create_pixmap(xt_xcb(w),
w->core.depth,
w->eyes.back_buffer = xcb_generate_id(xt_xcb(w)),
XtWindow(w),
w->core.width,
w->core.height);
}
if (!w->eyes.back_damage) {
xcb_damage_create(xt_xcb(w),
w->eyes.back_damage = xcb_generate_id(xt_xcb(w)),
w->eyes.back_buffer,
XCB_DAMAGE_REPORT_LEVEL_NON_EMPTY);
xcb_xfixes_create_region(xt_xcb(w),
w->eyes.back_region = xcb_generate_id(xt_xcb(w)),
0, NULL);
}
}
static void UpdatePresent(EyesWidget w) {
if (w->eyes.back_buffer) {
xcb_damage_subtract(xt_xcb(w),
w->eyes.back_damage,
None,
w->eyes.back_region);
xcb_present_pixmap(xt_xcb(w),
XtWindow(w),
w->eyes.back_buffer,
0,
None,
w->eyes.back_region,
0, 0,
None,
None,
None,
0,
0, 1, 0,
0, NULL);
}
}
#endif
#ifdef PRESENT
#define EyesDrawable(w) (w->eyes.back_buffer ? w->eyes.back_buffer : XtWindow(w))
#else
#define EyesDrawable(w) XtWindow(w)
#endif
static void draw_it_core(EyesWidget w);
static void EyesGeneric(Widget w, XtPointer closure, XEvent *event, Boolean *continue_to_dispatch)
{
draw_it_core((EyesWidget) w);
}
struct root_listen_list {
struct root_listen_list *next;
Widget widget;
};
static struct root_listen_list *root_listen_list;
static Boolean xi2_dispatcher(XEvent *event) {
struct root_listen_list *rll;
Boolean was_dispatched = False;
for (rll = root_listen_list; rll; rll = rll->next) {
if (XtDisplay(rll->widget) == event->xany.display) {
XtDispatchEventToWidget(rll->widget, event);
was_dispatched = True;
}
}
return was_dispatched;
}
static void select_xi2_events(Widget w)
{
XIEventMask evmasks[1];
unsigned char mask1[(XI_LASTEVENT + 7)/8];
memset(mask1, 0, sizeof(mask1));
/* select for button and key events from all master devices */
XISetMask(mask1, XI_RawMotion);
evmasks[0].deviceid = XIAllMasterDevices;
evmasks[0].mask_len = sizeof(mask1);
evmasks[0].mask = mask1;
XISelectEvents(XtDisplay(w),
RootWindowOfScreen(XtScreen(w)),
evmasks, 1);
XtSetEventDispatcher(XtDisplay(w),
GenericEvent,
xi2_dispatcher);
}
static Boolean xi2_add_root_listener(Widget widget)
{
struct root_listen_list *rll = malloc (sizeof (struct root_listen_list));
if (!rll)
return False;
rll->widget = widget;
rll->next = root_listen_list;
if (!root_listen_list)
select_xi2_events(widget);
root_listen_list = rll;
XtInsertEventTypeHandler(widget, GenericEvent, NULL, EyesGeneric, NULL, XtListHead);
return True;
}
static void xi2_remove_root_listener(Widget widget)
{
struct root_listen_list *rll, **prev;
for (prev = &root_listen_list; (rll = *prev) != NULL; prev = &rll->next) {
if (rll->widget == widget) {
*prev = rll->next;
free(rll);
break;
}
}
}
/* Return 1 if XI2 is available, 0 otherwise */
static int has_xi2(Display *dpy)
{
int major, minor;
int rc;
/* We need at least XI 2.0 */
major = 2;
minor = 0;
rc = XIQueryVersion(dpy, &major, &minor);
if (rc == BadRequest) {
return 0;
} else if (rc != Success) {
return 0;
}
return 1;
}
/* ARGSUSED */
static void Initialize (
Widget greq,
@@ -182,6 +398,8 @@ static void Initialize (
w->eyes.shape_mask = 0;
w->eyes.gc[PART_SHAPE] = NULL;
w->eyes.has_xi2 = has_xi2(XtDisplay(w));
#ifdef XRENDER
for (i = 0; i < PART_SHAPE; i ++) {
XColor c;
@@ -197,6 +415,11 @@ static void Initialize (
w->eyes.fill[i] = XRenderCreateSolidFill(XtDisplay (w), &rc);
}
#endif
#ifdef PRESENT
w->eyes.back_buffer = None;
w->eyes.back_damage = None;
CheckPresent(w);
#endif
}
static void
@@ -213,7 +436,7 @@ drawEllipse(EyesWidget w, enum EyesPart part,
Trectangle(&w->eyes.t, &tpos, &pos);
if (part == PART_CLEAR) {
XFillRectangle(XtDisplay(w), XtWindow(w),
XFillRectangle(XtDisplay(w), EyesDrawable(w),
w->eyes.gc[PART_CENTER],
(int)pos.x, (int)pos.y,
(int)pos.width+2, (int)pos.height+2);
@@ -275,7 +498,7 @@ drawEllipse(EyesWidget w, enum EyesPart part,
TPOINT_NONE, TPOINT_NONE, diam);
XFillArc(XtDisplay(w),
part == PART_SHAPE ? w->eyes.shape_mask : XtWindow(w),
part == PART_SHAPE ? w->eyes.shape_mask : EyesDrawable(w),
w->eyes.gc[part],
(int)(pos.x + 0.5), (int)(pos.y + 0.5),
(int)(pos.width + 0.0), (int)(pos.height + 0.0),
@@ -406,11 +629,17 @@ eyeBall(EyesWidget w,
static void repaint_window (EyesWidget w)
{
if (XtIsRealized ((Widget) w)) {
#ifdef PRESENT
MakePresentData(w);
#endif
eyeLiner (w, TRUE, 0);
eyeLiner (w, TRUE, 1);
computePupils (w, w->eyes.mouse, w->eyes.pupil);
eyeBall (w, TRUE, NULL, 0);
eyeBall (w, TRUE, NULL, 1);
#ifdef PRESENT
UpdatePresent(w);
#endif
}
}
@@ -440,6 +669,9 @@ drawEyes(EyesWidget w, TPoint mouse)
TPoint newpupil[2];
int num;
#ifdef PRESENT
MakePresentData(w);
#endif
if (TPointEqual (mouse, w->eyes.mouse)) {
if (delays[w->eyes.update + 1] != 0)
++w->eyes.update;
@@ -452,6 +684,9 @@ drawEyes(EyesWidget w, TPoint mouse)
w->eyes.mouse = mouse;
w->eyes.update = 0;
#ifdef PRESENT
UpdatePresent(w);
#endif
}
static void draw_it_core(EyesWidget w)
@@ -482,9 +717,11 @@ static void draw_it (
if (XtIsRealized((Widget)w)) {
draw_it_core(w);
}
w->eyes.interval_id =
XtAppAddTimeOut(XtWidgetToApplicationContext((Widget) w),
delays[w->eyes.update], draw_it, (XtPointer)w);
if (!w->eyes.has_xi2) {
w->eyes.interval_id =
XtAppAddTimeOut(XtWidgetToApplicationContext((Widget) w),
delays[w->eyes.update], draw_it, (XtPointer)w);
}
} /* draw_it */
static void Resize (Widget gw)
@@ -497,12 +734,25 @@ static void Resize (Widget gw)
if (XtIsRealized (gw))
{
XClearWindow (dpy, XtWindow (w));
SetTransform (&w->eyes.t,
0, w->core.width,
w->core.height, 0,
W_MIN_X, W_MAX_X,
W_MIN_Y, W_MAX_Y);
#ifdef PRESENT
if (w->eyes.back_buffer) {
xcb_free_pixmap(xt_xcb(w),
w->eyes.back_buffer);
w->eyes.back_buffer = None;
xcb_damage_destroy(xt_xcb(w),
w->eyes.back_damage);
w->eyes.back_damage = None;
}
MakePresentData(w);
#endif
if (EyesDrawable(w) == XtWindow(w))
XClearWindow (dpy, XtWindow (w));
#ifdef XRENDER
if (w->eyes.picture) {
XRenderFreePicture(dpy, w->eyes.picture);
@@ -537,7 +787,7 @@ static void Resize (Widget gw)
pf = XRenderFindVisualFormat(dpy,
DefaultVisualOfScreen(w->core.screen));
if (pf)
w->eyes.picture = XRenderCreatePicture(dpy, XtWindow (w),
w->eyes.picture = XRenderCreatePicture(dpy, EyesDrawable (w),
pf, 0, &pa);
}
#endif
@@ -558,9 +808,13 @@ static void Realize (
XtCreateWindow( gw, (unsigned)InputOutput, (Visual *)CopyFromParent,
*valueMask, attrs );
Resize (gw);
w->eyes.interval_id =
XtAppAddTimeOut(XtWidgetToApplicationContext(gw),
delays[w->eyes.update], draw_it, (XtPointer)gw);
if (w->eyes.has_xi2)
xi2_add_root_listener(gw);
else
w->eyes.interval_id =
XtAppAddTimeOut(XtWidgetToApplicationContext(gw),
delays[w->eyes.update], draw_it, (XtPointer)gw);
}
static void Destroy (Widget gw)
@@ -572,6 +826,7 @@ static void Destroy (Widget gw)
XtRemoveTimeOut (w->eyes.interval_id);
for (i = 0; i < PART_MAX; i ++)
XtReleaseGC(gw, w->eyes.gc[i]);
xi2_remove_root_listener(gw);
#ifdef XRENDER
if (w->eyes.picture)
XRenderFreePicture (XtDisplay(w), w->eyes.picture);
@@ -608,7 +863,7 @@ static Boolean SetValues (
EyesClassRec eyesClassRec = {
{ /* core fields */
/* superclass */ &widgetClassRec,
/* class_name */ "Eyes",
/* class_name */ (char *) "Eyes",
/* size */ sizeof(EyesRec),
/* class_initialize */ ClassInitialize,
/* class_part_initialize */ NULL,

View File

@@ -35,6 +35,8 @@
#define XtNrender "render"
#define XtNdistance "distance"
#define XtNpresent "present"
enum EyesPart {
PART_CLEAR = -1,

View File

@@ -8,6 +8,13 @@
#include <X11/extensions/Xrender.h>
#endif
#include "transform.h"
#ifdef PRESENT
#include <X11/Xlib-xcb.h>
#include <xcb/xcb.h>
#include <xcb/present.h>
#include <xcb/xfixes.h>
#include <xcb/damage.h>
#endif
#define SEG_BUFF_SIZE 128
@@ -26,14 +33,23 @@ typedef struct {
Transform maskt;
XtIntervalId interval_id;
Pixmap shape_mask; /* window shape */
Boolean has_xi2;
#ifdef XRENDER
Boolean render;
Picture picture;
Picture fill[PART_SHAPE];
#endif
#ifdef PRESENT
Pixmap back_buffer;
xcb_damage_damage_t back_damage;
xcb_xfixes_region_t back_region;
Boolean present;
#endif
Boolean distance;
} EyesPart;
#define xt_xcb(w) (XGetXCBConnection(XtDisplay(w)))
/* Full instance record declaration */
typedef struct _EyesRec {
CorePart core;

View File

@@ -22,8 +22,8 @@
SUBDIRS = man
bin_PROGRAMS = xeyes
AM_CFLAGS = $(XEYES_CFLAGS) $(XRENDER_CFLAGS) $(CWARNFLAGS)
xeyes_LDADD = $(XEYES_LIBS) $(XRENDER_LIBS) -lm
AM_CFLAGS = $(XEYES_CFLAGS) $(XRENDER_CFLAGS) $(PRESENT_CFLAGS) $(CWARNFLAGS)
xeyes_LDADD = $(XEYES_LIBS) $(XRENDER_LIBS) $(PRESENT_LIBS) -lm
xeyes_SOURCES = \
Eyes.c \
@@ -33,7 +33,7 @@ xeyes_SOURCES = \
transform.h \
xeyes.c
EXTRA_DIST = eyes.bit eyesmask.bit
EXTRA_DIST = eyes.bit eyesmask.bit README.md
MAINTAINERCLEANFILES = ChangeLog INSTALL

View File

@@ -73,7 +73,7 @@ build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = xeyes$(EXEEXT)
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure COPYING ChangeLog INSTALL compile \
config.guess config.sub depcomp install-sh missing \
@@ -93,7 +93,8 @@ PROGRAMS = $(bin_PROGRAMS)
am_xeyes_OBJECTS = Eyes.$(OBJEXT) transform.$(OBJEXT) xeyes.$(OBJEXT)
xeyes_OBJECTS = $(am_xeyes_OBJECTS)
am__DEPENDENCIES_1 =
xeyes_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
xeyes_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -249,6 +250,8 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
PRESENT_CFLAGS = @PRESENT_CFLAGS@
PRESENT_LIBS = @PRESENT_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
@@ -302,6 +305,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -311,8 +315,8 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = man
AM_CFLAGS = $(XEYES_CFLAGS) $(XRENDER_CFLAGS) $(CWARNFLAGS)
xeyes_LDADD = $(XEYES_LIBS) $(XRENDER_LIBS) -lm
AM_CFLAGS = $(XEYES_CFLAGS) $(XRENDER_CFLAGS) $(PRESENT_CFLAGS) $(CWARNFLAGS)
xeyes_LDADD = $(XEYES_LIBS) $(XRENDER_LIBS) $(PRESENT_LIBS) -lm
xeyes_SOURCES = \
Eyes.c \
Eyes.h \
@@ -321,7 +325,7 @@ xeyes_SOURCES = \
transform.h \
xeyes.c
EXTRA_DIST = eyes.bit eyesmask.bit
EXTRA_DIST = eyes.bit eyesmask.bit README.md
MAINTAINERCLEANFILES = ChangeLog INSTALL
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive

View File

@@ -1,25 +0,0 @@
xeyes - a follow the mouse X demo, using the X SHAPE extension
All questions regarding this software should be directed at the
Xorg mailing list:
http://lists.freedesktop.org/mailman/listinfo/xorg
Please submit bug reports to the Xorg bugzilla:
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
The master development code repository can be found at:
git://anongit.freedesktop.org/git/xorg/app/xeyes
http://cgit.freedesktop.org/xorg/app/xeyes
For patch submission instructions, see:
http://www.x.org/wiki/Development/Documentation/SubmittingPatches
For more information on the git code manager, see:
http://wiki.x.org/wiki/GitPage

18
app/xeyes/README.md Normal file
View File

@@ -0,0 +1,18 @@
xeyes - a follow the mouse X demo, using the X SHAPE extension
--------------------------------------------------------------
All questions regarding this software should be directed at the
Xorg mailing list:
https://lists.x.org/mailman/listinfo/xorg
The master development code repository can be found at:
https://gitlab.freedesktop.org/xorg/app/xeyes
Please submit bug reports and requests to merge patches there.
For patch submission instructions, see:
https://www.x.org/wiki/Development/Documentation/SubmittingPatches

222
app/xeyes/aclocal.m4 vendored
View File

@@ -19,32 +19,63 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 1 (pkg-config-0.24)
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 12 (pkg-config-0.29.2)
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
dnl 02111-1307, USA.
dnl
dnl As a special exception to the GNU General Public License, if you
dnl distribute this file as part of a program that contains a
dnl configuration script generated by Autoconf, you may include it under
dnl the same distribution terms that you use for the rest of that
dnl program.
dnl PKG_PREREQ(MIN-VERSION)
dnl -----------------------
dnl Since: 0.29
dnl
dnl Verify that the version of the pkg-config macros are at least
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
dnl installed version of pkg-config, this checks the developer's version
dnl of pkg.m4 when generating configure.
dnl
dnl To ensure that this macro is defined, also add:
dnl m4_ifndef([PKG_PREREQ],
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
dnl
dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require.
m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29.2])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
dnl ----------------------------------
dnl Since: 0.16
dnl
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
dnl first found in the path. Checks that the version of pkg-config found
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
dnl used since that's the first version where most current features of
dnl pkg-config existed.
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
@@ -66,18 +97,19 @@ if test -n "$PKG_CONFIG"; then
PKG_CONFIG=""
fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG
])dnl PKG_PROG_PKG_CONFIG
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
#
# Check to see whether a particular set of modules exists. Similar
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
#
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
# only at the first occurence in configure.ac, so if the first place
# it's called might be skipped (such as if it is within an "if", you
# have to call PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------------------------------
dnl Since: 0.18
dnl
dnl Check to see whether a particular set of modules exists. Similar to
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
dnl
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
dnl only at the first occurence in configure.ac, so if the first place
dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
@@ -87,8 +119,10 @@ m4_ifvaln([$3], [else
$3])dnl
fi])
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
dnl ---------------------------------------------
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
dnl pkg_failed based on the result.
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
@@ -100,10 +134,11 @@ m4_define([_PKG_CONFIG],
else
pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
])dnl _PKG_CONFIG
# _PKG_SHORT_ERRORS_SUPPORTED
# -----------------------------
dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl ---------------------------
dnl Internal check to see if pkg-config supports short errors.
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -111,26 +146,24 @@ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
else
_pkg_short_errors_supported=no
fi[]dnl
])# _PKG_SHORT_ERRORS_SUPPORTED
])dnl _PKG_SHORT_ERRORS_SUPPORTED
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
#
#
# Note that if there is a possibility the first call to
# PKG_CHECK_MODULES might not happen, you should be sure to include an
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
#
#
# --------------------------------------------------------------
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl --------------------------------------------------------------
dnl Since: 0.4.0
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $1])
AC_MSG_CHECKING([for $2])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
@@ -140,11 +173,11 @@ and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
@@ -161,7 +194,7 @@ installed software in a non-standard prefix.
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
@@ -177,16 +210,40 @@ else
AC_MSG_RESULT([yes])
$3
fi[]dnl
])# PKG_CHECK_MODULES
])dnl PKG_CHECK_MODULES
# PKG_INSTALLDIR(DIRECTORY)
# -------------------------
# Substitutes the variable pkgconfigdir as the location where a module
# should install pkg-config .pc files. By default the directory is
# $libdir/pkgconfig, but the default can be changed by passing
# DIRECTORY. The user can override through the --with-pkgconfigdir
# parameter.
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl ---------------------------------------------------------------------
dnl Since: 0.29
dnl
dnl Checks for existence of MODULES and gathers its build flags with
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
dnl and VARIABLE-PREFIX_LIBS from --libs.
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
dnl configure.ac.
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
_save_PKG_CONFIG=$PKG_CONFIG
PKG_CONFIG="$PKG_CONFIG --static"
PKG_CHECK_MODULES($@)
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
])dnl PKG_CHECK_MODULES_STATIC
dnl PKG_INSTALLDIR([DIRECTORY])
dnl -------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable pkgconfigdir as the location where a module
dnl should install pkg-config .pc files. By default the directory is
dnl $libdir/pkgconfig, but the default can be changed by passing
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
dnl parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
@@ -197,16 +254,18 @@ AC_ARG_WITH([pkgconfigdir],
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
]) dnl PKG_INSTALLDIR
])dnl PKG_INSTALLDIR
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
# -------------------------
# Substitutes the variable noarch_pkgconfigdir as the location where a
# module should install arch-independent pkg-config .pc files. By
# default the directory is $datadir/pkgconfig, but the default can be
# changed by passing DIRECTORY. The user can override through the
# --with-noarch-pkgconfigdir parameter.
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
dnl --------------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
dnl module should install arch-independent pkg-config .pc files. By
dnl default the directory is $datadir/pkgconfig, but the default can be
dnl changed by passing DIRECTORY. The user can override through the
dnl --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
@@ -217,7 +276,24 @@ AC_ARG_WITH([noarch-pkgconfigdir],
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
]) dnl PKG_NOARCH_INSTALLDIR
])dnl PKG_NOARCH_INSTALLDIR
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------
dnl Since: 0.28
dnl
dnl Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
#

View File

@@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -53,7 +53,7 @@ func_file_conv ()
MINGW*)
file_conv=mingw
;;
CYGWIN*)
CYGWIN* | MSYS*)
file_conv=cygwin
;;
*)
@@ -67,7 +67,7 @@ func_file_conv ()
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
cygwin/* | msys/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
@@ -255,7 +255,8 @@ EOF
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
@@ -339,10 +340,10 @@ exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
#! /bin/sh

View File

@@ -57,6 +57,9 @@
/* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL
/* Define to use X Present Extension */
#undef PRESENT
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS

195
app/xeyes/configure vendored
View File

@@ -1,8 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for xeyes 1.1.2.
# Generated by GNU Autoconf 2.69 for xeyes 1.2.0.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
# Report bugs to <https://gitlab.freedesktop.org/xorg/app/xeyes/issues>.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -267,7 +267,7 @@ fi
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
$as_echo "$0: Please tell bug-autoconf@gnu.org and
$0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
$0: https://gitlab.freedesktop.org/xorg/app/xeyes/issues
$0: about your system, including any error possibly output
$0: before this message. Then install a modern shell, or
$0: manually run the script under such a shell if you do
@@ -581,9 +581,9 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='xeyes'
PACKAGE_TARNAME='xeyes'
PACKAGE_VERSION='1.1.2'
PACKAGE_STRING='xeyes 1.1.2'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
PACKAGE_VERSION='1.2.0'
PACKAGE_STRING='xeyes 1.2.0'
PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/app/xeyes/issues'
PACKAGE_URL=''
ac_unique_file="Makefile.am"
@@ -627,6 +627,8 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
PRESENT_LIBS
PRESENT_CFLAGS
XRENDER_LIBS
XRENDER_CFLAGS
XEYES_LIBS
@@ -731,6 +733,7 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -759,6 +762,7 @@ enable_selective_werror
enable_strict_compilation
enable_silent_rules
with_xrender
with_present
'
ac_precious_vars='build_alias
host_alias
@@ -775,7 +779,9 @@ PKG_CONFIG_LIBDIR
XEYES_CFLAGS
XEYES_LIBS
XRENDER_CFLAGS
XRENDER_LIBS'
XRENDER_LIBS
PRESENT_CFLAGS
PRESENT_LIBS'
# Initialize some variables set by options.
@@ -814,6 +820,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1066,6 +1073,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1203,7 +1219,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir
libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1316,7 +1332,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures xeyes 1.1.2 to adapt to many kinds of systems.
\`configure' configures xeyes 1.2.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1356,6 +1372,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -1386,7 +1403,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of xeyes 1.1.2:";;
short | recursive ) echo "Configuration of xeyes 1.2.0:";;
esac
cat <<\_ACEOF
@@ -1414,6 +1431,7 @@ Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-xrender Use Xrender for rendering (Default is YES)
--with-present Use Present for updates (Default is AUTO)
Some influential environment variables:
CC C compiler command
@@ -1436,11 +1454,15 @@ Some influential environment variables:
C compiler flags for XRENDER, overriding pkg-config
XRENDER_LIBS
linker flags for XRENDER, overriding pkg-config
PRESENT_CFLAGS
C compiler flags for PRESENT, overriding pkg-config
PRESENT_LIBS
linker flags for PRESENT, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
Report bugs to <https://gitlab.freedesktop.org/xorg/app/xeyes/issues>.
_ACEOF
ac_status=$?
fi
@@ -1503,7 +1525,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
xeyes configure 1.1.2
xeyes configure 1.2.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1760,7 +1782,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by xeyes $as_me 1.1.2, which was
It was created by xeyes $as_me 1.2.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2589,7 +2611,7 @@ fi
# Define the identity of the package.
PACKAGE='xeyes'
VERSION='1.1.2'
VERSION='1.2.0'
cat >>confdefs.h <<_ACEOF
@@ -10437,19 +10459,19 @@ AM_BACKSLASH='\'
# Checks for pkg-config packages
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEYES" >&5
$as_echo_n "checking for XEYES... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xi >= 1.7 x11 xt xext xmu xproto >= 7.0.17" >&5
$as_echo_n "checking for xi >= 1.7 x11 xt xext xmu xproto >= 7.0.17... " >&6; }
if test -n "$XEYES_CFLAGS"; then
pkg_cv_XEYES_CFLAGS="$XEYES_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xt xext xmu xproto >= 7.0.17\""; } >&5
($PKG_CONFIG --exists --print-errors "x11 xt xext xmu xproto >= 7.0.17") 2>&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xi >= 1.7 x11 xt xext xmu xproto >= 7.0.17\""; } >&5
($PKG_CONFIG --exists --print-errors "xi >= 1.7 x11 xt xext xmu xproto >= 7.0.17") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_XEYES_CFLAGS=`$PKG_CONFIG --cflags "x11 xt xext xmu xproto >= 7.0.17" 2>/dev/null`
pkg_cv_XEYES_CFLAGS=`$PKG_CONFIG --cflags "xi >= 1.7 x11 xt xext xmu xproto >= 7.0.17" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -10461,12 +10483,12 @@ if test -n "$XEYES_LIBS"; then
pkg_cv_XEYES_LIBS="$XEYES_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xt xext xmu xproto >= 7.0.17\""; } >&5
($PKG_CONFIG --exists --print-errors "x11 xt xext xmu xproto >= 7.0.17") 2>&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xi >= 1.7 x11 xt xext xmu xproto >= 7.0.17\""; } >&5
($PKG_CONFIG --exists --print-errors "xi >= 1.7 x11 xt xext xmu xproto >= 7.0.17") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_XEYES_LIBS=`$PKG_CONFIG --libs "x11 xt xext xmu xproto >= 7.0.17" 2>/dev/null`
pkg_cv_XEYES_LIBS=`$PKG_CONFIG --libs "xi >= 1.7 x11 xt xext xmu xproto >= 7.0.17" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
@@ -10478,7 +10500,7 @@ fi
if test $pkg_failed = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -10487,14 +10509,14 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
XEYES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11 xt xext xmu xproto >= 7.0.17" 2>&1`
XEYES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xi >= 1.7 x11 xt xext xmu xproto >= 7.0.17" 2>&1`
else
XEYES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11 xt xext xmu xproto >= 7.0.17" 2>&1`
XEYES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xi >= 1.7 x11 xt xext xmu xproto >= 7.0.17" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$XEYES_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (x11 xt xext xmu xproto >= 7.0.17) were not met:
as_fn_error $? "Package requirements (xi >= 1.7 x11 xt xext xmu xproto >= 7.0.17) were not met:
$XEYES_PKG_ERRORS
@@ -10505,7 +10527,7 @@ Alternatively, you may set the environment variables XEYES_CFLAGS
and XEYES_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -10538,8 +10560,8 @@ fi
if test x$use_xrender != xno ; then
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRENDER" >&5
$as_echo_n "checking for XRENDER... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xrender >= 0.4" >&5
$as_echo_n "checking for xrender >= 0.4... " >&6; }
if test -n "$XRENDER_CFLAGS"; then
pkg_cv_XRENDER_CFLAGS="$XRENDER_CFLAGS"
@@ -10579,7 +10601,7 @@ fi
if test $pkg_failed = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -10606,7 +10628,7 @@ Alternatively, you may set the environment variables XRENDER_CFLAGS
and XRENDER_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -10632,6 +10654,111 @@ $as_echo "#define XRENDER 1" >>confdefs.h
fi
# Check whether --with-present was given.
if test "${with_present+set}" = set; then :
withval=$with_present; use_present="$withval"
else
use_present="try"
fi
if test x$use_present != xno ; then
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x11-xcb xcb-present >= 1.9 xcb-xfixes xcb-damage" >&5
$as_echo_n "checking for x11-xcb xcb-present >= 1.9 xcb-xfixes xcb-damage... " >&6; }
if test -n "$PRESENT_CFLAGS"; then
pkg_cv_PRESENT_CFLAGS="$PRESENT_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb-present >= 1.9 xcb-xfixes xcb-damage\""; } >&5
($PKG_CONFIG --exists --print-errors "x11-xcb xcb-present >= 1.9 xcb-xfixes xcb-damage") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_PRESENT_CFLAGS=`$PKG_CONFIG --cflags "x11-xcb xcb-present >= 1.9 xcb-xfixes xcb-damage" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test -n "$PRESENT_LIBS"; then
pkg_cv_PRESENT_LIBS="$PRESENT_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb-present >= 1.9 xcb-xfixes xcb-damage\""; } >&5
($PKG_CONFIG --exists --print-errors "x11-xcb xcb-present >= 1.9 xcb-xfixes xcb-damage") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_PRESENT_LIBS=`$PKG_CONFIG --libs "x11-xcb xcb-present >= 1.9 xcb-xfixes xcb-damage" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
PRESENT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11-xcb xcb-present >= 1.9 xcb-xfixes xcb-damage" 2>&1`
else
PRESENT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11-xcb xcb-present >= 1.9 xcb-xfixes xcb-damage" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$PRESENT_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (x11-xcb xcb-present >= 1.9 xcb-xfixes xcb-damage) were not met:
$PRESENT_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables PRESENT_CFLAGS
and PRESENT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables PRESENT_CFLAGS
and PRESENT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details" "$LINENO" 5; }
else
PRESENT_CFLAGS=$pkg_cv_PRESENT_CFLAGS
PRESENT_LIBS=$pkg_cv_PRESENT_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
$as_echo "#define PRESENT 1" >>confdefs.h
fi
ac_config_files="$ac_config_files Makefile man/Makefile"
cat >confcache <<\_ACEOF
@@ -11172,7 +11299,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by xeyes $as_me 1.1.2, which was
This file was extended by xeyes $as_me 1.2.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -11232,13 +11359,13 @@ $config_headers
Configuration commands:
$config_commands
Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>."
Report bugs to <https://gitlab.freedesktop.org/xorg/app/xeyes/issues>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
xeyes config.status 1.1.2
xeyes config.status 1.2.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View File

@@ -23,8 +23,8 @@ dnl Process this file with autoconf to create configure.
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xeyes], [1.1.2],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xeyes])
AC_INIT([xeyes], [1.2.0],
[https://gitlab.freedesktop.org/xorg/app/xeyes/issues], [xeyes])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
@@ -39,7 +39,7 @@ XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
# Checks for pkg-config packages
PKG_CHECK_MODULES(XEYES, [x11 xt xext xmu xproto >= 7.0.17])
PKG_CHECK_MODULES(XEYES, [xi >= 1.7 x11 xt xext xmu xproto >= 7.0.17])
dnl Optional dependencies
AC_ARG_WITH(xrender, AS_HELP_STRING([--with-xrender],[Use Xrender for rendering (Default is YES)]),use_xrender="$withval",use_xrender="try")
@@ -48,6 +48,12 @@ if test x$use_xrender != xno ; then
AC_DEFINE([XRENDER],1,[Define to use X Render Extension])
fi
AC_ARG_WITH(present, AS_HELP_STRING([--with-present],[Use Present for updates (Default is AUTO)]),use_present="$withval",use_present="try")
if test x$use_present != xno ; then
PKG_CHECK_MODULES(PRESENT, [x11-xcb xcb-present >= 1.9 xcb-xfixes xcb-damage])
AC_DEFINE([PRESENT],1,[Define to use X Present Extension])
fi
AC_CONFIG_FILES([
Makefile
man/Makefile])

View File

@@ -172,6 +172,8 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
PRESENT_CFLAGS = @PRESENT_CFLAGS@
PRESENT_LIBS = @PRESENT_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
@@ -225,6 +227,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@

View File

@@ -56,6 +56,10 @@ usage(void)
#ifdef XRENDER
fprintf(stderr,
" [-render | +render]\n");
#endif
#ifdef PRESENT
fprintf(stderr,
" [-present | +present]\n");
#endif
exit(1);
}
@@ -64,16 +68,20 @@ usage(void)
pass over the remaining options after XtParseCommand is let loose. */
static XrmOptionDescRec options[] = {
{"-outline", "*eyes.outline", XrmoptionSepArg, NULL},
{"-center", "*eyes.center", XrmoptionSepArg, NULL},
{"-backing", "*eyes.backingStore", XrmoptionSepArg, NULL},
{"-shape", "*eyes.shapeWindow", XrmoptionNoArg, "TRUE"},
{"+shape", "*eyes.shapeWindow", XrmoptionNoArg, "FALSE"},
{(char *)"-outline", (char *)"*eyes.outline", XrmoptionSepArg, NULL},
{(char *)"-center", (char *)"*eyes.center", XrmoptionSepArg, NULL},
{(char *)"-backing", (char *)"*eyes.backingStore", XrmoptionSepArg, NULL},
{(char *)"-shape", (char *)"*eyes.shapeWindow", XrmoptionNoArg, (char *)"TRUE"},
{(char *)"+shape", (char *)"*eyes.shapeWindow", XrmoptionNoArg, (char *)"FALSE"},
#ifdef XRENDER
{"-render", "*eyes.render", XrmoptionNoArg, "TRUE"},
{"+render", "*eyes.render", XrmoptionNoArg, "FALSE"},
{(char *)"-render", (char *)"*eyes.render", XrmoptionNoArg, (char *)"TRUE"},
{(char *)"+render", (char *)"*eyes.render", XrmoptionNoArg, (char *)"FALSE"},
#endif
{"-distance", "*eyes.distance", XrmoptionNoArg, "TRUE"},
#ifdef PRESENT
{(char *)"-present", (char *)"*eyes.present", XrmoptionNoArg, (char *)"TRUE"},
{(char *)"+present", (char *)"*eyes.present", XrmoptionNoArg, (char *)"FALSE"},
#endif
{(char *)"-distance", (char *)"*eyes.distance", XrmoptionNoArg, (char *)"TRUE"},
};
static Atom wm_delete_window;
@@ -92,7 +100,7 @@ quit(Widget w, XEvent *event, String *params, Cardinal *num_params)
}
static XtActionsRec actions[] = {
{"quit", quit}
{(char *) "quit", quit}
};
int