From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDpjj-0002XM-Iy for qemu-devel@nongnu.org; Sun, 12 Nov 2017 05:43:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDpji-00046w-Qt for qemu-devel@nongnu.org; Sun, 12 Nov 2017 05:43:35 -0500 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:56611) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eDpji-00046R-Kl for qemu-devel@nongnu.org; Sun, 12 Nov 2017 05:43:34 -0500 Received: by mail-wr0-x243.google.com with SMTP id q66so12004155wrb.13 for ; Sun, 12 Nov 2017 02:43:34 -0800 (PST) From: Jindrich Makovicka Date: Sun, 12 Nov 2017 11:42:45 +0100 Message-Id: <20171112104246.10007-8-makovick@gmail.com> In-Reply-To: <20171112104246.10007-1-makovick@gmail.com> References: <20171023210803.20998-1-makovick@gmail.com> <20171112104246.10007-1-makovick@gmail.com> Subject: [Qemu-devel] [PATCH 7/8] sdl2: Do not leave grab when fullscreen List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers , Gerd Hoffmann , Cole Robinson Cc: Jindrich Makovicka Prevents displaying of a doubled mouse pointer when moving the pointer to the screen edges when fullscreen. --- ui/sdl2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index cdc599be48..6feb637739 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -451,8 +451,9 @@ static void handle_mousemotion(SDL_Event *ev) SDL_GetWindowSize(scon->real_window, &scr_w, &scr_h); max_x = scr_w - 1; max_y = scr_h - 1; - if (gui_grab && (ev->motion.x == 0 || ev->motion.y == 0 || - ev->motion.x == max_x || ev->motion.y == max_y)) { + if (gui_grab && !gui_fullscreen + && (ev->motion.x == 0 || ev->motion.y == 0 || + ev->motion.x == max_x || ev->motion.y == max_y)) { sdl_grab_end(scon); } if (!gui_grab && -- 2.15.0