Bug 691965 - two patches: turn gapp in x11_main into a variable main and refer by the passed app
Summary: two patches: turn gapp in x11_main into a variable main and refer by the pass...
Status: RESOLVED DUPLICATE of bug 691330
Alias: None
Product: MuPDF
Classification: Unclassified
Component: apps (show other bugs)
Version: unspecified
Hardware: PC Linux
: P4 normal
Assignee: Tor Andersson
QA Contact: Bug traffic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-14 21:02 UTC by Daniel Dutkiewicz
Modified: 2011-04-10 14:11 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
first patch: remove gapp global usage in x11_main.c (8.81 KB, patch)
2011-02-14 21:02 UTC, Daniel Dutkiewicz
Details | Diff
second patch: Add o key to clone open pdf in new window (3.01 KB, patch)
2011-02-14 21:03 UTC, Daniel Dutkiewicz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Dutkiewicz 2011-02-14 21:02:34 UTC
Created attachment 7245 [details]
first patch: remove gapp global usage in x11_main.c

this makes the code more regular but is a big patch although it really changes no functionality of the program (attachment commit-6d89c37)

the second patch: (attachment commit-6d89c37)
- adds a clone key 'o'; this forks and execs mupdf like mupdf <filename> <pageno> (i would have liked it to save more of mupdf's application state so that the new window would be substituable for the old one but i had to keep only what the new mupdf has command line options for which is enough)
- marks the pdf fd as close on exec; this is needed or else the fork inherits the old mupdf's open file discriptor
- removes the global filename from x11_main; last of the fix up from the last patch feel free to regroup the changes
- applies realpath on filename; this is needed as without it the filename saved in app->filename can sometimes be relative for mupdf <filename> to work the path needs to be absolute

the first patch must be applied before the second

i here by assign all rights to these patches to Tor and ask that i be credited for them
Comment 1 Daniel Dutkiewicz 2011-02-14 21:03:29 UTC
Created attachment 7246 [details]
second patch: Add o key to clone open pdf in new window
Comment 2 Tor Andersson 2011-04-10 14:11:23 UTC

*** This bug has been marked as a duplicate of bug 691330 ***