Hello community,

here is the log from the commit of package picom for openSUSE:Factory checked 
in at 2020-11-29 12:29:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/picom (Old)
 and      /work/SRC/openSUSE:Factory/.picom.new.5913 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "picom"

Sun Nov 29 12:29:17 2020 rev:3 rq:851310 version:8.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/picom/picom.changes      2020-06-15 
20:29:54.910250567 +0200
+++ /work/SRC/openSUSE:Factory/.picom.new.5913/picom.changes    2020-11-29 
12:29:21.286058404 +0100
@@ -1,0 +2,9 @@
+Thu Nov 26 12:34:36 UTC 2020 - Dirk Mueller <[email protected]>
+
+- update to 8.2:
+  * Fixes assertion failures related to WIN_FLAGS_SHADOW_STALE, see #479
+  * write-pid-path in configuration file now accepted, see #492
+  * Pid files are now deleted during shutdown, see #492
+  * Build fixes for certain platforms, see #501, #502
+
+-------------------------------------------------------------------

Old:
----
  v8.tar.gz

New:
----
  v8.2.tar.gz

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

Other differences:
------------------
++++++ picom.spec ++++++
--- /var/tmp/diff_new_pack.6XgtRs/_old  2020-11-29 12:29:22.026059151 +0100
+++ /var/tmp/diff_new_pack.6XgtRs/_new  2020-11-29 12:29:22.030059156 +0100
@@ -17,13 +17,13 @@
 
 
 Name:           picom
-Version:        8
+Version:        8.2
 Release:        0
 Summary:        Stand-alone compositor for X11
 License:        MPL-2.0 AND MIT
 Group:          System/X11/Utilities
 URL:            https://github.com/yshui/picom
-Source0:        https://github.com/yshui/picom/archive/v8.tar.gz
+Source0:        https://github.com/yshui/picom/archive/v%{version}.tar.gz
 Source1:        picom.desktop
 BuildRequires:  asciidoc
 BuildRequires:  c_compiler

++++++ v8.tar.gz -> v8.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/bin/picom-trans new/picom-8.2/bin/picom-trans
--- old/picom-8/bin/picom-trans 2020-04-21 20:33:17.000000000 +0200
+++ new/picom-8.2/bin/picom-trans       2020-10-24 10:44:12.000000000 +0200
@@ -160,7 +160,7 @@
   fi
 
   # Find the line number of the target window in the window tree
-  lineno=$(echo -n "$treeout" | grep -nw "$wid" | head -n1 | cut -d ':' -f 1)
+  lineno=$(echo -n "$treeout" | grep -nw "^\s*$wid" | head -n1 | cut -d ':' -f 
1)
 
   if test -z "$lineno"; then
     echo 'Failed to find window in window tree.'
@@ -169,7 +169,7 @@
 
   # Find the highest ancestor of the target window below
   topmost=$(echo -n "$treeout" \
-    | head -n $((lineno + 1)) \
+    | head -n $lineno \
     | sed -n 's/^     \(0x[[:xdigit:]]*\).*/\1/p' \
     | tail -n 1)
 fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/man/picom.1.asciidoc 
new/picom-8.2/man/picom.1.asciidoc
--- old/picom-8/man/picom.1.asciidoc    2020-04-21 20:33:17.000000000 +0200
+++ new/picom-8.2/man/picom.1.asciidoc  2020-10-24 10:44:12.000000000 +0200
@@ -86,7 +86,7 @@
        Look for configuration file at the path. See *CONFIGURATION FILES* 
section below for where picom looks for a configuration file by default. Use 
`/dev/null` to avoid loading configuration file.
 
 *--write-pid-path* 'PATH'::
-       Write process ID to a file.
+       Write process ID to a file. it is recommended to use an absolute path.
 
 *--shadow-red* 'VALUE'::
        Red color value of shadow (0.0 - 1.0, defaults to 0).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/meson.build new/picom-8.2/meson.build
--- old/picom-8/meson.build     2020-04-21 20:33:17.000000000 +0200
+++ new/picom-8.2/meson.build   2020-10-24 10:44:12.000000000 +0200
@@ -1,4 +1,4 @@
-project('picom', 'c', version: '8',
+project('picom', 'c', version: '8.2',
         default_options: ['c_std=c11'])
 
 cc = meson.get_compiler('c')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/src/backend/gl/gl_common.c 
new/picom-8.2/src/backend/gl/gl_common.c
--- old/picom-8/src/backend/gl/gl_common.c      2020-04-21 20:33:17.000000000 
+0200
+++ new/picom-8.2/src/backend/gl/gl_common.c    2020-10-24 10:44:12.000000000 
+0200
@@ -485,7 +485,7 @@
                //          ri, rx, ry, rxe, rye, rdx, rdy, rdxe, rdye);
 
                memcpy(&coord[i * 16],
-                      (GLint[][2]){
+                      ((GLint[][2]){
                           {vx1, vy1},
                           {texture_x1, texture_y1},
                           {vx2, vy1},
@@ -494,11 +494,12 @@
                           {texture_x2, texture_y2},
                           {vx1, vy2},
                           {texture_x1, texture_y2},
-                      },
+                      }),
                       sizeof(GLint[2]) * 8);
 
                GLuint u = (GLuint)(i * 4);
-               memcpy(&indices[i * 6], (GLuint[]){u + 0, u + 1, u + 2, u + 2, 
u + 3, u + 0},
+               memcpy(&indices[i * 6],
+                      ((GLuint[]){u + 0, u + 1, u + 2, u + 2, u + 3, u + 0}),
                       sizeof(GLuint) * 6);
        }
 }
@@ -885,10 +886,13 @@
        for (int i = 0; i < nrects; i++) {
                GLint y1 = y_inverted ? height - rect[i].y2 : rect[i].y1,
                      y2 = y_inverted ? height - rect[i].y1 : rect[i].y2;
+               // clang-format off
                memcpy(&coord[i * 8],
-                      (GLint[][2]){
-                          {rect[i].x1, y1}, {rect[i].x2, y1}, {rect[i].x2, 
y2}, {rect[i].x1, y2}},
+                      ((GLint[][2]){
+                          {rect[i].x1, y1}, {rect[i].x2, y1},
+                          {rect[i].x2, y2}, {rect[i].x1, y2}}),
                       sizeof(GLint[2]) * 4);
+               // clang-format on
                indices[i * 6 + 0] = (GLuint)i * 4 + 0;
                indices[i * 6 + 1] = (GLuint)i * 4 + 1;
                indices[i * 6 + 2] = (GLuint)i * 4 + 2;
@@ -1383,15 +1387,16 @@
        for (int i = 0; i < nrects; i++) {
                // clang-format off
                memcpy(&coord[i * 8],
-                      (GLint[]){rect[i].x1, gd->height - rect[i].y2,
+                      ((GLint[]){rect[i].x1, gd->height - rect[i].y2,
                                 rect[i].x2, gd->height - rect[i].y2,
                                 rect[i].x2, gd->height - rect[i].y1,
-                                rect[i].x1, gd->height - rect[i].y1},
+                                rect[i].x1, gd->height - rect[i].y1}),
                       sizeof(GLint) * 8);
                // clang-format on
 
                GLuint u = (GLuint)(i * 4);
-               memcpy(&indices[i * 6], (GLuint[]){u + 0, u + 1, u + 2, u + 2, 
u + 3, u + 0},
+               memcpy(&indices[i * 6],
+                      ((GLuint[]){u + 0, u + 1, u + 2, u + 2, u + 3, u + 0}),
                       sizeof(GLuint) * 6);
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/src/backend/xrender/xrender.c 
new/picom-8.2/src/backend/xrender/xrender.c
--- old/picom-8/src/backend/xrender/xrender.c   2020-04-21 20:33:17.000000000 
+0200
+++ new/picom-8.2/src/backend/xrender/xrender.c 2020-10-24 10:44:12.000000000 
+0200
@@ -166,6 +166,7 @@
        if (!tmp_picture[0] || !tmp_picture[1]) {
                log_error("Failed to build intermediate Picture.");
                pixman_region32_fini(&reg_op);
+               pixman_region32_fini(&reg_op_resized);
                return false;
        }
 
@@ -242,6 +243,7 @@
        xcb_render_free_picture(c, tmp_picture[0]);
        xcb_render_free_picture(c, tmp_picture[1]);
        pixman_region32_fini(&reg_op);
+       pixman_region32_fini(&reg_op_resized);
        return true;
 }
 
@@ -266,6 +268,8 @@
            x_create_picture_with_visual_and_pixmap(base->c, fmt.visual, 
pixmap, 0, NULL);
        img->owned = owned;
        img->visual = fmt.visual;
+       free(r);
+
        if (img->pict == XCB_NONE) {
                free(img);
                return NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/src/c2.c new/picom-8.2/src/c2.c
--- old/picom-8/src/c2.c        2020-04-21 20:33:17.000000000 +0200
+++ new/picom-8.2/src/c2.c      2020-10-24 10:44:12.000000000 +0200
@@ -267,9 +267,10 @@
 static inline c2_ptr_t c2h_comb_tree(c2_b_op_t op, c2_ptr_t p1, c2_ptr_t p2) {
        c2_ptr_t p = {.isbranch = true, .b = cmalloc(c2_b_t)};
 
+       p.b->neg = false;
+       p.b->op = op;
        p.b->opr1 = p1;
        p.b->opr2 = p2;
-       p.b->op = op;
 
        return p;
 }
@@ -369,6 +370,7 @@
 #ifdef DEBUG_C2
                log_trace("(\"%s\"): ", pattern);
                c2_dump(plptr->ptr);
+               putchar('\n');
 #endif
 
                return plptr;
@@ -1197,7 +1199,7 @@
                }
 
                c2_dump(pbranch->opr2);
-               printf(")");
+               printf(") ");
        }
        // For a leaf
        else {
@@ -1507,8 +1509,9 @@
                }
 
 #ifdef DEBUG_WINMATCH
-               log_trace("(%#010lx): branch: result = %d, pattern = ", w->id, 
result);
+               log_trace("(%#010x): branch: result = %d, pattern = ", 
w->base.id, result);
                c2_dump(cond);
+               putchar('\n');
 #endif
        }
        // Handle a leaf
@@ -1527,10 +1530,11 @@
                }
 
 #ifdef DEBUG_WINMATCH
-               log_trace("(%#010lx): leaf: result = %d, error = %d, "
-                         "client = %#010lx,  pattern = ",
-                         w->id, result, error, w->client_win);
+               log_trace("(%#010x): leaf: result = %d, error = %d, "
+                         "client = %#010x,  pattern = ",
+                         w->base.id, result, error, w->client_win);
                c2_dump(cond);
+               putchar('\n');
 #endif
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/src/common.h new/picom-8.2/src/common.h
--- old/picom-8/src/common.h    2020-04-21 20:33:17.000000000 +0200
+++ new/picom-8.2/src/common.h  2020-10-24 10:44:12.000000000 +0200
@@ -230,6 +230,10 @@
        bool tmout_unredir_hit;
        /// Whether we need to redraw the screen
        bool redraw_needed;
+
+       /// Cache a xfixes region so we don't need to allocate it everytime.
+       /// A workaround for yshui/picom#301
+       xcb_xfixes_region_t damaged_region;
        /// The region needs to painted on next paint.
        region_t *damage;
        /// The region damaged on the last paint.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/src/compiler.h new/picom-8.2/src/compiler.h
--- old/picom-8/src/compiler.h  2020-04-21 20:33:17.000000000 +0200
+++ new/picom-8.2/src/compiler.h        2020-10-24 10:44:12.000000000 +0200
@@ -111,6 +111,6 @@
 typedef unsigned long ulong;
 typedef unsigned int uint;
 
-static inline int popcount(uint x) {
-       return __builtin_popcount(x);
+static inline int attr_const popcntul(unsigned long a) {
+       return __builtin_popcountl(a);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/src/config_libconfig.c 
new/picom-8.2/src/config_libconfig.c
--- old/picom-8/src/config_libconfig.c  2020-04-21 20:33:17.000000000 +0200
+++ new/picom-8.2/src/config_libconfig.c        2020-10-24 10:44:12.000000000 
+0200
@@ -634,6 +634,15 @@
                config_setting_lookup_float(blur_cfg, "deviation", 
&opt->blur_deviation);
        }
 
+       // --write-pid-path
+       if (config_lookup_string(&cfg, "write-pid-path", &sval)) {
+               if (*sval != '/') {
+                       log_warn("The write-pid-path in your configuration file 
is not"
+                                " an absolute path");
+               }
+               opt->write_pid_path = strdup(sval);
+       }
+
        // Wintype settings
 
        // XXX ! Refactor all the wintype_* arrays into a struct
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/src/event.c new/picom-8.2/src/event.c
--- old/picom-8/src/event.c     2020-04-21 20:33:17.000000000 +0200
+++ new/picom-8.2/src/event.c   2020-10-24 10:44:12.000000000 +0200
@@ -410,6 +410,7 @@
        region_t region;
        pixman_region32_init_rects(&region, rects, nrects);
        add_damage(ps, &region);
+       pixman_region32_fini(&region);
 }
 
 static inline void ev_expose(session_t *ps, xcb_expose_event_t *ev) {
@@ -590,11 +591,9 @@
                set_ignore_cookie(
                    ps, xcb_damage_subtract(ps->c, w->damage, XCB_NONE, 
XCB_NONE));
        } else {
-               xcb_xfixes_region_t tmp = x_new_id(ps->c);
-               xcb_xfixes_create_region(ps->c, tmp, 0, NULL);
-               set_ignore_cookie(ps, xcb_damage_subtract(ps->c, w->damage, 
XCB_NONE, tmp));
-               x_fetch_region(ps->c, tmp, &parts);
-               xcb_xfixes_destroy_region(ps->c, tmp);
+               set_ignore_cookie(
+                   ps, xcb_damage_subtract(ps->c, w->damage, XCB_NONE, 
ps->damaged_region));
+               x_fetch_region(ps->c, ps->damaged_region, &parts);
                pixman_region32_translate(&parts, w->g.x + w->g.border_width,
                                          w->g.y + w->g.border_width);
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/src/options.c new/picom-8.2/src/options.c
--- old/picom-8/src/options.c   2020-04-21 20:33:17.000000000 +0200
+++ new/picom-8.2/src/options.c 2020-10-24 10:44:12.000000000 +0200
@@ -782,7 +782,11 @@
                P_CASELONG(309, unredir_if_possible_delay);
                case 310:
                        // --write-pid-path
+                       free(opt->write_pid_path);
                        opt->write_pid_path = strdup(optarg);
+                       if (*opt->write_pid_path != '/') {
+                               log_warn("--write-pid-path is not an absolute 
path");
+                       }
                        break;
                P_CASEBOOL(311, vsync_use_glfinish);
                case 312:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/src/picom.c new/picom-8.2/src/picom.c
--- old/picom-8/src/picom.c     2020-04-21 20:33:17.000000000 +0200
+++ new/picom-8.2/src/picom.c   2020-10-24 10:44:12.000000000 +0200
@@ -1310,7 +1310,13 @@
 
 static void refresh_windows(session_t *ps) {
        win_stack_foreach_managed(w, &ps->window_stack) {
-               win_process_flags(ps, w);
+               win_process_update_flags(ps, w);
+       }
+}
+
+static void refresh_images(session_t *ps) {
+       win_stack_foreach_managed(w, &ps->window_stack) {
+               win_process_image_flags(ps, w);
        }
 }
 
@@ -1351,7 +1357,7 @@
                // stale.
                handle_root_flags(ps);
 
-               // Process window flags
+               // Process window flags (window mapping)
                refresh_windows(ps);
 
                {
@@ -1363,6 +1369,9 @@
                        free(r);
                }
 
+               // Process window flags (stale images)
+               refresh_images(ps);
+
                e = xcb_request_check(ps->c, xcb_ungrab_server_checked(ps->c));
                if (e) {
                        log_fatal_x_error(e, "failed to ungrab x server");
@@ -1741,6 +1750,12 @@
                                                          
XCB_XFIXES_MINOR_VERSION)
                                     .sequence);
 
+       ps->damaged_region = x_new_id(ps->c);
+       if (!XCB_AWAIT_VOID(xcb_xfixes_create_region, ps->c, 
ps->damaged_region, 0, NULL)) {
+               log_fatal("Failed to create a XFixes region");
+               goto err;
+       }
+
        ext_info = xcb_get_extension_data(ps->c, &xcb_glx_id);
        if (ext_info && ext_info->present) {
                ps->glx_exists = true;
@@ -2270,6 +2285,11 @@
                ps->debug_window = XCB_NONE;
        }
 
+       if (ps->damaged_region != XCB_NONE) {
+               xcb_xfixes_destroy_region(ps->c, ps->damaged_region);
+               ps->damaged_region = XCB_NONE;
+       }
+
        if (ps->o.experimental_backends) {
                // backend is deinitialized in unredirect()
                assert(ps->backend_data == NULL);
@@ -2383,6 +2403,7 @@
        // Main loop
        bool quit = false;
        int ret_code = 0;
+       char *pid_file = NULL;
 
        do {
                Display *dpy = XOpenDisplay(NULL);
@@ -2425,6 +2446,9 @@
                }
                session_run(ps_g);
                quit = ps_g->quit;
+               if (quit && ps_g->o.write_pid_path) {
+                       pid_file = strdup(ps_g->o.write_pid_path);
+               }
                session_destroy(ps_g);
                free(ps_g);
                ps_g = NULL;
@@ -2434,6 +2458,10 @@
        } while (!quit);
 
        free(config_file);
+       if (pid_file) {
+               log_trace("remove pid file %s", pid_file);
+               unlink(pid_file);
+       }
 
        log_deinit_tls();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/src/utils.h new/picom-8.2/src/utils.h
--- old/picom-8/src/utils.h     2020-04-21 20:33:17.000000000 +0200
+++ new/picom-8.2/src/utils.h   2020-10-24 10:44:12.000000000 +0200
@@ -135,10 +135,6 @@
 /// clamp `val` into interval [min, max]
 #define clamp(val, min, max) max2(min2(val, max), min)
 
-static inline int attr_const popcountl(unsigned long a) {
-       return __builtin_popcountl(a);
-}
-
 /**
  * Normalize a double value to a specific range.
  *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/src/win.c new/picom-8.2/src/win.c
--- old/picom-8/src/win.c       2020-04-21 20:33:17.000000000 +0200
+++ new/picom-8.2/src/win.c     2020-10-24 10:44:12.000000000 +0200
@@ -320,12 +320,21 @@
        }
 }
 
-void win_process_flags(session_t *ps, struct managed_win *w) {
+void win_process_update_flags(session_t *ps, struct managed_win *w) {
        if (win_check_flags_all(w, WIN_FLAGS_MAPPED)) {
                map_win_start(ps, w);
                win_clear_flags(w, WIN_FLAGS_MAPPED);
        }
 
+       if (win_check_flags_all(w, WIN_FLAGS_CLIENT_STALE)) {
+               win_recheck_client(ps, w);
+               win_clear_flags(w, WIN_FLAGS_CLIENT_STALE);
+       }
+}
+
+void win_process_image_flags(session_t *ps, struct managed_win *w) {
+       assert(!win_check_flags_all(w, WIN_FLAGS_MAPPED));
+
        // Not a loop
        while (win_check_flags_any(w, WIN_FLAGS_IMAGES_STALE) &&
               !win_check_flags_all(w, WIN_FLAGS_IMAGE_ERROR)) {
@@ -370,11 +379,6 @@
        if (win_check_flags_any(w, WIN_FLAGS_IMAGES_STALE)) {
                win_clear_flags(w, WIN_FLAGS_IMAGES_STALE);
        }
-
-       if (win_check_flags_all(w, WIN_FLAGS_CLIENT_STALE)) {
-               win_recheck_client(ps, w);
-               win_clear_flags(w, WIN_FLAGS_CLIENT_STALE);
-       }
 }
 
 /**
@@ -1886,7 +1890,7 @@
                // Clear PIXMAP_STALE flag, since the window is destroyed there 
is no
                // pixmap available so STALE doesn't make sense.
                // Do this before changing the window state to destroying
-               win_clear_flags(mw, WIN_FLAGS_PIXMAP_STALE);
+               win_clear_flags(mw, WIN_FLAGS_IMAGES_STALE);
 
                // Update state flags of a managed window
                mw->state = WSTATE_DESTROYING;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/src/win.h new/picom-8.2/src/win.h
--- old/picom-8/src/win.h       2020-04-21 20:33:17.000000000 +0200
+++ new/picom-8.2/src/win.h     2020-10-24 10:44:12.000000000 +0200
@@ -254,8 +254,10 @@
 #endif
 };
 
-/// Process pending images flags on a window. Has to be called in X critical 
section
-void win_process_flags(session_t *ps, struct managed_win *w);
+/// Process pending updates/images flags on a window. Has to be called in X 
critical
+/// section
+void win_process_update_flags(session_t *ps, struct managed_win *w);
+void win_process_image_flags(session_t *ps, struct managed_win *w);
 /// Bind a shadow to the window, with color `c` and shadow kernel `kernel`
 bool win_bind_shadow(struct backend_base *b, struct managed_win *w, struct 
color c,
                      struct conv *kernel);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/src/x.c new/picom-8.2/src/x.c
--- old/picom-8/src/x.c 2020-04-21 20:33:17.000000000 +0200
+++ new/picom-8.2/src/x.c       2020-10-24 10:44:12.000000000 +0200
@@ -612,10 +612,10 @@
                return (struct xvisual_info){-1, -1, -1, -1, -1, 0};
        }
 
-       int red_size = popcountl(pictfmt->direct.red_mask),
-           blue_size = popcountl(pictfmt->direct.blue_mask),
-           green_size = popcountl(pictfmt->direct.green_mask),
-           alpha_size = popcountl(pictfmt->direct.alpha_mask);
+       int red_size = popcntul(pictfmt->direct.red_mask),
+           blue_size = popcntul(pictfmt->direct.blue_mask),
+           green_size = popcntul(pictfmt->direct.green_mask),
+           alpha_size = popcntul(pictfmt->direct.alpha_mask);
 
        return (struct xvisual_info){
            .red_size = red_size,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/tests/configs/issue394.conf 
new/picom-8.2/tests/configs/issue394.conf
--- old/picom-8/tests/configs/issue394.conf     1970-01-01 01:00:00.000000000 
+0100
+++ new/picom-8.2/tests/configs/issue394.conf   2020-10-24 10:44:12.000000000 
+0200
@@ -0,0 +1,4 @@
+fading = true;
+fade-in-step = 1;
+fade-out-step = 0.01;
+shadow = true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/tests/run_tests.sh 
new/picom-8.2/tests/run_tests.sh
--- old/picom-8/tests/run_tests.sh      2020-04-21 20:33:17.000000000 +0200
+++ new/picom-8.2/tests/run_tests.sh    2020-10-24 10:44:12.000000000 +0200
@@ -15,3 +15,4 @@
 ./run_one_test.sh $exe configs/issue314.conf testcases/issue314_2.py
 ./run_one_test.sh $exe configs/issue314.conf testcases/issue314_3.py
 ./run_one_test.sh $exe /dev/null testcases/issue299.py
+./run_one_test.sh $exe configs/issue394.conf testcases/issue394.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/tests/testcases/common.py 
new/picom-8.2/tests/testcases/common.py
--- old/picom-8/tests/testcases/common.py       2020-04-21 20:33:17.000000000 
+0200
+++ new/picom-8.2/tests/testcases/common.py     2020-10-24 10:44:12.000000000 
+0200
@@ -28,6 +28,11 @@
     str_type = to_atom(conn, "STRING")
     conn.core.ChangePropertyChecked(xproto.PropMode.Replace, wid, prop_name, 
str_type, 8, len(name), name).check()
 
+def set_window_size(conn, wid, width, height):
+    value_mask = xproto.ConfigWindow.Width | xproto.ConfigWindow.Height
+    value_list = [width, height]
+    conn.core.ConfigureWindowChecked(wid, value_mask, value_list).check()
+
 def find_picom_window(conn):
     prop_name = to_atom(conn, "WM_NAME")
     setup = conn.get_setup()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/picom-8/tests/testcases/issue394.py 
new/picom-8.2/tests/testcases/issue394.py
--- old/picom-8/tests/testcases/issue394.py     1970-01-01 01:00:00.000000000 
+0100
+++ new/picom-8.2/tests/testcases/issue394.py   2020-10-24 10:44:12.000000000 
+0200
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+
+import xcffib.xproto as xproto
+import xcffib
+import time
+from common import set_window_name, set_window_size
+
+conn = xcffib.connect()
+setup = conn.get_setup()
+root = setup.roots[0].root
+visual = setup.roots[0].root_visual
+depth = setup.roots[0].root_depth
+
+# issue 394 is caused by a window getting a size update just before destroying 
leading to a shadow update on destroyed window.
+wid = conn.generate_id()
+print("Window id is ", hex(wid))
+
+# Create a window
+conn.core.CreateWindowChecked(depth, wid, root, 0, 0, 100, 100, 0, 
xproto.WindowClass.InputOutput, visual, 0, []).check()
+
+# Set Window name so it doesn't get a shadow
+set_window_name(conn, wid, "Test Window")
+
+# Map the window
+print("mapping")
+conn.core.MapWindowChecked(wid).check()
+
+time.sleep(0.5)
+
+# Resize the window and destroy
+print("resize and destroy")
+set_window_size(conn, wid, 150, 150)
+conn.core.DestroyWindowChecked(wid).check()
+
+time.sleep(0.5)
_______________________________________________
openSUSE Commits mailing list -- [email protected]
To unsubscribe, email [email protected]
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/[email protected]

Reply via email to