From patchwork Tue Mar 26 15:45:03 2024 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: 782616 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp1753612wrt; Tue, 26 Mar 2024 08:46:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUKvxCiJTFWCA8CgDgzL7Y3FQXreXusYOwF7rS7iZD2JkmjtMqXdumXOTapz/hgVGsLhXFpMwpsoDwCc17O4Ztr X-Google-Smtp-Source: AGHT+IFPa9Rd5hZd44JN9T5hgdcoUBYejC2g1LW7AmB+hKZyZG5Q6Z+CeUuvswKPyVHXSnLU0ZBF X-Received: by 2002:a05:6871:29d:b0:22a:4f02:c0e8 with SMTP id i29-20020a056871029d00b0022a4f02c0e8mr3391341oae.45.1711468014230; Tue, 26 Mar 2024 08:46:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711468014; cv=none; d=google.com; s=arc-20160816; b=WQseYNVkEU/i0h8RKWmjj2YwtN+Fi3fMXLOiVIGne5sC3pAf2zsreAqY9VQK0c398j MKRh1aZ3X+rlIRKtUs49jGdljLtO7+mxRxKCnDw8OniIbh3yyP6RQfqDF5HkxiwOcaiA dX9PGYrvxcV57SFFwDw+DRGw2Fz66Cc73LvTcDZ/bl0rTqIKJyF+bJMjpEwlEysyIiAH 6GlPVtQXehKBqaPYy/MRg09Dkgefxkr+IdSyUeGHt/zIDfMQbSotfLevJee+zww+9/1R ow3FOdbd8NAXrOUudV501GfS773FGYGFep5q8q6D/LZyP8h3vXN6mIE85/N5P8NdUJDV olnQ== 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=PKAyA2esITL8SITZAGwcUVQdYshhyjFMl3HKToYcoDk=; fh=8fwwG4jf5s+vp2LxKfvGZcFOYvMbRyHUPH92VDUPV1M=; b=aU/DaNdsG8qivId0dpcs1hKipSrQTSx+JxeV1ipyzx9YFc0B3/il+T7SixbYI9+CN5 JpjKhMfAdM4Cny34vPjcz13/GXdabj5j5oPfOfoFHWFF1F3OPWHKUfoqKPpvHvfGAFpT F1t9uGQ7zB3gT+GHCUyq0TNnJ+Jyl2LJzlNT7yNNt92SeqVgHmkM5OOSoLQKs1fB6pz2 406ZoHWWK87HD4TL6zBpKiagbF7nb+s1fIgeB0qFuZB9ssuRfByLZ6BHqa60NDMTZQnD pHHj/xRUeIqG25g0n7eLxV6agTnfSo5ac88dUjOn06Vprj7l/ySL/LM5c61PVNEHdlg/ lHTw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i4zmYjjG; 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 w19-20020a05622a191300b004311546ccc5si7623956qtc.176.2024.03.26.08.46.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Mar 2024 08:46:54 -0700 (PDT) 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=i4zmYjjG; 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 1rp90J-0004hc-2a; Tue, 26 Mar 2024 11:46:23 -0400 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 1rp90H-0004aT-9A for qemu-devel@nongnu.org; Tue, 26 Mar 2024 11:46:21 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rp90E-0001Kn-V4 for qemu-devel@nongnu.org; Tue, 26 Mar 2024 11:46:21 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-33ed6078884so3745541f8f.1 for ; Tue, 26 Mar 2024 08:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711467977; x=1712072777; 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=PKAyA2esITL8SITZAGwcUVQdYshhyjFMl3HKToYcoDk=; b=i4zmYjjG1xzs3zNKPUYNQtTU1BmRmnUMbSv+JeR0bH3YUiy8jKIl8tnzxHHcNQpM/i PNj55eiQpmjt69RIxk27TbIZKSH+tC5YfBB8MJotm0/heCuytKJB72S31gaRyfj51NpY h5Zpxo40GhCZfC7GJvrTQ4svDi26YeSzwBKjT5glJgfDCGsP7efU/UzmdrufJtH7CrH6 cgec837rsHSIKPmJ5VJYEvThfJ59Ya+6o6mjS0OqYwbw9guvy+KyuxHEgigxoqA5rdl0 AnP6sc6ObVRM5cXRFOAoFx1JZUlpCckgIic0ytMFedEen1O9Fh7Il32RzC6zfIwCuqs0 UXDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711467977; x=1712072777; 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=PKAyA2esITL8SITZAGwcUVQdYshhyjFMl3HKToYcoDk=; b=nitbiOv1yT/5pif/3Y2vHcp1Arm6Ow0fM01FOrfNKI0qx+kjAeRiEC0vbhdrKtdVyx 8aI+OdnenPjHyuHnBntVWiTeCeo3DkGp/e3VUgOGJPmyvTixbOCIYSrCmcSfFbgvIFiF ONQ0RW+lpuPJDqCrF5CjqoMap7RxHK5x+2FCe5CTLUgEX7bwIi+RaRu6cHeiXdjv9KAK y+wQNVxZqJCUAYTTWlvRmOdTId0XOhYDk/pMW1e81KZ2OfUDxXfd2qXYqHqCg+23SVPm RKH+nAuhNLLw1OffZR7s4I5Y/IB2tgE8mgh1O6Mi/1r+oUw9yOTw6RmvKZB3sNSVhQTa 5K2A== X-Gm-Message-State: AOJu0YyS++cf/drzHQiUNy6Rpg1QCkdpNFW9fWv6xAyrbUjVw+YbeRim /ycftD8S8SDZ6pHRquHe1EcHWwvV97AWB5E+DCJ/zUjlGudmIpQiaogENpSbO5bPb1Zhu3rFaZJ q X-Received: by 2002:a5d:5505:0:b0:341:b5ca:9e9c with SMTP id b5-20020a5d5505000000b00341b5ca9e9cmr1642466wrv.25.1711467977141; Tue, 26 Mar 2024 08:46:17 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.229]) by smtp.gmail.com with ESMTPSA id az7-20020adfe187000000b00341ce80ea66sm5309912wrb.82.2024.03.26.08.46.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 26 Mar 2024 08:46:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Akihiko Odaki , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Subject: [PULL 12/13] ui/cocoa: Resize window after toggling zoom-to-fit Date: Tue, 26 Mar 2024 16:45:03 +0100 Message-ID: <20240326154505.8300-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240326154505.8300-1-philmd@linaro.org> References: <20240326154505.8300-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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 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: Akihiko Odaki Resize the window so that the content will fit without zooming. Fixes: 91aa508d0274 ("ui/cocoa: Let the platform toggle fullscreen") Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Message-ID: <20240323-fixes-v2-2-18651a2b0394@daynix.com> Signed-off-by: Philippe Mathieu-Daudé --- ui/cocoa.m | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/cocoa.m b/ui/cocoa.m index 17e125d66d..3efa8ac1a9 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1408,6 +1408,7 @@ - (void)zoomToFit:(id) sender [[cocoaView window] setStyleMask:styleMask]; [sender setState:styleMask & NSWindowStyleMaskResizable ? NSControlStateValueOn : NSControlStateValueOff]; + [cocoaView resizeWindow]; } - (void)toggleZoomInterpolation:(id) sender