From nobody Thu May 16 13:43:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1497427129005645.6206135502691; Wed, 14 Jun 2017 00:58:49 -0700 (PDT) Received: from localhost ([::1]:47021 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL3CR-0006he-E0 for importer@patchew.org; Wed, 14 Jun 2017 03:58:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL3Am-0005SY-7M for qemu-devel@nongnu.org; Wed, 14 Jun 2017 03:57:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dL3Aj-0002JI-RV for qemu-devel@nongnu.org; Wed, 14 Jun 2017 03:57:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56816) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dL3Aj-0002Ic-Jo for qemu-devel@nongnu.org; Wed, 14 Jun 2017 03:57:01 -0400 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 mx1.redhat.com (Postfix) with ESMTPS id 7AF9B81247; Wed, 14 Jun 2017 07:57:00 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-125.ams2.redhat.com [10.36.116.125]) by smtp.corp.redhat.com (Postfix) with ESMTP id D03F774ADF; Wed, 14 Jun 2017 07:56:57 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AD1E816E2F; Wed, 14 Jun 2017 09:56:59 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7AF9B81247 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7AF9B81247 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 14 Jun 2017 09:56:49 +0200 Message-Id: <20170614075653.26420-2-kraxel@redhat.com> In-Reply-To: <20170614075653.26420-1-kraxel@redhat.com> References: <20170614075653.26420-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 14 Jun 2017 07:57:00 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/5] Improve Cocoa modifier key handling X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Gerd Hoffmann , Ian McKellar Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Ian McKellar via Qemu-devel I had two problems with QEMU on macOS: 1) Sometimes when alt-tabbing to QEMU it would act as if the 'a' key was pressed so I'd get 'aaaaaaaaa....'. 2) Using Sikuli to programatically send keys to the QEMU window text like "foo_bar" would come out as "fooa-bar". They looked similar and after much digging the problem turned out to be the same. When QEMU's ui/cocoa.m received an NSFlagsChanged NSEvent it looked at the keyCode to determine what modifier key changed. This usually works fine but sometimes the keyCode is 0 and the app should instead be looking at the modifierFlags bitmask. Key code 0 is the 'a' key. I added code that handles keyCode =3D=3D 0 differently. It checks the modifierFlags and if they differ from QEMU's idea of which modifier keys are currently pressed it toggles those changed keys. This fixes my problems and seems work fine. Signed-off-by: Ian McKellar Message-id: 20170526233816.47627-1-ianloic@google.com Signed-off-by: Gerd Hoffmann --- ui/cocoa.m | 60 ++++++++++++++++++++++++++++++++++++++++++++++++----------= -- 1 file changed, 48 insertions(+), 12 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 004ec2711c..1f010d3ae7 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -52,6 +52,8 @@ /* 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 @@ -268,7 +270,7 @@ static void handleAnyDeviceErrors(Error * err) NSWindow *fullScreenWindow; float cx,cy,cw,ch,cdx,cdy; CGDataProviderRef dataProviderRef; - int modifiers_state[256]; + BOOL modifiers_state[256]; BOOL isMouseGrabbed; BOOL isFullscreen; BOOL isAbsoluteEnabled; @@ -536,18 +538,59 @@ QemuCocoaView *cocoaView; } } =20 +- (void) toggleModifier: (int)keycode { + // Toggle the stored state. + modifiers_state[keycode] =3D !modifiers_state[keycode]; + // Send a keyup or keydown depending on the state. + qemu_input_event_send_key_qcode(dcl->con, keycode, modifiers_state[key= code]); +} + +- (void) toggleStatefulModifier: (int)keycode { + // Toggle the stored state. + modifiers_state[keycode] =3D !modifiers_state[keycode]; + // Generate keydown and keyup. + qemu_input_event_send_key_qcode(dcl->con, keycode, true); + qemu_input_event_send_key_qcode(dcl->con, keycode, false); +} + - (void) handleEvent:(NSEvent *)event { COCOA_DEBUG("QemuCocoaView: handleEvent\n"); =20 int buttons =3D 0; - int keycode; + int keycode =3D 0; bool mouse_event =3D false; NSPoint p =3D [event locationInWindow]; =20 switch ([event type]) { case NSEventTypeFlagsChanged: - keycode =3D cocoa_keycode_to_qemu([event keyCode]); + if ([event keyCode] =3D=3D 0) { + // When the Cocoa keyCode is zero that means keys should be + // synthesized based on the values in in the eventModifiers + // bitmask. + + if (qemu_console_is_graphic(NULL)) { + NSEventModifierFlags modifiers =3D [event modifierFlag= s]; + + if (!!(modifiers & NSEventModifierFlagCapsLock) !=3D != !modifiers_state[Q_KEY_CODE_CAPS_LOCK]) { + [self toggleStatefulModifier:Q_KEY_CODE_CAPS_LOCK]; + } + if (!!(modifiers & NSEventModifierFlagShift) !=3D !!mo= difiers_state[Q_KEY_CODE_SHIFT]) { + [self toggleModifier:Q_KEY_CODE_SHIFT]; + } + if (!!(modifiers & NSEventModifierFlagControl) !=3D !!= modifiers_state[Q_KEY_CODE_CTRL]) { + [self toggleModifier:Q_KEY_CODE_CTRL]; + } + if (!!(modifiers & NSEventModifierFlagOption) !=3D !!m= odifiers_state[Q_KEY_CODE_ALT]) { + [self toggleModifier:Q_KEY_CODE_ALT]; + } + if (!!(modifiers & NSEventModifierFlagCommand) !=3D !!= modifiers_state[Q_KEY_CODE_META_L]) { + [self toggleModifier:Q_KEY_CODE_META_L]; + } + } + } else { + keycode =3D cocoa_keycode_to_qemu([event keyCode]); + } =20 if ((keycode =3D=3D Q_KEY_CODE_META_L || keycode =3D=3D Q_KEY_= CODE_META_R) && !isMouseGrabbed) { @@ -559,16 +602,9 @@ QemuCocoaView *cocoaView; // emulate caps lock and num lock keydown and keyup if (keycode =3D=3D Q_KEY_CODE_CAPS_LOCK || keycode =3D=3D Q_KEY_CODE_NUM_LOCK) { - qemu_input_event_send_key_qcode(dcl->con, keycode, tru= e); - qemu_input_event_send_key_qcode(dcl->con, keycode, fal= se); + [self toggleStatefulModifier:keycode]; } else if (qemu_console_is_graphic(NULL)) { - if (modifiers_state[keycode] =3D=3D 0) { // keydown - qemu_input_event_send_key_qcode(dcl->con, keycode,= true); - modifiers_state[keycode] =3D 1; - } else { // keyup - qemu_input_event_send_key_qcode(dcl->con, keycode,= false); - modifiers_state[keycode] =3D 0; - } + [self toggleModifier:keycode]; } } =20 --=20 2.9.3 From nobody Thu May 16 13:43:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1497427129415843.050005073518; Wed, 14 Jun 2017 00:58:49 -0700 (PDT) Received: from localhost ([::1]:47020 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL3CQ-0006gO-45 for importer@patchew.org; Wed, 14 Jun 2017 03:58:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL3Am-0005SX-6r for qemu-devel@nongnu.org; Wed, 14 Jun 2017 03:57:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dL3Ai-0002I2-7i for qemu-devel@nongnu.org; Wed, 14 Jun 2017 03:57:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52146) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dL3Ai-0002Gc-1N for qemu-devel@nongnu.org; Wed, 14 Jun 2017 03:57:00 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F27B980470 for ; Wed, 14 Jun 2017 07:56:58 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-125.ams2.redhat.com [10.36.116.125]) by smtp.corp.redhat.com (Postfix) with ESMTP id 08B018970E; Wed, 14 Jun 2017 07:56:58 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B440E16E33; Wed, 14 Jun 2017 09:56:59 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F27B980470 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com F27B980470 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 14 Jun 2017 09:56:50 +0200 Message-Id: <20170614075653.26420-3-kraxel@redhat.com> In-Reply-To: <20170614075653.26420-1-kraxel@redhat.com> References: <20170614075653.26420-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 14 Jun 2017 07:56:59 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/5] spice: Use proper enum type for kbd led state X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jonathon Jongsma , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Jonathon Jongsma Although the Qemu and spice flags currently have the same value, it seems more correct to pass the spice flag values to spice_server_kbd_leds(), especially considering that this function already makes an effort to convert between the QEMU_*_LED and SPICE_KEYBOARD_MODIFIER_* values. Signed-off-by: Jonathon Jongsma Reviewed-by: Marc-Andr=C3=A9 Lureau Message-id: 20170510202006.31737-1-jjongsma@redhat.com Signed-off-by: Gerd Hoffmann --- ui/spice-input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/spice-input.c b/ui/spice-input.c index 86293dd2ce..918580239d 100644 --- a/ui/spice-input.c +++ b/ui/spice-input.c @@ -87,7 +87,7 @@ static void kbd_leds(void *opaque, int ledstate) if (ledstate & QEMU_CAPS_LOCK_LED) { kbd->ledstate |=3D SPICE_KEYBOARD_MODIFIER_FLAGS_CAPS_LOCK; } - spice_server_kbd_leds(&kbd->sin, ledstate); + spice_server_kbd_leds(&kbd->sin, kbd->ledstate); } =20 /* mouse bits */ --=20 2.9.3 From nobody Thu May 16 13:43:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 149742719123184.95021687489918; Wed, 14 Jun 2017 00:59:51 -0700 (PDT) Received: from localhost ([::1]:47024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL3DS-0007gl-1q for importer@patchew.org; Wed, 14 Jun 2017 03:59:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL3Am-0005SU-6Q for qemu-devel@nongnu.org; Wed, 14 Jun 2017 03:57:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dL3Aj-0002Im-4g for qemu-devel@nongnu.org; Wed, 14 Jun 2017 03:57:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56806) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dL3Ai-0002II-Ui for qemu-devel@nongnu.org; Wed, 14 Jun 2017 03:57:01 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E1A8681243 for ; Wed, 14 Jun 2017 07:56:59 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-125.ams2.redhat.com [10.36.116.125]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0EC2A8D6D9; Wed, 14 Jun 2017 07:56:58 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BAF4A16E34; Wed, 14 Jun 2017 09:56:59 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E1A8681243 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E1A8681243 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 14 Jun 2017 09:56:51 +0200 Message-Id: <20170614075653.26420-4-kraxel@redhat.com> In-Reply-To: <20170614075653.26420-1-kraxel@redhat.com> References: <20170614075653.26420-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 14 Jun 2017 07:57:00 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 3/5] gtk: prefer gtk3 over gtk2 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" In case the configure script finds both gtk2 and gtk3 installed it still prefers gtk2 over gtk3. Prefer gtk3 instead. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau Message-id: 20170606105339.3613-2-kraxel@redhat.com --- configure | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/configure b/configure index b147191ae6..bfba156a41 100755 --- a/configure +++ b/configure @@ -2301,14 +2301,14 @@ fi # GTK probe =20 if test "$gtkabi" =3D ""; then - # The GTK ABI was not specified explicitly, so try whether 2.0 is avai= lable. - # Use 3.0 as a fallback if that is available. - if $pkg_config --exists "gtk+-2.0 >=3D 2.18.0"; then - gtkabi=3D2.0 - elif $pkg_config --exists "gtk+-3.0 >=3D 3.0.0"; then + # The GTK ABI was not specified explicitly, so try whether 3.0 is avai= lable. + # Use 2.0 as a fallback if that is available. + if $pkg_config --exists "gtk+-3.0 >=3D 3.0.0"; then gtkabi=3D3.0 + elif $pkg_config --exists "gtk+-2.0 >=3D 2.18.0"; then + gtkabi=3D2.0 else - gtkabi=3D2.0 + gtkabi=3D3.0 fi fi =20 @@ -2331,7 +2331,7 @@ if test "$gtk" !=3D "no"; then libs_softmmu=3D"$gtk_libs $libs_softmmu" gtk=3D"yes" elif test "$gtk" =3D "yes"; then - feature_not_found "gtk" "Install gtk2 or gtk3 devel" + feature_not_found "gtk" "Install gtk3-devel" else gtk=3D"no" fi --=20 2.9.3 From nobody Thu May 16 13:43:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1497427343961608.8774593187006; Wed, 14 Jun 2017 01:02:23 -0700 (PDT) Received: from localhost ([::1]:47043 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL3Fu-00019k-Ph for importer@patchew.org; Wed, 14 Jun 2017 04:02:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL3Am-0005Sa-7u for qemu-devel@nongnu.org; Wed, 14 Jun 2017 03:57:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dL3Aj-0002Iz-AC for qemu-devel@nongnu.org; Wed, 14 Jun 2017 03:57:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49338) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dL3Aj-0002IL-4W for qemu-devel@nongnu.org; Wed, 14 Jun 2017 03:57:01 -0400 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 mx1.redhat.com (Postfix) with ESMTPS id 18DF2C04B310 for ; Wed, 14 Jun 2017 07:57:00 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-125.ams2.redhat.com [10.36.116.125]) by smtp.corp.redhat.com (Postfix) with ESMTP id 158D9777C8; Wed, 14 Jun 2017 07:56:58 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C1A6E16E35; Wed, 14 Jun 2017 09:56:59 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 18DF2C04B310 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 18DF2C04B310 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 14 Jun 2017 09:56:52 +0200 Message-Id: <20170614075653.26420-5-kraxel@redhat.com> In-Reply-To: <20170614075653.26420-1-kraxel@redhat.com> References: <20170614075653.26420-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 14 Jun 2017 07:57:00 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 4/5] sdl: prefer sdl2 over sdl1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" In case the configure script finds both SDL 1.2 and SDL 2.x installed it still prefers SDL 1.2. Prefer SDL 2.x instead. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau Message-id: 20170606105339.3613-3-kraxel@redhat.com --- configure | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index bfba156a41..db0798d51d 100755 --- a/configure +++ b/configure @@ -2598,12 +2598,12 @@ fi # sdl-config even without cross prefix, and favour pkg-config over sdl-con= fig. =20 if test "$sdlabi" =3D ""; then - if $pkg_config --exists "sdl"; then - sdlabi=3D1.2 - elif $pkg_config --exists "sdl2"; then + if $pkg_config --exists "sdl2"; then sdlabi=3D2.0 + elif $pkg_config --exists "sdl"; then + sdlabi=3D1.2 else - sdlabi=3D1.2 + sdlabi=3D2.0 fi fi =20 @@ -2630,7 +2630,7 @@ elif has ${sdl_config}; then sdlversion=3D$($sdlconfig --version) else if test "$sdl" =3D "yes" ; then - feature_not_found "sdl" "Install SDL devel" + feature_not_found "sdl" "Install SDL2-devel" fi sdl=3Dno fi --=20 2.9.3 From nobody Thu May 16 13:43:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 149742729789859.34401154056286; Wed, 14 Jun 2017 01:01:37 -0700 (PDT) Received: from localhost ([::1]:47040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL3F8-0000dL-US for importer@patchew.org; Wed, 14 Jun 2017 04:01:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL3Am-0005SZ-7V for qemu-devel@nongnu.org; Wed, 14 Jun 2017 03:57:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dL3Aj-0002J8-K6 for qemu-devel@nongnu.org; Wed, 14 Jun 2017 03:57:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51096) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dL3Aj-0002IY-Ds for qemu-devel@nongnu.org; Wed, 14 Jun 2017 03:57:01 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5E6925F7B6 for ; Wed, 14 Jun 2017 07:57:00 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-125.ams2.redhat.com [10.36.116.125]) by smtp.corp.redhat.com (Postfix) with ESMTP id DA84689703; Wed, 14 Jun 2017 07:56:59 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id CA21016E3E; Wed, 14 Jun 2017 09:56:59 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5E6925F7B6 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5E6925F7B6 From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 14 Jun 2017 09:56:53 +0200 Message-Id: <20170614075653.26420-6-kraxel@redhat.com> In-Reply-To: <20170614075653.26420-1-kraxel@redhat.com> References: <20170614075653.26420-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 14 Jun 2017 07:57:00 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 5/5] spice: don't enter opengl mode in case another UI provides opengl support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann Message-id: 20170606110618.10393-1-kraxel@redhat.com --- include/ui/spice-display.h | 2 ++ ui/spice-core.c | 1 + ui/spice-display.c | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h index 184d4c373a..4ba9444dba 100644 --- a/include/ui/spice-display.h +++ b/include/ui/spice-display.h @@ -140,6 +140,8 @@ struct SimpleSpiceCursor { QXLCursor cursor; }; =20 +extern bool spice_opengl; + int qemu_spice_rect_is_empty(const QXLRect* r); void qemu_spice_rect_union(QXLRect *dest, const QXLRect *r); =20 diff --git a/ui/spice-core.c b/ui/spice-core.c index a087ad5da9..182f550f1f 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -847,6 +847,7 @@ void qemu_spice_init(void) exit(1); } display_opengl =3D 1; + spice_opengl =3D 1; } #endif } diff --git a/ui/spice-display.c b/ui/spice-display.c index b353445f58..042292cc90 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -27,6 +27,7 @@ #include "ui/spice-display.h" =20 static int debug =3D 0; +bool spice_opengl; =20 static void GCC_FMT_ATTR(2, 3) dprint(int level, const char *fmt, ...) { @@ -1013,7 +1014,7 @@ static void qemu_spice_display_init_one(QemuConsole *= con) =20 ssd->dcl.ops =3D &display_listener_ops; #ifdef HAVE_SPICE_GL - if (display_opengl) { + if (spice_opengl) { ssd->dcl.ops =3D &display_listener_gl_ops; ssd->gl_unblock_bh =3D qemu_bh_new(qemu_spice_gl_unblock_bh, ssd); ssd->gl_unblock_timer =3D timer_new_ms(QEMU_CLOCK_REALTIME, --=20 2.9.3