Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package xeyes for openSUSE:Factory checked 
in at 2021-08-04 22:28:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xeyes (Old)
 and      /work/SRC/openSUSE:Factory/.xeyes.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xeyes"

Wed Aug  4 22:28:36 2021 rev:8 rq:909749 version:1.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/xeyes/xeyes.changes      2018-04-19 
15:28:07.958382039 +0200
+++ /work/SRC/openSUSE:Factory/.xeyes.new.1899/xeyes.changes    2021-08-04 
22:29:15.765774329 +0200
@@ -1,0 +2,8 @@
+Mon Aug  2 10:52:05 UTC 2021 - Stefan Dirsch <sndir...@suse.com>
+
+- Update to version 1.2.0
+  * This release of xeyes adds support for using the Present and
+    Xinput2 extensions so that your X server is even smoother when
+    making eyes at you.
+
+-------------------------------------------------------------------

Old:
----
  xeyes-1.1.2.tar.bz2

New:
----
  xeyes-1.2.0.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xeyes.spec ++++++
--- /var/tmp/diff_new_pack.LVHzNb/_old  2021-08-04 22:29:16.121773895 +0200
+++ /var/tmp/diff_new_pack.LVHzNb/_new  2021-08-04 22:29:16.121773895 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package xeyes
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,21 +12,22 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           xeyes
-Version:        1.1.2
+Version:        1.2.0
 Release:        0
 Summary:        A follow the mouse X demo
 License:        X11
 Group:          System/X11/Utilities
-Url:            http://xorg.freedesktop.org/
+URL:            http://xorg.freedesktop.org/
 Source0:        
http://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.bz2
 BuildRequires:  pkg-config
 BuildRequires:  pkgconfig(x11)
 BuildRequires:  pkgconfig(xext)
+BuildRequires:  pkgconfig(xi)
 BuildRequires:  pkgconfig(xmu)
 BuildRequires:  pkgconfig(xorg-macros) >= 1.8
 BuildRequires:  pkgconfig(xrender) >= 0.4
@@ -50,7 +51,7 @@
 
 %files
 %defattr(-,root,root)
-%doc ChangeLog COPYING README
+%doc ChangeLog COPYING README.md
 %{_bindir}/xeyes
 %{_mandir}/man1/xeyes.1%{?ext_man}
 

++++++ xeyes-1.1.2.tar.bz2 -> xeyes-1.2.0.tar.bz2 ++++++
++++ 21184 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xeyes-1.1.2/ChangeLog new/xeyes-1.2.0/ChangeLog
--- old/xeyes-1.1.2/ChangeLog   2018-03-10 02:26:18.000000000 +0100
+++ new/xeyes-1.2.0/ChangeLog   2021-08-02 01:46:44.000000000 +0200
@@ -1,3 +1,92 @@
+commit adde23dc8724dc6f793b0c68143dc34818f7f6f4
+Author: Alan Coopersmith <alan.coopersm...@oracle.com>
+Date:   Sun Aug 1 16:41:00 2021 -0700
+
+    xeyes 1.2.0
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>
+
+commit 09e50de77da82430cbada93cf58544af2441fd83
+Author: Alan Coopersmith <alan.coopersm...@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.coopersm...@oracle.com>
+
+commit 7517441ffa1aecb6f565217149762267d145e11e
+Author: Keith Packard <kei...@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 <kei...@keithp.com>
+
+commit 420c2d8517246c9e422739cadb7acb29e35a3bed
+Author: Keith Packard <kei...@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.hutte...@who-t.net>
+    
+    Signed-off-by: Keith Packard <kei...@keithp.com>
+
+commit 3f2af30bd94ea3012bc1d1bde82f7c9a1c4dea27
+Author: Keith Packard <kei...@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 <psyc...@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 <kei...@keithp.com>
+
+commit 46dac260d384e034aaabd576d9b818d39f4821c6
+Author: Alan Coopersmith <alan.coopersm...@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.coopersm...@oracle.com>
+
+commit 7922b89288d463a29f742fbb48ab38b3ec485dff
+Author: Alan Coopersmith <alan.coopersm...@oracle.com>
+Date:   Fri Nov 16 21:56:11 2018 -0800
+
+    Update README for gitlab migration
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com>
+
 commit abb6802af0d82c196fd94b8dc94549ba64754cb5
 Author: Alan Coopersmith <alan.coopersm...@oracle.com>
 Date:   Fri Mar 9 17:24:55 2018 -0800
@@ -508,7 +597,7 @@
         configure cache, you cache it, and the cached value is probably wrong.
 
 commit c903caebf875d510cbd1f720ccc02bd03250d7c6
-Author: S??ren Sandmann Pedersen <sandm...@daimi.au.dk>
+Author: S??ren Sandmann Pedersen  <sandm...@daimi.au.dk>
 Date:   Fri Jul 1 18:07:18 2005 +0000
 
     Xeyes build system
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xeyes-1.1.2/Eyes.c new/xeyes-1.2.0/Eyes.c
--- old/xeyes-1.1.2/Eyes.c      2018-03-10 02:26:07.000000000 +0100
+++ new/xeyes-1.2.0/Eyes.c      2021-08-02 01:46:34.000000000 +0200
@@ -48,36 +48,40 @@
 # 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 @@
 
 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 @@
     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 @@
        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 @@
     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 @@
                    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 @@
 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 @@
     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 @@
 
     w->eyes.mouse = mouse;
     w->eyes.update = 0;
+#ifdef PRESENT
+    UpdatePresent(w);
+#endif
 }
 
 static void draw_it_core(EyesWidget w)
@@ -482,9 +717,11 @@
        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 @@
 
     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 @@
            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 @@
     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 @@
        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 @@
 EyesClassRec eyesClassRec = {
     { /* core fields */
     /* superclass              */      &widgetClassRec,
-    /* class_name              */      "Eyes",
+    /* class_name              */      (char *) "Eyes",
     /* size                    */      sizeof(EyesRec),
     /* class_initialize                */      ClassInitialize,
     /* class_part_initialize   */      NULL,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xeyes-1.1.2/Eyes.h new/xeyes-1.2.0/Eyes.h
--- old/xeyes-1.1.2/Eyes.h      2018-03-10 02:26:07.000000000 +0100
+++ new/xeyes-1.2.0/Eyes.h      2021-08-02 01:46:34.000000000 +0200
@@ -35,6 +35,8 @@
 #define XtNrender      "render"
 #define XtNdistance    "distance"
 
+#define XtNpresent      "present"
+
 enum EyesPart {
        PART_CLEAR = -1,
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xeyes-1.1.2/EyesP.h new/xeyes-1.2.0/EyesP.h
--- old/xeyes-1.1.2/EyesP.h     2018-03-10 02:26:07.000000000 +0100
+++ new/xeyes-1.2.0/EyesP.h     2021-08-02 01:46:34.000000000 +0200
@@ -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 @@
         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;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xeyes-1.1.2/Makefile.am new/xeyes-1.2.0/Makefile.am
--- old/xeyes-1.1.2/Makefile.am 2018-03-10 02:26:07.000000000 +0100
+++ new/xeyes-1.2.0/Makefile.am 2021-08-02 01:46:34.000000000 +0200
@@ -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 @@
         transform.h \
         xeyes.c
 
-EXTRA_DIST = eyes.bit eyesmask.bit
+EXTRA_DIST = eyes.bit eyesmask.bit README.md
 
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xeyes-1.1.2/README new/xeyes-1.2.0/README
--- old/xeyes-1.1.2/README      2018-03-10 02:26:07.000000000 +0100
+++ new/xeyes-1.2.0/README      1970-01-01 01:00:00.000000000 +0100
@@ -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
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xeyes-1.1.2/README.md new/xeyes-1.2.0/README.md
--- old/xeyes-1.1.2/README.md   1970-01-01 01:00:00.000000000 +0100
+++ new/xeyes-1.2.0/README.md   2021-08-02 01:46:34.000000000 +0200
@@ -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
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xeyes-1.1.2/compile new/xeyes-1.2.0/compile
--- old/xeyes-1.1.2/compile     2018-03-10 02:26:12.000000000 +0100
+++ new/xeyes-1.2.0/compile     2021-08-02 01:46:39.000000000 +0200
@@ -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 <tro...@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
 # 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 @@
          MINGW*)
            file_conv=mingw
            ;;
-         CYGWIN*)
+         CYGWIN* | MSYS*)
            file_conv=cygwin
            ;;
          *)
@@ -67,7 +67,7 @@
        mingw/*)
          file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
          ;;
-       cygwin/*)
+       cygwin/* | msys/*)
          file=`cygpath -m "$file" || echo "$file"`
          ;;
        wine/*)
@@ -255,7 +255,8 @@
     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,9 +340,9 @@
 # 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:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xeyes-1.1.2/config.h.in new/xeyes-1.2.0/config.h.in
--- old/xeyes-1.1.2/config.h.in 2018-03-10 02:26:11.000000000 +0100
+++ new/xeyes-1.2.0/config.h.in 2021-08-02 01:46:38.000000000 +0200
@@ -3,12 +3,12 @@
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
@@ -57,7 +57,12 @@
 /* Patch version of this package */
 #undef PACKAGE_VERSION_PATCHLEVEL
 
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to use X Present Extension */
+#undef PRESENT
+
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+   required in a freestanding environment). This macro is provided for
+   backward compatibility; new code need not use it. */
 #undef STDC_HEADERS
 
 /* Version number of package */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xeyes-1.1.2/configure.ac new/xeyes-1.2.0/configure.ac
--- old/xeyes-1.1.2/configure.ac        2018-03-10 02:26:07.000000000 +0100
+++ new/xeyes-1.2.0/configure.ac        2021-08-02 01:46:34.000000000 +0200
@@ -23,8 +23,8 @@
 
 # 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])
 
@@ -38,7 +38,7 @@
 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")
@@ -47,6 +47,12 @@
        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])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xeyes-1.1.2/missing new/xeyes-1.2.0/missing
--- old/xeyes-1.1.2/missing     2018-03-10 02:26:12.000000000 +0100
+++ new/xeyes-1.2.0/missing     2021-08-02 01:46:39.000000000 +0200
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2013-10-28.13; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
 # 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
@@ -101,9 +101,9 @@
   exit $st
 fi
 
-perl_URL=http://www.perl.org/
-flex_URL=http://flex.sourceforge.net/
-gnu_software_URL=http://www.gnu.org/software
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
 
 program_details ()
 {
@@ -207,9 +207,9 @@
 exit $st
 
 # Local variables:
-# 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:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/xeyes-1.1.2/xeyes.c new/xeyes-1.2.0/xeyes.c
--- old/xeyes-1.1.2/xeyes.c     2018-03-10 02:26:07.000000000 +0100
+++ new/xeyes-1.2.0/xeyes.c     2021-08-02 01:46:34.000000000 +0200
@@ -57,6 +57,10 @@
     fprintf(stderr,
            "       [-render | +render]\n");
 #endif
+#ifdef PRESENT
+    fprintf(stderr,
+           "       [-present | +present]\n");
+#endif
     exit(1);
 }
 
@@ -64,16 +68,20 @@
    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
+#ifdef PRESENT
+{(char *)"-present",   (char *)"*eyes.present",        XrmoptionNoArg,         
(char *)"TRUE"},
+{(char *)"+present",   (char *)"*eyes.present",        XrmoptionNoArg,         
(char *)"FALSE"},
 #endif
-{"-distance",  "*eyes.distance",       XrmoptionNoArg,         "TRUE"},
+{(char *)"-distance",  (char *)"*eyes.distance",       XrmoptionNoArg,         
(char *)"TRUE"},
 };
 
 static Atom wm_delete_window;
@@ -92,7 +100,7 @@
 }
 
 static XtActionsRec actions[] = {
-    {"quit",   quit}
+    {(char *) "quit",  quit}
 };
 
 int

Reply via email to