Bug 691965

Summary: two patches: turn gapp in x11_main into a variable main and refer by the passed app
Product: MuPDF Reporter: Daniel Dutkiewicz <dsdutkiewicz>
Component: appsAssignee: Tor Andersson <tor.andersson>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P4    
Version: unspecified   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: first patch: remove gapp global usage in x11_main.c
second patch: Add o key to clone open pdf in new window

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 ***