diff -Nru pikopixel.app-1.0-b9b/debian/changelog pikopixel.app-1.0-b9b/debian/changelog --- pikopixel.app-1.0-b9b/debian/changelog 2018-04-15 07:08:31.000000000 +0000 +++ pikopixel.app-1.0-b9b/debian/changelog 2018-05-15 19:03:04.000000000 +0000 @@ -1,3 +1,10 @@ +pikopixel.app (1.0-b9b-1ubuntu1) bionic; urgency=medium + + * debian/patches/lp1770777.patch: Apply upstream fixes implemented by a + version bump to address a program crash issue. (LP: #1770777) + + -- Thomas Ward Tue, 15 May 2018 15:03:04 -0400 + pikopixel.app (1.0-b9b-1) unstable; urgency=medium [ Josh Freeman ] diff -Nru pikopixel.app-1.0-b9b/debian/control pikopixel.app-1.0-b9b/debian/control --- pikopixel.app-1.0-b9b/debian/control 2018-04-15 07:06:57.000000000 +0000 +++ pikopixel.app-1.0-b9b/debian/control 2018-05-15 19:03:04.000000000 +0000 @@ -1,7 +1,8 @@ Source: pikopixel.app Section: gnustep Priority: optional -Maintainer: Debian GNUstep maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian GNUstep maintainers Uploaders: Gürkan Myczko , Yavor Doganov Build-Depends: debhelper (>= 11), diff -Nru pikopixel.app-1.0-b9b/debian/patches/lp1770777.patch pikopixel.app-1.0-b9b/debian/patches/lp1770777.patch --- pikopixel.app-1.0-b9b/debian/patches/lp1770777.patch 1970-01-01 00:00:00.000000000 +0000 +++ pikopixel.app-1.0-b9b/debian/patches/lp1770777.patch 2018-05-15 19:03:04.000000000 +0000 @@ -0,0 +1,136 @@ +Description: Apply upstream changes to repair a crash issue. +Origin: upstream, no URL available (provided as a full version bump diff) +Bug-Ubuntu: https://launchpad.net/bugs/1770777 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +diff -Naur -p1 PikoPixel.Sources.1.0-b9b/PikoPixel/GNUmakefile PikoPixel.Sources.1.0-b9c/PikoPixel/GNUmakefile +--- PikoPixel.Sources.1.0-b9b/PikoPixel/GNUmakefile 2018-04-13 17:15:47.000000000 -0400 ++++ PikoPixel.Sources.1.0-b9c/PikoPixel/GNUmakefile 2018-04-30 20:28:05.000000000 -0400 +@@ -209,2 +209,3 @@ PikoPixel_OBJC_FILES = \ + PPGNUstepGlue_ResizeControl.m \ ++ PPGNUstepGlue_ScrollerAutohiding.m \ + PPGNUstepGlue_SegmentedCellTracking.m \ +diff -Naur -p1 PikoPixel.Sources.1.0-b9b/PikoPixel/PPGNUstepGlue_ScrollerAutohiding.m PikoPixel.Sources.1.0-b9c/PikoPixel/PPGNUstepGlue_ScrollerAutohiding.m +--- PikoPixel.Sources.1.0-b9b/PikoPixel/PPGNUstepGlue_ScrollerAutohiding.m 1969-12-31 19:00:00.000000000 -0500 ++++ PikoPixel.Sources.1.0-b9c/PikoPixel/PPGNUstepGlue_ScrollerAutohiding.m 2018-05-02 20:30:08.000000000 -0400 +@@ -0,0 +1,120 @@ ++/* ++ PPGNUstepGlue_ScrollerAutohiding.m ++ ++ Copyright 2014-2018 Josh Freeman ++ http://www.twilightedge.com ++ ++ This file is part of PikoPixel for GNUstep. ++ PikoPixel is a graphical application for drawing & editing pixel-art images. ++ ++ PikoPixel is free software: you can redistribute it and/or modify it under ++ the terms of the GNU Affero General Public License as published by the ++ Free Software Foundation, either version 3 of the License, or (at your ++ option) any later version approved for PikoPixel by its copyright holder (or ++ an authorized proxy). ++ ++ PikoPixel 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 Affero General Public License for more ++ details. ++ ++ You should have received a copy of the GNU Affero General Public License ++ along with this program. If not, see . ++*/ ++ ++// Fix for a scroller-autohiding issue that can cause the app to freeze: If the user resizes ++// the PPDocumentWindow to within a pixel or two of the actual width/height of the canvas, ++// sometimes this can cause an infinite-recursive loop that will eventually overflow the stack: ++// clipview resize -> hidden scroller is auto-shown -> scroller change causes clipview resize -> ++// visible scroller is auto-hidden -> scroller change causes clipview resize -> hidden scroller ++// is auto-shown -> etc. ++// This issue only appears on GNUstep (no freezes on OS X), but it's probably ++// PikoPixel-specific, due to the way PPCanvasView resizes itself in reponse to ++// enclosing-clipview notifications, as well as the way PikoPixel's custom GNUstep theme ++// resizes clipviews after -[NSScrollView tile] in order to maintain a custom gap between the ++// clipview & scrollers (2-pixels instead of 1-pixel). ++// The workaround is to break the cycle of hiding/showing/hiding scrollers by patching ++// -[NSScrollView tile] to keep track of its level of recursion, and disallowing the hiding of ++// visible scrollers from within recursive calls. (If the clipview is large enough so the ++// scrollers do need to be hidden, they will have been hidden from within the initial ++// (nonrecursive) call to -[NSScrollView tile], where scroller hiding is allowed). ++ ++#ifdef GNUSTEP ++ ++#import ++#import "NSObject_PPUtilities.h" ++#import "PPAppBootUtilities.h" ++ ++ ++static bool gDisallowScrollerHiding = NO; ++ ++ ++@implementation NSObject (PPGNUstepGlue_ScrollerAutohiding) ++ +++ (void) ppGSGlue_ScrollerAutohiding_InstallPatches ++{ ++ macroSwizzleInstanceMethod(NSScrollView, tile, ppGSPatch_ScrollerAutohiding_Tile); ++ ++ macroSwizzleInstanceMethod(NSScrollView, setHasVerticalScroller:, ++ ppGSPatch_SetHasVerticalScroller:); ++ ++ macroSwizzleInstanceMethod(NSScrollView, setHasHorizontalScroller:, ++ ppGSPatch_SetHasHorizontalScroller:); ++} ++ +++ (void) load ++{ ++ macroPerformNSObjectSelectorAfterAppLoads(ppGSGlue_ScrollerAutohiding_InstallPatches); ++} ++ ++@end ++ ++@implementation NSScrollView (PPGNUstepGlue_ScrollerAutohiding) ++ ++- (void) ppGSPatch_ScrollerAutohiding_Tile ++{ ++ static int recursionCount = 0; ++ bool oldDisallowScrollerHiding = gDisallowScrollerHiding; ++ ++ if (recursionCount > 0) ++ { ++ gDisallowScrollerHiding = YES; ++ } ++ ++ recursionCount++; ++ ++ [self ppGSPatch_ScrollerAutohiding_Tile]; ++ ++ recursionCount--; ++ ++ gDisallowScrollerHiding = oldDisallowScrollerHiding; ++} ++ ++- (void) ppGSPatch_SetHasVerticalScroller: (BOOL) flag ++{ ++ if (!flag ++ && gDisallowScrollerHiding ++ && [self hasVerticalScroller]) ++ { ++ flag = YES; ++ } ++ ++ [self ppGSPatch_SetHasVerticalScroller: flag]; ++} ++ ++- (void) ppGSPatch_SetHasHorizontalScroller: (BOOL) flag ++{ ++ if (!flag ++ && gDisallowScrollerHiding ++ && [self hasHorizontalScroller]) ++ { ++ flag = YES; ++ } ++ ++ [self ppGSPatch_SetHasHorizontalScroller: flag]; ++} ++ ++@end ++ ++#endif // GNUSTEP ++ diff -Nru pikopixel.app-1.0-b9b/debian/patches/series pikopixel.app-1.0-b9b/debian/patches/series --- pikopixel.app-1.0-b9b/debian/patches/series 2018-03-04 22:15:09.000000000 +0000 +++ pikopixel.app-1.0-b9b/debian/patches/series 2018-05-15 19:03:04.000000000 +0000 @@ -1 +1,2 @@ desktop-file.patch +lp1770777.patch