From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 51679@debbugs.gnu.org
Subject: bug#51679: 29.0.50; [PATCH] Fix resize of xwidgets on GTK
Date: Mon, 08 Nov 2021 13:31:17 +0800 [thread overview]
Message-ID: <87v913qkm2.fsf@yahoo.com> (raw)
In-Reply-To: 87v913qkm2.fsf.ref@yahoo.com
[-- Attachment #1: Type: text/plain, Size: 143 bytes --]
gtk_container_resize_children doesn't always work, and the canonical way
to force a re-allocation is to just call gtk_widget_queue_allocate.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-resize-of-xwidgets-on-GTK.patch --]
[-- Type: text/x-patch, Size: 1033 bytes --]
From 5e5cf7276736ddf82d7b56e507500f4267a794ee Mon Sep 17 00:00:00 2001
From: Po Lu <luangruo@yahoo.com>
Date: Mon, 8 Nov 2021 13:29:44 +0800
Subject: [PATCH] Fix resize of xwidgets on GTK
* src/xwidget.c (Fxwidget_resize): Queue widget for re-allocation
after setting its size request.
---
src/xwidget.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/xwidget.c b/src/xwidget.c
index ecb973f485..1815a39ab6 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -1740,9 +1740,10 @@ DEFUN ("xwidget-resize", Fxwidget_resize, Sxwidget_resize, 3, 3, 0,
{
gtk_window_resize (GTK_WINDOW (xw->widgetwindow_osr), xw->width,
xw->height);
- gtk_container_resize_children (GTK_CONTAINER (xw->widgetwindow_osr));
gtk_widget_set_size_request (GTK_WIDGET (xw->widget_osr), xw->width,
xw->height);
+
+ gtk_widget_queue_allocate (GTK_WIDGET (xw->widget_osr));
}
#elif defined NS_IMPL_COCOA
nsxwidget_resize (xw);
--
2.31.1
next parent reply other threads:[~2021-11-08 5:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87v913qkm2.fsf.ref@yahoo.com>
2021-11-08 5:31 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-11-08 5:34 ` bug#51679: 29.0.50; [PATCH] Fix resize of xwidgets on GTK Lars Ingebrigtsen
2021-11-08 5:41 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-08 6:43 ` Lars Ingebrigtsen
2021-11-08 6:57 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-09 3:24 ` Lars Ingebrigtsen
2021-11-09 3:25 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-08 13:07 ` Eli Zaretskii
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=87v913qkm2.fsf@yahoo.com \
--to=bug-gnu-emacs@gnu.org \
--cc=51679@debbugs.gnu.org \
--cc=luangruo@yahoo.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.