diff -Nru metacity-3.20.3/debian/changelog metacity-3.20.3/debian/changelog --- metacity-3.20.3/debian/changelog 2016-08-13 18:12:01.000000000 +0000 +++ metacity-3.20.3/debian/changelog 2016-10-04 12:57:03.000000000 +0000 @@ -1,3 +1,10 @@ +metacity (1:3.20.3-1ubuntu2) yakkety; urgency=medium + + * Backport upstream patch to fix stack order handling when windows + are unmapped (no_remove_on_unmap.diff, LP: #1614050). + + -- Dmitry Shachnev Tue, 04 Oct 2016 15:57:03 +0300 + metacity (1:3.20.3-1ubuntu1) yakkety; urgency=medium * Merge with Debian unstable, remaining changes: diff -Nru metacity-3.20.3/debian/patches/no_remove_on_unmap.diff metacity-3.20.3/debian/patches/no_remove_on_unmap.diff --- metacity-3.20.3/debian/patches/no_remove_on_unmap.diff 1970-01-01 00:00:00.000000000 +0000 +++ metacity-3.20.3/debian/patches/no_remove_on_unmap.diff 2016-10-04 12:57:01.000000000 +0000 @@ -0,0 +1,38 @@ +Description: compositor: do not remove window on UnmapNotify event +Origin: upstream, https://git.gnome.org/browse/metacity/commit/?id=b21f3aed6fefa433 +Bug: https://bugs.launchpad.net/bugs/1614050 +Last-Update: 2016-10-04 + +--- a/src/compositor/compositor-xrender.c ++++ b/src/compositor/compositor-xrender.c +@@ -3242,6 +3242,7 @@ + MetaCompositorXRender *xrc; + MetaFrame *frame; + Window xwindow; ++ MetaCompWindow *cw; + + xrc = (MetaCompositorXRender *) compositor; + frame = meta_window_get_frame (window); +@@ -3251,7 +3252,21 @@ + else + xwindow = meta_window_get_xwindow (window); + +- destroy_win (xrc->display, xwindow, FALSE); ++ cw = find_window_in_display (xrc->display, xwindow); ++ if (cw == NULL) ++ return; ++ ++ cw->attrs.map_state = IsUnmapped; ++ cw->damaged = FALSE; ++ ++ if (cw->extents != None) ++ { ++ dump_xserver_region ("destroy_win", xrc->display, cw->extents); ++ add_damage (cw->screen, cw->extents); ++ cw->extents = None; ++ } ++ ++ free_win (cw, FALSE); + } + + static void diff -Nru metacity-3.20.3/debian/patches/series metacity-3.20.3/debian/patches/series --- metacity-3.20.3/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ metacity-3.20.3/debian/patches/series 2016-10-04 12:54:38.000000000 +0000 @@ -0,0 +1 @@ +no_remove_on_unmap.diff