diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2013-07-30 13:38:10 +0200 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2013-08-24 23:38:01 +0200 |
commit | cfcf1a2934bc5d6c7b7985a7bc721a3250c7ee23 (patch) | |
tree | 84f5b8f0c944c8921fa283def85a97aa8e9f9b09 /platform | |
parent | 67af59cf866f9be06f8b51d6fac7572c3458f5ce (diff) | |
download | mupdf-cfcf1a2934bc5d6c7b7985a7bc721a3250c7ee23.tar.xz |
Generalize search blitting in x11 to include page number.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/x11/x11_main.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/platform/x11/x11_main.c b/platform/x11/x11_main.c index 5de97187..8f992345 100644 --- a/platform/x11/x11_main.c +++ b/platform/x11/x11_main.c @@ -425,7 +425,7 @@ static void fillrect(int x, int y, int w, int h) XFillRectangle(xdpy, xwin, xgc, x, y, w, h); } -static void winblitsearch(pdfapp_t *app) +static void winblitstatusbar(pdfapp_t *app) { if (gapp.isediting) { @@ -435,6 +435,12 @@ static void winblitsearch(pdfapp_t *app) fillrect(0, 0, gapp.winw, 30); windrawstring(&gapp, 10, 20, buf); } + else if (showingpage) + { + char buf[42]; + snprintf(buf, sizeof buf, "Page %d/%d", gapp.pageno, gapp.pagecount); + windrawstringxor(&gapp, 10, 20, buf); + } } static void winblit(pdfapp_t *app) @@ -507,14 +513,7 @@ static void winblit(pdfapp_t *app) justcopied = 1; } - winblitsearch(app); - - if (showingpage) - { - char buf[42]; - snprintf(buf, sizeof buf, "Page %d/%d", gapp.pageno, gapp.pagecount); - windrawstringxor(&gapp, 10, 20, buf); - } + winblitstatusbar(app); } void winrepaint(pdfapp_t *app) @@ -934,7 +933,7 @@ int main(int argc, char **argv) if (dirty) winblit(&gapp); else if (dirtysearch) - winblitsearch(&gapp); + winblitstatusbar(&gapp); dirty = 0; transition_dirty = 0; dirtysearch = 0; |