From patchwork Mon Nov 6 11:03:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 741359 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1032146wrr; Mon, 6 Nov 2023 03:31:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IGLIWSNW7nQx3MAnanP6P72GMcUIzM+YzBbrImOI8QF1Llou/P4QuX1qPx9VB4mvWMqc4FQ X-Received: by 2002:a05:6808:1a13:b0:3b2:ea7c:c402 with SMTP id bk19-20020a0568081a1300b003b2ea7cc402mr38518133oib.25.1699270278172; Mon, 06 Nov 2023 03:31:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699270278; cv=none; d=google.com; s=arc-20160816; b=empz9YZQGEv63k/qN1ejZjHUE4ac6VscVqXmk6jXfoCuZXIdsQB4YfY1qpd96Ru+rY P3o01dTA+b1MUylqBVVMZ751SCkOf7IiqlM672GH2UkBbvvDru+I2tbfalPvlo6B9FO8 7Px/RqF+4ipr5dYr39OGdpNiNB8FsJka3bN2HcFxseiUzfWiM1yJATL+nzUuOAM+JwzJ FuxxUX8x1feVUFvSmaXR6MCRQ3fasmf/Uqu//4Io+d8piwJ+tRsAIlpWyjpL2mhuPnpV vPvp8DkBRaPnQTY40q4ft8SWoEb9g5vKZaHqJJzcpw1etvB/GvErwNK6IU8qsNE1e1/W KbGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xBR3Oh8zClbS1YQ62m6eKxWZ4Ons8qsU0E4Liv4Rvg0=; fh=n+HI8/qt2hcAyDbOPUJmovNrVwvQ8IAB0JpjjDffKak=; b=H5GpptIvR7tUMEKAAXPF98NUGUKh08zK7rbQCIxe7EEqYDME38Mdg1ZPZt+Hv/9nSl lIGtLccE3HmJpNgIWZBTr4PF7lwaH1YuVoEjHEF8Gd+6sO7y08EREK+VGpvvVQEIQDKm 6IGbvkJEahmM/8nCoJ7jfVpZxZJgw/KjaeITnBIJrJ0xBWIZu9xGw0fAfYF205yOqnuQ GQFpG6bsiiWeKeq6O68wqRcRoyAqS0gX3LCBMibryBzEb3IrT2IPWjgq6SRAIR8RYe/1 /0bgmBTEh/TIxzKgUS24PyRxQGejJcfrTNX/B5n4mvU1cvn9SoPXL8pHFwQQ2T1bMaqt +fNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zDz4nNo5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u20-20020a05620a455400b0076db6af9392si5807205qkp.254.2023.11.06.03.31.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2023 03:31:18 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zDz4nNo5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qzxVL-0004Zx-SX; Mon, 06 Nov 2023 06:10:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qzxV4-0003NS-4T for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:10:36 -0500 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzxUw-00062J-JA for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:10:33 -0500 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-50797cf5b69so5576452e87.2 for ; Mon, 06 Nov 2023 03:10:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699269025; x=1699873825; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xBR3Oh8zClbS1YQ62m6eKxWZ4Ons8qsU0E4Liv4Rvg0=; b=zDz4nNo5FL6bSGxz/w7Y1ZzyqgQeZyT8agZ0kj2Ph+LdVGEtqCTaubducvlUccLevD jtCJFJA2bshvH4Mx5bZ8N5KCU/TGyV1YhdkaerZpxZB4pOguv4Qpg3IwTmrVHPhjR3fz INSRywOwGDLfehMVYjMUqUKotgATzDrRRRQu3Bqk9FL0n4gAY5NsMKw1txCTs/euXVH2 36vjXGkUFiNnFtUfIirZlO4yZPnIn0awl1NsS4uy+jQeaWcEt3rJMkog6xw8EsVijplA iNRqXl9dqNYuJBGD7LxBToITK1bfu0h/6iE4e9RP27qlFYv9tRX6c7aVTk9p2XooDgX7 cK0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699269025; x=1699873825; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xBR3Oh8zClbS1YQ62m6eKxWZ4Ons8qsU0E4Liv4Rvg0=; b=fbfev3DlKRbsFTD6mx6/jf7pBSvwOzHYaZQLqtAkSj2UN+h8uj61wcQCZyVi+/B6Ia zBcRC6m9pmV7FnyLjz7G0ISCho0jimFwPn/K67DLimTD6bvD0cva/gPczcl7/b+cuGIa ZYlbntmUvIrhnNNns/zJ1J2tgFWQLHcXQYqpDEBB30Q+uRcXurIEHh8IwBy8NtuOPNG0 mbILnz60iwye9EVsFVsAnpw4sDNi1zk3U1bkGA/QuKaGxBdIOD89sMGAXlWqW3duQZSZ SQOtknYiEa5a7bV9WF1+LKweo5JM70lS9vT5zHk+OCeikuYDl52+oX4TG3Wz+mfz3y99 oM/A== X-Gm-Message-State: AOJu0YyH9bWlgqa0N93B7zzmw4kx24WbYBip3/7lNp3wUdq/KoJROC7h ywQ0CBt0lt6g1qOTYO1nEo5Q7Pvtvb30mKYeCT8= X-Received: by 2002:a05:6512:318f:b0:509:45ed:1083 with SMTP id i15-20020a056512318f00b0050945ed1083mr12662290lfe.40.1699269024745; Mon, 06 Nov 2023 03:10:24 -0800 (PST) Received: from m1x-phil.lan (176-131-220-199.abo.bbox.fr. [176.131.220.199]) by smtp.gmail.com with ESMTPSA id bh7-20020a05600c3d0700b00401b242e2e6sm11965729wmb.47.2023.11.06.03.10.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 06 Nov 2023 03:10:24 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, qemu-s390x@nongnu.org, qemu-block@nongnu.org, qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, Adrian Wowk , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Subject: [PULL 60/60] ui/sdl2: use correct key names in win title on mac Date: Mon, 6 Nov 2023 12:03:32 +0100 Message-ID: <20231106110336.358-61-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231106110336.358-1-philmd@linaro.org> References: <20231106110336.358-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=philmd@linaro.org; helo=mail-lf1-x12f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Adrian Wowk Previously, when using the SDL2 UI on MacOS, the title bar uses incorrect key names (such as Ctrl and Alt instead of the standard MacOS key symbols like ⌃ and ⌥). This commit changes sdl_update_caption in ui/sdl2.c to use the correct symbols when compiling for MacOS (CONFIG_DARWIN is defined). Unfortunately, standard Mac keyboards do not include a "Right-Ctrl" key, so in the case that the SDL grab mode is set to HOT_KEY_MOD_RCTRL, the default text is still used. Signed-off-by: Adrian Wowk Acked-by: Marc-André Lureau Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231030024119.28342-1-dev@adrianwowk.com> Signed-off-by: Philippe Mathieu-Daudé --- ui/sdl2.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/sdl2.c b/ui/sdl2.c index fbfdb64e90..4971963f00 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -172,11 +172,19 @@ static void sdl_update_caption(struct sdl2_console *scon) status = " [Stopped]"; } else if (gui_grab) { if (alt_grab) { +#ifdef CONFIG_DARWIN + status = " - Press ⌃⌥⇧G to exit grab"; +#else status = " - Press Ctrl-Alt-Shift-G to exit grab"; +#endif } else if (ctrl_grab) { status = " - Press Right-Ctrl-G to exit grab"; } else { +#ifdef CONFIG_DARWIN + status = " - Press ⌃⌥G to exit grab"; +#else status = " - Press Ctrl-Alt-G to exit grab"; +#endif } }