From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: dongwon.kim@intel.com
Cc: qemu-devel@nongnu.org, kraxel@redhat.com
Subject: Re: [PATCH] ui/gtk: Explicitly set the default size of new window when untabifying
Date: Tue, 7 May 2024 19:10:10 +0400 [thread overview]
Message-ID: <CAJ+F1CKxB5CGkR=xvgR8X7sm2X+qW0sd3VE=uf01JRZcgOkyRg@mail.gmail.com> (raw)
In-Reply-To: <20240501034133.167321-1-dongwon.kim@intel.com>
Hi
On Wed, May 1, 2024 at 7:47 AM <dongwon.kim@intel.com> wrote:
>
> From: Dongwon Kim <dongwon.kim@intel.com>
>
> When untabifying, the default size of the new window was inadvertently
> set to the size smaller than quarter of the primary window size due
> to lack of explicit configuration. This commit addresses the issue by
> ensuring that the size of untabified windows is set to match the surface
> size.
From a quick test, I don't see a difference of behaviour after the
patch. Could you help me reproduce the issue?
I also don't think it is correct for two reasons:
- the inner display widget should cause a window size reconfiguration
- the window size != display size
thanks
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
> ---
> ui/gtk.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/ui/gtk.c b/ui/gtk.c
> index 810d7fc796..269b8207d7 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -1395,6 +1395,9 @@ static void gd_menu_untabify(GtkMenuItem *item, void *opaque)
> if (!vc->window) {
> gtk_widget_set_sensitive(vc->menu_item, false);
> vc->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
> + gtk_window_set_default_size(GTK_WINDOW(vc->window),
> + surface_width(vc->gfx.ds),
> + surface_height(vc->gfx.ds));
> #if defined(CONFIG_OPENGL)
> if (vc->gfx.esurface) {
> eglDestroySurface(qemu_egl_display, vc->gfx.esurface);
> --
> 2.34.1
>
>
--
Marc-André Lureau
next prev parent reply other threads:[~2024-05-07 15:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-01 3:41 [PATCH] ui/gtk: Explicitly set the default size of new window when untabifying dongwon.kim
2024-05-07 15:10 ` Marc-André Lureau [this message]
2024-05-07 16:05 ` Kim, Dongwon
2024-05-08 0:02 ` Kim, Dongwon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ+F1CKxB5CGkR=xvgR8X7sm2X+qW0sd3VE=uf01JRZcgOkyRg@mail.gmail.com' \
--to=marcandre.lureau@gmail.com \
--cc=dongwon.kim@intel.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).