Bug 691846 - [patch] mupdf 0.7 does not handle WM_DELETE_WINDOW messages on X11
Summary: [patch] mupdf 0.7 does not handle WM_DELETE_WINDOW messages on X11
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: unspecified
Hardware: PC FreeBSD
: P4 normal
Assignee: Tor Andersson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-18 11:52 UTC by Roland Smith
Modified: 2011-02-03 08:45 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
Patch for apps/x11_main.c to catch WM_DELETE_WINDOW message. (1.01 KB, text/x-csrc)
2010-12-18 11:52 UTC, Roland Smith
Details

Note You need to log in before you can comment on or make changes to this bug.
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.