better fix for slow scrolling, from upstream repo
This commit is contained in:
parent
3001063087
commit
df15ecb21c
@ -1,4 +1,4 @@
|
|||||||
# $OpenBSD: Makefile,v 1.41 2013/04/07 11:38:06 sthen Exp $
|
# $OpenBSD: Makefile,v 1.42 2013/04/29 12:54:00 sthen Exp $
|
||||||
|
|
||||||
COMMENT = graphic library, pdf parser, viewer and utilities
|
COMMENT = graphic library, pdf parser, viewer and utilities
|
||||||
|
|
||||||
@ -6,7 +6,7 @@ V = 1.2
|
|||||||
DISTNAME = mupdf-$V-source
|
DISTNAME = mupdf-$V-source
|
||||||
EXTRACT_SUFX = .zip
|
EXTRACT_SUFX = .zip
|
||||||
PKGNAME = mupdf-${V:S/-rc/rc/}
|
PKGNAME = mupdf-${V:S/-rc/rc/}
|
||||||
REVISION = 1
|
REVISION = 2
|
||||||
|
|
||||||
CATEGORIES = textproc x11
|
CATEGORIES = textproc x11
|
||||||
|
|
||||||
|
27
textproc/mupdf/patches/patch-apps_pdfapp_c
Normal file
27
textproc/mupdf/patches/patch-apps_pdfapp_c
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
$OpenBSD: patch-apps_pdfapp_c,v 1.1 2013/04/29 12:54:00 sthen Exp $
|
||||||
|
|
||||||
|
From a20d6a58ebc6c60ff44f0f385cf399ee6fca55bf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Robin Watts <Robin.Watts@artifex.com>
|
||||||
|
Date: Fri, 26 Apr 2013 12:21:17 +0100
|
||||||
|
Subject: [PATCH] Fix dirty flag handling bug in X11 event loop.
|
||||||
|
|
||||||
|
--- apps/pdfapp.c.orig Mon Apr 29 13:47:16 2013
|
||||||
|
+++ apps/pdfapp.c Mon Apr 29 13:47:53 2013
|
||||||
|
@@ -1688,7 +1688,6 @@ void pdfapp_postblit(pdfapp_t *app)
|
||||||
|
if (llama >= 256)
|
||||||
|
{
|
||||||
|
/* Completed. */
|
||||||
|
- app->in_transit = 0;
|
||||||
|
fz_drop_pixmap(app->ctx, app->image);
|
||||||
|
app->image = app->new_image;
|
||||||
|
app->new_image = NULL;
|
||||||
|
@@ -1700,4 +1699,9 @@ void pdfapp_postblit(pdfapp_t *app)
|
||||||
|
else
|
||||||
|
fz_generate_transition(app->image, app->old_image, app->new_image, llama, &app->transition);
|
||||||
|
winrepaint(app);
|
||||||
|
+ if (llama >= 256)
|
||||||
|
+ {
|
||||||
|
+ /* Completed. */
|
||||||
|
+ app->in_transit = 0;
|
||||||
|
+ }
|
||||||
|
}
|
@ -1,14 +1,52 @@
|
|||||||
$OpenBSD: patch-apps_x11_main_c,v 1.3 2013/04/07 11:38:06 sthen Exp $
|
$OpenBSD: patch-apps_x11_main_c,v 1.4 2013/04/29 12:54:00 sthen Exp $
|
||||||
|
|
||||||
http://bugs.ghostscript.com/show_bug.cgi?id=693679
|
From a20d6a58ebc6c60ff44f0f385cf399ee6fca55bf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Robin Watts <Robin.Watts@artifex.com>
|
||||||
|
Date: Fri, 26 Apr 2013 12:21:17 +0100
|
||||||
|
Subject: [PATCH] Fix dirty flag handling bug in X11 event loop.
|
||||||
|
|
||||||
--- apps/x11_main.c.orig Sun Apr 7 12:28:50 2013
|
--- apps/x11_main.c.orig Mon Apr 29 13:48:12 2013
|
||||||
+++ apps/x11_main.c Sun Apr 7 12:29:05 2013
|
+++ apps/x11_main.c Mon Apr 29 13:49:12 2013
|
||||||
@@ -840,6 +840,7 @@ int main(int argc, char **argv)
|
@@ -79,6 +79,7 @@ static int mapped = 0;
|
||||||
break;
|
static Cursor xcarrow, xchand, xcwait, xccaret;
|
||||||
|
static int justcopied = 0;
|
||||||
|
static int dirty = 0;
|
||||||
|
+static int transition_dirty = 0;
|
||||||
|
static int dirtysearch = 0;
|
||||||
|
static char *password = "";
|
||||||
|
static XColor xbgcolor;
|
||||||
|
@@ -504,6 +505,8 @@ static void winblit(pdfapp_t *app)
|
||||||
|
void winrepaint(pdfapp_t *app)
|
||||||
|
{
|
||||||
|
dirty = 1;
|
||||||
|
+ if (app->in_transit)
|
||||||
|
+ transition_dirty = 1;
|
||||||
|
}
|
||||||
|
|
||||||
case MotionNotify:
|
void winrepaintsearch(pdfapp_t *app)
|
||||||
+ while(XCheckTypedEvent(xdpy,MotionNotify,&xevt));
|
@@ -779,7 +782,7 @@ int main(int argc, char **argv)
|
||||||
oldx = xevt.xmotion.x;
|
|
||||||
oldy = xevt.xmotion.y;
|
while (!closing)
|
||||||
onmouse(xevt.xmotion.x, xevt.xmotion.y, 0, xevt.xmotion.state, 0);
|
{
|
||||||
|
- while (!closing && XPending(xdpy) && !dirty)
|
||||||
|
+ while (!closing && XPending(xdpy) && !transition_dirty)
|
||||||
|
{
|
||||||
|
XNextEvent(xdpy, &xevt);
|
||||||
|
|
||||||
|
@@ -886,6 +889,7 @@ int main(int argc, char **argv)
|
||||||
|
else if (dirtysearch)
|
||||||
|
winblitsearch(&gapp);
|
||||||
|
dirty = 0;
|
||||||
|
+ transition_dirty = 0;
|
||||||
|
dirtysearch = 0;
|
||||||
|
pdfapp_postblit(&gapp);
|
||||||
|
}
|
||||||
|
@@ -899,7 +903,7 @@ int main(int argc, char **argv)
|
||||||
|
timeradd(&now, &tmo, &tmo_at);
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (XPending(xdpy) || dirty)
|
||||||
|
+ if (XPending(xdpy) || transition_dirty)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
timeout = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user