From nobody Tue Nov 26 13:52:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1707825721; cv=none; d=zohomail.com; s=zohoarc; b=BnS1haV6x5x3rMUt6fr5GxUIGAULVbR22LXVdU7PTVyi2CYSG6h0RKv+R85JE1k3e89zfJIb/WSh6Eon1n/qY24Py/XNGL5zXjscatPTESHXsHCeF8/X0389rg9xskyzGYdZT/v+72Ns9EClyi7vYiZCcTXgnQ+19V1RQDFFkDw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707825721; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=zthbQp6xqUSSgPtsY42mEFpzp+NHKvQicLn7aLSfUfs=; b=jxTIpb1gd5dhhgaGUPZii5+AEoul7H/V3SKTp3qQXCc0xqro9UvxEX4XYipNtaP+E9LqZ4Y1RJlCjqr3zgbUEAUrbXXWljMOiDuG81w+6SbloB4WpPjyfBCge/Bpns+SEphLDb8gT4vDN9rKQofgNCJ+CZYLADZJY4PhCrdU0hI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1707825721282866.6172861512883; Tue, 13 Feb 2024 04:02:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZrTg-0003Zd-E1; Tue, 13 Feb 2024 07:01:32 -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 1rZrTd-0003Hn-Mf for qemu-devel@nongnu.org; Tue, 13 Feb 2024 07:01:29 -0500 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZrTc-0000vG-0h for qemu-devel@nongnu.org; Tue, 13 Feb 2024 07:01:29 -0500 Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-29041136f73so2564436a91.0 for ; Tue, 13 Feb 2024 04:01:27 -0800 (PST) Received: from localhost ([157.82.207.134]) by smtp.gmail.com with UTF8SMTPSA id q19-20020a632a13000000b005dc8702f0a9sm1096986pgq.1.2024.02.13.04.01.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Feb 2024 04:01:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1707825686; x=1708430486; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=zthbQp6xqUSSgPtsY42mEFpzp+NHKvQicLn7aLSfUfs=; b=ehLhCMgbTqppBZVQRomM8N5dTj9AC6+3m+lm+tUz/6dT3VXJRVcxXkDgErq2HBBYHG YFVyMcaj8WDK7Uno/j8R6ISxAMzYnkp5TWm5V0eRhO26gJ5OUSlKIuGuQY2KS6V+wTD1 7/ROQIUuuXTuDkORMIvnin+ooTjxGbiBv7OJ53XSrvjCZzJGiSolyVnSk95LSEy8m5Oi ZZABFbrsO5/eUApLRSBKxuFXf9HgEcqHXG9eLLIbeE7aKj9SSeJ1SDIHnjwR5VWF7MII 9XcNTkacnmHg9Qo1Sszy1hmTEgku4I/ay+1lPb+SG6d7lZj/zVtmAIqxV2+XSQA6q5T+ qVUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707825686; x=1708430486; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zthbQp6xqUSSgPtsY42mEFpzp+NHKvQicLn7aLSfUfs=; b=pnbx2IFbdBD++DusdLzfQHIi/DujwOpP/KXMQj9rN9quAPqWjg0gQP1zpjgUWYVMam oGZVUEcmxS4HdkjFgNAb1XElyOINZD/okWB72M3dFVpY9srsK+JaEQDV1TFtpzAcgU8I t7xl1fxR0gEstjgo76v9v7Fox+gAqInj/tyEKb+weLUWigKE7kg1KmX21sQAP7QCmD7o 7C8U2eg7BBGaFjGlGiIdDb7XZGhRtBKjGgdZGSbicjcca38OQzf5AFVg2cTiJZp+eRzR HHcOJEWSzSKba4CsQWMm/W0FVKHr5xySpi2wk/uYBH06lsQWvYOEGc42Jd3Fe//2GNEw zKww== X-Gm-Message-State: AOJu0YwEMGfoKLUacajY+pfQM8EBOPdl6yItku69T/iclENiIwUm3oRq WnkyHZ1UeF4hoZTp/fZYxwq/6CYeE7j0Bd0iBFhIbCeBoof/pjj9VuFQzFlli+adJo/QMYhITus 5 X-Google-Smtp-Source: AGHT+IFoeiw7mqldsysqIm6PSdv0Pvjet1svhREXIAncJwJlZx+blTU5dQb5S3TPkI23HnpHFDogLA== X-Received: by 2002:a17:90a:fd02:b0:297:a6d:a499 with SMTP id cv2-20020a17090afd0200b002970a6da499mr5572430pjb.14.1707825686062; Tue, 13 Feb 2024 04:01:26 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVCyEXq0uE5gEeVNB+u1dQkhJCciqVT0sPLurFwtus7wPb8YyZeGi61bhI4oJdq5Z8ZaOCPOhW9n+kCrIZSLvNxj5QVMcvdldhQ+d+fOPr3Lc3rkyvvQMn7rtNpTbRl6noU9v09YxTm8xgD8CoTlnS9Y6SxGKCinEfZtr3zt+s4XdyuoPRm9p/nP3WTo6DyOubCRYikxrLUgVxN2VyfM/AelSLOQk+oWH6LLrXhk/+xgJcfe6mpMq0rqZwHL+vIyLVLZ4D0XSOIYkjx From: Akihiko Odaki Date: Tue, 13 Feb 2024 21:00:58 +0900 Subject: [PATCH v9 4/6] ui/cocoa: Make window resizable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240213-cocoa-v9-4-d5a5e1bf0490@daynix.com> References: <20240213-cocoa-v9-0-d5a5e1bf0490@daynix.com> In-Reply-To: <20240213-cocoa-v9-0-d5a5e1bf0490@daynix.com> To: Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Marek Glogowski , BALATON Zoltan , Rene Engel Cc: qemu-devel@nongnu.org, Akihiko Odaki X-Mailer: b4 0.12.3 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::102f; envelope-from=akihiko.odaki@daynix.com; helo=mail-pj1-x102f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1707825721873100001 The window will be resizable when zoom-to-fit is on. Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/cocoa.m b/ui/cocoa.m index 5d21ce143671..754539937ffe 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1379,8 +1379,10 @@ - (void)zoomToFit:(id) sender { stretch_video =3D !stretch_video; if (stretch_video =3D=3D true) { + [normalWindow setStyleMask:[normalWindow styleMask] | NSWindowStyl= eMaskResizable]; [sender setState: NSControlStateValueOn]; } else { + [normalWindow setStyleMask:[normalWindow styleMask] & ~NSWindowSty= leMaskResizable]; [cocoaView resizeWindow]; [sender setState: NSControlStateValueOff]; } @@ -2033,6 +2035,7 @@ static void cocoa_display_init(DisplayState *ds, Disp= layOptions *opts) =20 if (opts->u.cocoa.has_zoom_to_fit && opts->u.cocoa.zoom_to_fit) { stretch_video =3D true; + [normalWindow setStyleMask:[normalWindow styleMask] | NSWindowStyl= eMaskResizable]; } =20 create_initial_menus(); --=20 2.43.0