Bug 691846

Summary: [patch] mupdf 0.7 does not handle WM_DELETE_WINDOW messages on X11
Product: MuPDF Reporter: Roland Smith <rsmith>
Component: mupdfAssignee: Tor Andersson <tor.andersson>
Status: RESOLVED FIXED    
Severity: normal CC: dsdutkiewicz
Priority: P4    
Version: unspecified   
Hardware: PC   
OS: FreeBSD   
Customer: Word Size: ---
Attachments: Patch for apps/x11_main.c to catch WM_DELETE_WINDOW message.

Description Roland Smith 2010-12-18 11:52:53 UTC
Created attachment 7045 [details]
Patch for apps/x11_main.c to catch WM_DELETE_WINDOW message.

If I press the close button on the window on X11, nothing happens. The attached patch against apps/x11_main.c from version 0.7 fixes this.
Comment 1 Daniel Dutkiewicz 2011-02-03 06:17:54 UTC
@@ -740,11 +740,11 @@ int main(int argc, char **argv)
 					xevt.xselectionrequest.property,
 					xevt.xselectionrequest.time);
 				break;
 
 			case ClientMessage:
-				if (xevt.xclient.format == 33 && xevt.xclient.data.l[0] == WM_DELETE_WINDOW)
+				if (xevt.xclient.format == 32 && xevt.xclient.data.l[0] == WM_DELETE_WINDOW)
 					closing = 1;
 				break;
 			}
 		}
 		while (!closing && XPending(xdpy));

--

it's needs to be format "32" not "33". i've tested both and only 32 works this is what is stated in the forereferenced patch but the patch tor added says 33
Comment 2 Tor Andersson 2011-02-03 08:45:47 UTC
D'oh! Didn't see that typo slip in.