From: "Charles Coffing" Subject: [PATCH] always call SDL_Quit Date: Thu, 12 Oct 2006 12:48:29 -0400 Message-ID: <452E1CEC.D169.003C.0@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartBF9BD9CD.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --=__PartBF9BD9CD.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline When qemu-dm is using SDL and has the mouse captured, a "xm destroy" of = the VM will cause control of the mouse to be lost. This happens because = the qemu-dm is killed with SIGKILL, so atexit doesn't run, so SDL_Quit = doesn't run. Other things could go wrong too -- for example, if the VM = was fullscreen, the video mode probably wouldn't be reset either. There was a discussion a few years ago on the SDL mailing list regarding = the ramifications of not calling SDL_Quit. In short, you don't want to = skip it: http://www.libsdl.org/pipermail/sdl/2004-May/062400.html The attached patch sends a SIGTERM instead of SIGKILL. I've been using a = variation of this patch since our SLES 10 betas, and I've never seen a = case where SIGKILL was actually needed. Please apply. Signed-off-by: Charles Coffing --=__PartBF9BD9CD.0__= Content-Type: application/octet-stream; name="xen-lost-mouse.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="xen-lost-mouse.diff" SW5kZXg6IHhlbi11bnN0YWJsZS90b29scy9weXRob24veGVuL3hlbmQvaW1hZ2UucHkKPT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PQotLS0geGVuLXVuc3RhYmxlLm9yaWcvdG9vbHMvcHl0aG9uL3hlbi94ZW5kL2ltYWdlLnB5 CisrKyB4ZW4tdW5zdGFibGUvdG9vbHMvcHl0aG9uL3hlbi94ZW5kL2ltYWdlLnB5CkBAIC00MTIs NyArNDEyLDcgQEAgY2xhc3MgSFZNSW1hZ2VIYW5kbGVyKEltYWdlSGFuZGxlcik6CiAgICAgICAg IGltcG9ydCBzaWduYWwKICAgICAgICAgaWYgbm90IHNlbGYucGlkOgogICAgICAgICAgICAgcmV0 dXJuCi0gICAgICAgIG9zLmtpbGwoc2VsZi5waWQsIHNpZ25hbC5TSUdLSUxMKQorICAgICAgICBv cy5raWxsKHNlbGYucGlkLCBzaWduYWwuU0lHVEVSTSkKICAgICAgICAgb3Mud2FpdHBpZChzZWxm LnBpZCwgMCkKICAgICAgICAgc2VsZi5waWQgPSAwCiAK --=__PartBF9BD9CD.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__PartBF9BD9CD.0__=--