From patchwork Wed Feb 12 16:18:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11378749 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF2EA1395 for ; Wed, 12 Feb 2020 16:19:39 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8503320714 for ; Wed, 12 Feb 2020 16:19:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AWCfOJYI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8503320714 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:39910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1uji-0003F6-Cj for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Feb 2020 11:19:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33453) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1uiv-0001dC-OL for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1uit-0004Wd-H7 for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:48 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:31988 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1uit-0004W7-Dj for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581524326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1KIHTt1+MMh3tS0Tz2tXta1bnVaXy/hfgKs9ZpWu9zg=; b=AWCfOJYIVaq4RSHlvuWTUWy4MZTJ5EupIxWBzek619xgVpftw3MhStMpYqPwAi/m1d3kq7 DFwUjYn354Ddua2kU4hvEaujlro5Tz2+2WcsEubiaJ178O/cylrOKstMZmU3FMMEf+O8Dm Pf67i2HtysfDYOKGo2utAllfSpI3gkA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-272-zYWZ7mWCN7yoEiEsbU6ASA-1; Wed, 12 Feb 2020 11:18:44 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7D51B18C8C01; Wed, 12 Feb 2020 16:18:43 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-39.ams2.redhat.com [10.36.117.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id A5E9E5C240; Wed, 12 Feb 2020 16:18:36 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D11669D1F; Wed, 12 Feb 2020 17:18:35 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 01/10] ui/gtk: Update gd_refresh_rate_millihz() to handle VirtualConsole Date: Wed, 12 Feb 2020 17:18:26 +0100 Message-Id: <20200212161835.28576-2-kraxel@redhat.com> In-Reply-To: <20200212161835.28576-1-kraxel@redhat.com> References: <20200212161835.28576-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: zYWZ7mWCN7yoEiEsbU6ASA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , libvir-list@redhat.com, Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Tested-by: Jan Kiszka Message-id: 20200208161048.11311-2-f4bug@amsat.org Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index d18892d1de61..c59297ff4d2e 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1965,11 +1965,11 @@ static GtkWidget *gd_create_menu_machine(GtkDisplayState *s) * If available, return the refresh rate of the display in milli-Hertz, * else return 0. */ -static int gd_refresh_rate_millihz(GtkDisplayState *s) +static int gd_refresh_rate_millihz(GtkWidget *window) { #ifdef GDK_VERSION_3_22 - GdkDisplay *dpy = gtk_widget_get_display(s->window); - GdkWindow *win = gtk_widget_get_window(s->window); + GdkDisplay *dpy = gtk_widget_get_display(window); + GdkWindow *win = gtk_widget_get_window(window); GdkMonitor *monitor = gdk_display_get_monitor_at_window(dpy, win); return gdk_monitor_get_refresh_rate(monitor); @@ -2045,7 +2045,8 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc, vc->gfx.kbd = qkbd_state_init(con); vc->gfx.dcl.con = con; - refresh_rate_millihz = gd_refresh_rate_millihz(s); + refresh_rate_millihz = gd_refresh_rate_millihz(vc->window ? + vc->window : s->window); if (refresh_rate_millihz) { vc->gfx.dcl.update_interval = MILLISEC_PER_SEC / refresh_rate_millihz; } From patchwork Wed Feb 12 16:18:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11378759 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C36E917F0 for ; Wed, 12 Feb 2020 16:21:27 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9A6E320658 for ; Wed, 12 Feb 2020 16:21:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JXzbfw8W" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A6E320658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:39994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1ulS-000704-Q4 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Feb 2020 11:21:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33535) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1uj0-0001kI-0w for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1uiy-0004cT-Nt for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:53 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:59918 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1uiy-0004c2-Jf for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581524332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=31dz9GiRQ4PDE/nDhDuPz2Klvu3+qgLjkLjr4ChUaCs=; b=JXzbfw8WzGEG2tljsJzueyb9AM7Q5xsfxV6vqdd+koiqdmuMcmGLRSn2E/UTMGIAmF+OVP eHY+5V+4OKmykIm+d0jMAZXZ86LuT1IRwYQ6UlvIS6MvKlHT5hfoVB6vLezGTQCpnLaor7 KNuEySODpqNj8HkN6VKUK3evfQLH9hg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-219-PwFQTfzSOhqejfOdHfDcuw-1; Wed, 12 Feb 2020 11:18:49 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 07010DB21; Wed, 12 Feb 2020 16:18:48 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-39.ams2.redhat.com [10.36.117.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9F89360FC1; Wed, 12 Feb 2020 16:18:36 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D976F9CA7; Wed, 12 Feb 2020 17:18:35 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 02/10] ui/gtk: Fix gd_refresh_rate_millihz() when widget window is not realized Date: Wed, 12 Feb 2020 17:18:27 +0100 Message-Id: <20200212161835.28576-3-kraxel@redhat.com> In-Reply-To: <20200212161835.28576-1-kraxel@redhat.com> References: <20200212161835.28576-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: PwFQTfzSOhqejfOdHfDcuw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , libvir-list@redhat.com, Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé gtk_widget_get_window() returns NULL if the widget's window is not realized, and QEMU crashes. Example under gtk 3.22.30 (mate 1.20.1): qemu-system-x86_64: Gdk: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed (gdb) bt #0 0x00007ffff496cf70 in gdk_window_get_origin () from /usr/lib64/libgdk-3.so.0 #1 0x00007ffff49582a0 in gdk_display_get_monitor_at_window () from /usr/lib64/libgdk-3.so.0 #2 0x0000555555bb73e2 in gd_refresh_rate_millihz (window=0x5555579d6280) at ui/gtk.c:1973 #3 gd_vc_gfx_init (view_menu=0x5555579f0590, group=0x0, idx=0, con=, vc=0x5555579d4a90, s=0x5555579d49f0) at ui/gtk.c:2048 #4 gd_create_menu_view (s=0x5555579d49f0) at ui/gtk.c:2149 #5 gd_create_menus (s=0x5555579d49f0) at ui/gtk.c:2188 #6 gtk_display_init (ds=, opts=0x55555661ed80 ) at ui/gtk.c:2256 #7 0x000055555583d5a0 in main (argc=, argv=, envp=) at vl.c:4358 Fixes: c4c00922cc and 28b58f19d2 (display/gtk: get proper refreshrate) Reported-by: Jan Kiszka Signed-off-by: Philippe Mathieu-Daudé Tested-by: Jan Kiszka Message-id: 20200208161048.11311-3-f4bug@amsat.org Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index c59297ff4d2e..850c49bee02a 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1968,14 +1968,16 @@ static GtkWidget *gd_create_menu_machine(GtkDisplayState *s) static int gd_refresh_rate_millihz(GtkWidget *window) { #ifdef GDK_VERSION_3_22 - GdkDisplay *dpy = gtk_widget_get_display(window); GdkWindow *win = gtk_widget_get_window(window); - GdkMonitor *monitor = gdk_display_get_monitor_at_window(dpy, win); - return gdk_monitor_get_refresh_rate(monitor); -#else + if (win) { + GdkDisplay *dpy = gtk_widget_get_display(window); + GdkMonitor *monitor = gdk_display_get_monitor_at_window(dpy, win); + + return gdk_monitor_get_refresh_rate(monitor); + } +#endif return 0; -#endif } static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc, From patchwork Wed Feb 12 16:18:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11378765 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4184917F0 for ; Wed, 12 Feb 2020 16:23:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 18F4521569 for ; Wed, 12 Feb 2020 16:23:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gibOxR1Z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 18F4521569 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1umy-0001ks-AD for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Feb 2020 11:23:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33469) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1uiw-0001eu-8P for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1uiv-0004YM-9G for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:50 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:25368 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1uiv-0004Xk-5k for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581524328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WwAdZkFTA+k84+vbH3AhktyI2fkZKZ5DVj945SvB/nA=; b=gibOxR1ZNGt7DOU6g+BN4dFthnREBBwd/M+yziuRdXZFC1QBc49ij9lsnWH4KTULxhO4Ed a2JXitw59u+Z1ZA+6F/zl+5rQPO5rj5IR3rCEGL5sMGC8V/xPdHlSz3Jgz3Mk31fLaYDo+ IQsxXV6qLWiy/OdGTjwGkVt59eLcK/U= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-391-1ICVHIP1Ny2PsbgOnmzOVg-1; Wed, 12 Feb 2020 11:18:44 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 888B218C8C04; Wed, 12 Feb 2020 16:18:43 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-39.ams2.redhat.com [10.36.117.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 91F565C1B2; Wed, 12 Feb 2020 16:18:36 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E1D5C1FCF2; Wed, 12 Feb 2020 17:18:35 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 03/10] ui: add show-cursor option Date: Wed, 12 Feb 2020 17:18:28 +0100 Message-Id: <20200212161835.28576-4-kraxel@redhat.com> In-Reply-To: <20200212161835.28576-1-kraxel@redhat.com> References: <20200212161835.28576-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: 1ICVHIP1Ny2PsbgOnmzOVg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , libvir-list@redhat.com, Markus Armbruster , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" When enabled, this forces showing the mouse cursor, i.e. do not hide the pointer on mouse grabs. Defaults to off. Signed-off-by: Gerd Hoffmann Reviewed-by: Markus Armbruster Reviewed-by: Ján Tomko --- qapi/ui.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qapi/ui.json b/qapi/ui.json index e04525d8b44b..f8c803fe4328 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -1144,6 +1144,8 @@ # @type: Which DisplayType qemu should use. # @full-screen: Start user interface in fullscreen mode (default: off). # @window-close: Allow to quit qemu with window close button (default: on). +# @show-cursor: Force showing the mouse cursor (default: off). +# (since: 5.0) # @gl: Enable OpenGL support (default: off). # # Since: 2.12 @@ -1153,6 +1155,7 @@ 'base' : { 'type' : 'DisplayType', '*full-screen' : 'bool', '*window-close' : 'bool', + '*show-cursor' : 'bool', '*gl' : 'DisplayGLMode' }, 'discriminator' : 'type', 'data' : { 'gtk' : 'DisplayGTK', From patchwork Wed Feb 12 16:18:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11378761 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A2E4A17F0 for ; Wed, 12 Feb 2020 16:21:29 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7303320658 for ; Wed, 12 Feb 2020 16:21:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WLVcBlMD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7303320658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:39997 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1ulU-00075r-LG for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Feb 2020 11:21:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33509) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1uiy-0001hc-IQ for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1uix-0004aj-GI for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:52 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:43136 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1uix-0004aO-CQ for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581524330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/qaXWGpEbo8t359CPj+Qy/LhybbhjGK3zYbDG2fnAAU=; b=WLVcBlMDpK2tLiSgyr9+jqU8Hj3kdVFTJ2YDmAva0J+l25d0aWV4G0UZrxclPZOS0BbDuc 17j9pl/mt5vyxovwveA0U4a6+azD+nyf0QkowLWQtr/HnwgIZA6FhTjFx52Cd76fvX++1P SOaHG4EQbLsDwoTrpLVnx3nvhVY4s1o= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-110-_4CnannGMaS2jV2QXUXbRA-1; Wed, 12 Feb 2020 11:18:48 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4F8FC8010E0; Wed, 12 Feb 2020 16:18:45 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-39.ams2.redhat.com [10.36.117.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9CCD81001B23; Wed, 12 Feb 2020 16:18:36 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id EA29A31E2A; Wed, 12 Feb 2020 17:18:35 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 04/10] ui: wire up legacy -show-cursor option Date: Wed, 12 Feb 2020 17:18:29 +0100 Message-Id: <20200212161835.28576-5-kraxel@redhat.com> In-Reply-To: <20200212161835.28576-1-kraxel@redhat.com> References: <20200212161835.28576-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: _4CnannGMaS2jV2QXUXbRA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , libvir-list@redhat.com, Markus Armbruster , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Set new show-cursor display option when legacy -show-cursor is specified on the command line. Signed-off-by: Gerd Hoffmann Reviewed-by: Ján Tomko --- vl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vl.c b/vl.c index 7dcb0879c497..5419b3d68200 100644 --- a/vl.c +++ b/vl.c @@ -3554,6 +3554,8 @@ int main(int argc, char **argv, char **envp) break; case QEMU_OPTION_show_cursor: cursor_hide = 0; + dpy.has_show_cursor = true; + dpy.show_cursor = true; break; case QEMU_OPTION_uuid: if (qemu_uuid_parse(optarg, &qemu_uuid) < 0) { From patchwork Wed Feb 12 16:18:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11378751 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DDB0C17F0 for ; Wed, 12 Feb 2020 16:19:43 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B55AF20714 for ; Wed, 12 Feb 2020 16:19:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iSxL7o6N" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B55AF20714 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:39912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1ujm-0003Qr-QH for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Feb 2020 11:19:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33532) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1uiz-0001jX-Nd for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1uiy-0004by-CA for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:53 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:45223 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1uiy-0004bQ-86 for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581524331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=44B7xvdFL9drjnEYHmM0Jft6hxwGiV7s0cphZbAJGac=; b=iSxL7o6NO0h6VXLmZkWOWZ9WOSRd2dMq2l7NlIxIfeK65sBGY8cTCdFCvUcmOp5hcoMWiG Ay5O8XPInLxbJdWmKiy0CYTMQop71hPjaRnE6ZGjkPK571It/kKPdE1dFMvM1gddUuFKpt knIFp09FE23YBBs44ZpXhohIgaPJACo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-370-uPiQqPSjNvuDKSWV3XhifQ-1; Wed, 12 Feb 2020 11:18:46 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 75447101FC6A; Wed, 12 Feb 2020 16:18:45 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-39.ams2.redhat.com [10.36.117.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 55B3F5C1C3; Wed, 12 Feb 2020 16:18:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id F41DD31E30; Wed, 12 Feb 2020 17:18:35 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 05/10] ui/sdl: switch to new show-cursor option Date: Wed, 12 Feb 2020 17:18:30 +0100 Message-Id: <20200212161835.28576-6-kraxel@redhat.com> In-Reply-To: <20200212161835.28576-1-kraxel@redhat.com> References: <20200212161835.28576-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: uPiQqPSjNvuDKSWV3XhifQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , libvir-list@redhat.com, Markus Armbruster , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Use DisplayOpts settings instead of cursor_hide global variable. Also make "-display sdl,show-cursor=on" work. Signed-off-by: Gerd Hoffmann Reviewed-by: Ján Tomko --- ui/sdl2.c | 16 ++++++++-------- vl.c | 10 ++++++++++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index 9030f1c42efb..3c9424eb42c3 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -161,9 +161,9 @@ static void sdl_update_caption(struct sdl2_console *scon) } } -static void sdl_hide_cursor(void) +static void sdl_hide_cursor(struct sdl2_console *scon) { - if (!cursor_hide) { + if (scon->opts->has_show_cursor && scon->opts->show_cursor) { return; } @@ -175,9 +175,9 @@ static void sdl_hide_cursor(void) } } -static void sdl_show_cursor(void) +static void sdl_show_cursor(struct sdl2_console *scon) { - if (!cursor_hide) { + if (scon->opts->has_show_cursor && scon->opts->show_cursor) { return; } @@ -216,7 +216,7 @@ static void sdl_grab_start(struct sdl2_console *scon) SDL_WarpMouseInWindow(scon->real_window, guest_x, guest_y); } } else { - sdl_hide_cursor(); + sdl_hide_cursor(scon); } SDL_SetWindowGrab(scon->real_window, SDL_TRUE); gui_grab = 1; @@ -227,7 +227,7 @@ static void sdl_grab_end(struct sdl2_console *scon) { SDL_SetWindowGrab(scon->real_window, SDL_FALSE); gui_grab = 0; - sdl_show_cursor(); + sdl_show_cursor(scon); sdl_update_caption(scon); } @@ -658,7 +658,7 @@ static void sdl_mouse_warp(DisplayChangeListener *dcl, if (on) { if (!guest_cursor) { - sdl_show_cursor(); + sdl_show_cursor(scon); } if (gui_grab || qemu_input_is_absolute() || absolute_enabled) { SDL_SetCursor(guest_sprite); @@ -667,7 +667,7 @@ static void sdl_mouse_warp(DisplayChangeListener *dcl, } } } else if (gui_grab) { - sdl_hide_cursor(); + sdl_hide_cursor(scon); } guest_cursor = on; guest_x = x, guest_y = y; diff --git a/vl.c b/vl.c index 5419b3d68200..0a13cf2b1724 100644 --- a/vl.c +++ b/vl.c @@ -1931,6 +1931,16 @@ static void parse_display(const char *p) } else { goto invalid_sdl_args; } + } else if (strstart(opts, ",show-cursor=", &nextopt)) { + opts = nextopt; + dpy.has_show_cursor = true; + if (strstart(opts, "on", &nextopt)) { + dpy.show_cursor = true; + } else if (strstart(opts, "off", &nextopt)) { + dpy.show_cursor = false; + } else { + goto invalid_sdl_args; + } } else if (strstart(opts, ",gl=", &nextopt)) { opts = nextopt; dpy.has_gl = true; From patchwork Wed Feb 12 16:18:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11378763 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 502AD1395 for ; Wed, 12 Feb 2020 16:21:30 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 260C920658 for ; Wed, 12 Feb 2020 16:21:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LEPJcDxC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 260C920658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:39998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1ulV-00078D-7p for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Feb 2020 11:21:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33493) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1uix-0001gk-Q2 for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1uiw-0004a0-PS for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:51 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:42158 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1uiw-0004ZJ-Lz for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581524330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PfQTOmWOlDzI/+7N6tPThzcwKfX1cEBhIh686otkctY=; b=LEPJcDxCfJbFzKbkGqX13q1eOJbLaI2Dnvxf49pCnSiH4O5dBfoBCRGY/vWeAMz0X3O85m l/kRj6msbQr9RbUtVOhinhdZFHaIDqsQ+uFaFal3//dIaK4EInUs4znStk+fNbTK/VpOAg FBIN/RistL9bNSjVbCkGggiM48oQ2iY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-305-eoJH4TZ5O4CNvVY87NlP3g-1; Wed, 12 Feb 2020 11:18:46 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7CBC88010F3; Wed, 12 Feb 2020 16:18:45 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-39.ams2.redhat.com [10.36.117.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 527245C1B2; Wed, 12 Feb 2020 16:18:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0865931E32; Wed, 12 Feb 2020 17:18:36 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 06/10] ui/cocoa: switch to new show-cursor option Date: Wed, 12 Feb 2020 17:18:31 +0100 Message-Id: <20200212161835.28576-7-kraxel@redhat.com> In-Reply-To: <20200212161835.28576-1-kraxel@redhat.com> References: <20200212161835.28576-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: eoJH4TZ5O4CNvVY87NlP3g-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , libvir-list@redhat.com, Markus Armbruster , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Use DisplayOpts settings to set the new file-global cursor_hide variable, stop using the qemu-global cursor_hide variable. Signed-off-by: Gerd Hoffmann Reviewed-by: Ján Tomko --- ui/cocoa.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/cocoa.m b/ui/cocoa.m index fbb5b1b45f81..f7b323044582 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -125,6 +125,7 @@ typedef struct { NSWindow *normalWindow, *about_window; static DisplayChangeListener *dcl; static int last_buttons; +static int cursor_hide = 1; int gArgc; char **gArgv; @@ -1918,6 +1919,9 @@ static void cocoa_display_init(DisplayState *ds, DisplayOptions *opts) [(QemuCocoaAppController *)[[NSApplication sharedApplication] delegate] toggleFullScreen: nil]; }); } + if (opts->has_show_cursor && opts->show_cursor) { + cursor_hide = 0; + } dcl = g_malloc0(sizeof(DisplayChangeListener)); From patchwork Wed Feb 12 16:18:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11378771 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 79E7917F0 for ; Wed, 12 Feb 2020 16:23:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5136220724 for ; Wed, 12 Feb 2020 16:23:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Xz3MGv1L" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5136220724 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1unD-00023P-G6 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Feb 2020 11:23:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33567) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1uj6-0001y4-Hn for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:19:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1uj5-0004lS-IM for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:19:00 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:26806 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1uj5-0004kf-EZ for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581524339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0UieOV73AiBm51CMiies0SzIbjpyynbNGnm+Kn4I9e0=; b=Xz3MGv1LmM/zK0ZBbGA9+nwuDuEHbIMIP+qFTr6FjCR9AFWof3mcVPotK3mtBx/q6eSmdl G3+CKqhWLxqm2juAq6Jums/xN3sTV7KERNG0DomO1yt7OLlwokk4sP4BoW4dYRcB4skfoU FrRaOARI9K93vz7zn24QceivZBJ9sZw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-276--Kmofeb8MLmH0mKaeHijdQ-1; Wed, 12 Feb 2020 11:18:55 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6C7B1133656D; Wed, 12 Feb 2020 16:18:54 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-39.ams2.redhat.com [10.36.117.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 686D227063; Wed, 12 Feb 2020 16:18:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 10C6D31EA0; Wed, 12 Feb 2020 17:18:36 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 07/10] ui/gtk: implement show-cursor option Date: Wed, 12 Feb 2020 17:18:32 +0100 Message-Id: <20200212161835.28576-8-kraxel@redhat.com> In-Reply-To: <20200212161835.28576-1-kraxel@redhat.com> References: <20200212161835.28576-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: -Kmofeb8MLmH0mKaeHijdQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , libvir-list@redhat.com, Markus Armbruster , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" When specified just set null_cursor to NULL so we get the default pointer instead of a blank pointer. Signed-off-by: Gerd Hoffmann Reviewed-by: Ján Tomko --- ui/gtk.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 850c49bee02a..f3f0af8921d9 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2246,8 +2246,12 @@ static void gtk_display_init(DisplayState *ds, DisplayOptions *opts) textdomain("qemu"); window_display = gtk_widget_get_display(s->window); - s->null_cursor = gdk_cursor_new_for_display(window_display, - GDK_BLANK_CURSOR); + if (s->opts->has_show_cursor && s->opts->show_cursor) { + s->null_cursor = NULL; /* default pointer */ + } else { + s->null_cursor = gdk_cursor_new_for_display(window_display, + GDK_BLANK_CURSOR); + } s->mouse_mode_notifier.notify = gd_mouse_mode_change; qemu_add_mouse_mode_change_notifier(&s->mouse_mode_notifier); From patchwork Wed Feb 12 16:18:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11378753 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 26A7E17F0 for ; Wed, 12 Feb 2020 16:19:46 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F2E3B20714 for ; Wed, 12 Feb 2020 16:19:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="U7w1guE3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2E3B20714 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:39914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1ujo-0003Sw-T3 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Feb 2020 11:19:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33492) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1uix-0001gg-PF for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1uiw-0004Zu-Of for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:51 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:30545 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1uiw-0004ZW-LL for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581524330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ak/voRnhR3d72Uq0dBWSMVREL7Pd4pmT11kFE03lmhk=; b=U7w1guE3/9DpK5ALakuzVDn6R8ODblXyGfVjyrpDaIOfjbqYjWOTi5qVlhq6OWFH/yuV+h 4ifUghZJad/WlNcmfKf4Ba3NhJZbf9GT4BkHqL7lcm1xV9AgDcgSIJOIqbadphPrm0EN9x Xu6eNtXaU8W5CFjWTAGI0MRPYGmGn6M= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-305-e3AV68ZwP7m0fyLY299iGA-1; Wed, 12 Feb 2020 11:18:46 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 87946101FC6F; Wed, 12 Feb 2020 16:18:45 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-39.ams2.redhat.com [10.36.117.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6D7EB5C240; Wed, 12 Feb 2020 16:18:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 1A79431EAC; Wed, 12 Feb 2020 17:18:36 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 08/10] ui: drop curor_hide global variable. Date: Wed, 12 Feb 2020 17:18:33 +0100 Message-Id: <20200212161835.28576-9-kraxel@redhat.com> In-Reply-To: <20200212161835.28576-1-kraxel@redhat.com> References: <20200212161835.28576-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: e3AV68ZwP7m0fyLY299iGA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , libvir-list@redhat.com, Markus Armbruster , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" No users left. Signed-off-by: Gerd Hoffmann Reviewed-by: Ján Tomko --- include/sysemu/sysemu.h | 1 - vl.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 6358a324a711..7956e9054ade 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -41,7 +41,6 @@ extern const char *keyboard_layout; extern int win2k_install_hack; extern int alt_grab; extern int ctrl_grab; -extern int cursor_hide; extern int graphic_rotate; extern int no_shutdown; extern int old_param; diff --git a/vl.c b/vl.c index 0a13cf2b1724..62efcd15c0bf 100644 --- a/vl.c +++ b/vl.c @@ -168,7 +168,6 @@ int no_hpet = 0; int fd_bootchk = 1; static int no_reboot; int no_shutdown = 0; -int cursor_hide = 1; int graphic_rotate = 0; const char *watchdog; QEMUOptionRom option_rom[MAX_OPTION_ROMS]; @@ -3563,7 +3562,6 @@ int main(int argc, char **argv, char **envp) no_shutdown = 1; break; case QEMU_OPTION_show_cursor: - cursor_hide = 0; dpy.has_show_cursor = true; dpy.show_cursor = true; break; From patchwork Wed Feb 12 16:18:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11378769 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4511917F0 for ; Wed, 12 Feb 2020 16:23:14 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1D26320724 for ; Wed, 12 Feb 2020 16:23:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="f5TwD8tr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D26320724 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1unB-0001we-94 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Feb 2020 11:23:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33554) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1uj4-0001qo-2F for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1uj2-0004fT-1O for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:57 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:23907 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1uj1-0004fC-UJ for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581524335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4em2DWXVVe2v8rApkmWa0UnHCuFrOGU+HzyQvRV6mpo=; b=f5TwD8trW4uTXgsfzRf/QYUfLkaWbSCE6m2GnbWppXF0bwrftg70JIH64Z4Uv2JcYCNyVK tVYLP0BT27uqhrNGRMmjEhLNZ+679+WgcnURC1nvO2TTeQkQE11nBSZKfM9g5EAblSyrzR /Uask+QAL2PwFE2uO/vd+y0Mg/FgFds= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-239-PqpM9eJzMhCGOYoKNTZAiQ-1; Wed, 12 Feb 2020 11:18:52 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E058218CA24F; Wed, 12 Feb 2020 16:18:50 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-39.ams2.redhat.com [10.36.117.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 999E490761; Wed, 12 Feb 2020 16:18:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 243C431EB6; Wed, 12 Feb 2020 17:18:36 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 09/10] ui: deprecate legacy -show-cursor option Date: Wed, 12 Feb 2020 17:18:34 +0100 Message-Id: <20200212161835.28576-10-kraxel@redhat.com> In-Reply-To: <20200212161835.28576-1-kraxel@redhat.com> References: <20200212161835.28576-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: PqpM9eJzMhCGOYoKNTZAiQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , libvir-list@redhat.com, Markus Armbruster , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Gerd Hoffmann Reviewed-by: Ján Tomko --- vl.c | 2 ++ qemu-deprecated.texi | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/vl.c b/vl.c index 62efcd15c0bf..001be469c2e9 100644 --- a/vl.c +++ b/vl.c @@ -3562,6 +3562,8 @@ int main(int argc, char **argv, char **envp) no_shutdown = 1; break; case QEMU_OPTION_show_cursor: + warn_report("The -show-cursor option is deprecated, " + "use -display {sdl,gtk},show-cursor=on instead"); dpy.has_show_cursor = true; dpy.show_cursor = true; break; diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 017b750ca8e2..0671c26c806e 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -148,6 +148,11 @@ QEMU 5.0 introduced an alternative syntax to specify the size of the translation block cache, @option{-accel tcg,tb-size=}. The new syntax deprecates the previously available @option{-tb-size} option. +@subsection -show-cursor option (since 5.0) + +Use @option{-display sdl,show-cursor=on} or + @option{-display gtk,show-cursor=on} instead. + @section QEMU Machine Protocol (QMP) commands @subsection change (since 2.5.0) From patchwork Wed Feb 12 16:18:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11378767 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 481891395 for ; Wed, 12 Feb 2020 16:23:14 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C84120714 for ; Wed, 12 Feb 2020 16:23:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Bf2kTTVa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C84120714 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1unB-0001x2-Bi for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Feb 2020 11:23:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33530) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1uiz-0001jI-Ic for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1uiy-0004bj-8M for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:53 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:22626 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1uiy-0004bK-4B for qemu-devel@nongnu.org; Wed, 12 Feb 2020 11:18:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581524331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RsaMdrjcS7LqXtKeEfDdHdZ8jJXJz/XwFMk+kk69oL8=; b=Bf2kTTVaZZd1SoQL4C4H9v/Yy89g+/EPqD9Qc8+nde3Jocqz+6Sef/6fjD7vkyroOTWSax v7WEnRZHK2WNo3tWW2uCTUQAuasgFlpz+zufzc8rWrMi+WfRMnV1MRHdF5w+9HtJXVzH0N vTrklbDnEyYu2fu/6bNcXEBzlO8/mCE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-111-FpTATBr4MIiseDS8E5HboQ-1; Wed, 12 Feb 2020 11:18:48 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 09139101FC73; Wed, 12 Feb 2020 16:18:46 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-39.ams2.redhat.com [10.36.117.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9F9E65C3F8; Wed, 12 Feb 2020 16:18:44 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2CE7A31EEA; Wed, 12 Feb 2020 17:18:36 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 10/10] ui/cocoa: Drop workarounds for pre-10.12 OSX Date: Wed, 12 Feb 2020 17:18:35 +0100 Message-Id: <20200212161835.28576-11-kraxel@redhat.com> In-Reply-To: <20200212161835.28576-1-kraxel@redhat.com> References: <20200212161835.28576-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: FpTATBr4MIiseDS8E5HboQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , libvir-list@redhat.com, Markus Armbruster , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Our official OSX support policy covers the last two released versions. Currently that is 10.14 and 10.15. We also may work on older versions, but don't guarantee it. In commit 50290c002c045280f8d in mid-2019 we introduced some uses of CLOCK_MONOTONIC which incidentally broke compilation for pre-10.12 OSX versions (see LP:1861551). We don't intend to fix that, so we might as well drop the code in ui/cocoa.m which caters for pre-10.12 versions as well. (For reference, 10.11 fell out of Apple extended security support in September 2018.) Signed-off-by: Peter Maydell Message-Id: <20200201170534.22123-1-peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann --- ui/cocoa.m | 59 ------------------------------------------------------ 1 file changed, 59 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index f7b323044582..747a70839af8 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -42,60 +42,10 @@ #include #include "hw/core/cpu.h" -#ifndef MAC_OS_X_VERSION_10_5 -#define MAC_OS_X_VERSION_10_5 1050 -#endif -#ifndef MAC_OS_X_VERSION_10_6 -#define MAC_OS_X_VERSION_10_6 1060 -#endif -#ifndef MAC_OS_X_VERSION_10_9 -#define MAC_OS_X_VERSION_10_9 1090 -#endif -#ifndef MAC_OS_X_VERSION_10_10 -#define MAC_OS_X_VERSION_10_10 101000 -#endif -#ifndef MAC_OS_X_VERSION_10_12 -#define MAC_OS_X_VERSION_10_12 101200 -#endif #ifndef MAC_OS_X_VERSION_10_13 #define MAC_OS_X_VERSION_10_13 101300 #endif -/* macOS 10.12 deprecated many constants, #define the new names for older SDKs */ -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 -#define NSEventMaskAny NSAnyEventMask -#define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask -#define NSEventModifierFlagShift NSShiftKeyMask -#define NSEventModifierFlagCommand NSCommandKeyMask -#define NSEventModifierFlagControl NSControlKeyMask -#define NSEventModifierFlagOption NSAlternateKeyMask -#define NSEventTypeFlagsChanged NSFlagsChanged -#define NSEventTypeKeyUp NSKeyUp -#define NSEventTypeKeyDown NSKeyDown -#define NSEventTypeMouseMoved NSMouseMoved -#define NSEventTypeLeftMouseDown NSLeftMouseDown -#define NSEventTypeRightMouseDown NSRightMouseDown -#define NSEventTypeOtherMouseDown NSOtherMouseDown -#define NSEventTypeLeftMouseDragged NSLeftMouseDragged -#define NSEventTypeRightMouseDragged NSRightMouseDragged -#define NSEventTypeOtherMouseDragged NSOtherMouseDragged -#define NSEventTypeLeftMouseUp NSLeftMouseUp -#define NSEventTypeRightMouseUp NSRightMouseUp -#define NSEventTypeOtherMouseUp NSOtherMouseUp -#define NSEventTypeScrollWheel NSScrollWheel -#define NSTextAlignmentCenter NSCenterTextAlignment -#define NSWindowStyleMaskBorderless NSBorderlessWindowMask -#define NSWindowStyleMaskClosable NSClosableWindowMask -#define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask -#define NSWindowStyleMaskTitled NSTitledWindowMask -#endif -/* 10.13 deprecates NSFileHandlingPanelOKButton in favour of - * NSModalResponseOK, which was introduced in 10.9. Define - * it for older versions. - */ -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9 -#define NSModalResponseOK NSFileHandlingPanelOKButton -#endif /* 10.14 deprecates NSOnState and NSOffState in favor of * NSControlStateValueOn/Off, which were introduced in 10.13. * Define for older versions @@ -466,11 +416,7 @@ QemuCocoaView *cocoaView; COCOA_DEBUG("QemuCocoaView: drawRect\n"); // get CoreGraphic context -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10 - CGContextRef viewContextRef = [[NSGraphicsContext currentContext] graphicsPort]; -#else CGContextRef viewContextRef = [[NSGraphicsContext currentContext] CGContext]; -#endif CGContextSetInterpolationQuality (viewContextRef, kCGInterpolationNone); CGContextSetShouldAntialias (viewContextRef, NO); @@ -1076,9 +1022,7 @@ QemuCocoaView *cocoaView; ------------------------------------------------------ */ @interface QemuCocoaAppController : NSObject -#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) -#endif { } - (void)doToggleFullScreen:(id)sender; @@ -1127,9 +1071,6 @@ QemuCocoaView *cocoaView; [normalWindow setAcceptsMouseMovedEvents:YES]; [normalWindow setTitle:@"QEMU"]; [normalWindow setContentView:cocoaView]; -#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10) - [normalWindow useOptimizedDrawing:YES]; -#endif [normalWindow makeKeyAndOrderFront:self]; [normalWindow center]; [normalWindow setDelegate: self];