* [PATCH] src/pgtkfns.c: Do not show an empty frame prematurely
@ 2021-05-29 18:58 Jindřich Makovička
2021-06-08 15:54 ` Yuuki Harano
0 siblings, 1 reply; 8+ messages in thread
From: Jindřich Makovička @ 2021-05-29 18:58 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
Hi,
currently, PGTK Emacs shows an empty 200x200 px GTK window immediately
when x-create-frame is called, and it takes some time until the "real"
Emacs frame is shown. Changing this function to set the visibility flag
only on the child widgets of the GTK window and leaving the parent
window hidden until pgtk_make_frame_visible is called gives a much
better impression when starting Emacs.
--
Jindrich Makovicka
[-- Attachment #2: 0001-src-pgtkfns.c-Do-not-show-an-empty-frame-prematurely.patch --]
[-- Type: text/x-patch, Size: 1070 bytes --]
From 668bbba248de2b5eba346499b3f0a9d3de18ebc4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jind=C5=99ich=20Makovi=C4=8Dka?= <makovick@gmail.com>
Date: Sat, 29 May 2021 14:53:20 +0200
Subject: [PATCH] * src/pgtkfns.c: Do not show an empty frame prematurely
Set only the child widgets visible, leave the outer window
to pgtk_make_frame_visible .
---
src/pgtkfns.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index 5f114515c9..689a104d33 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -1693,8 +1693,13 @@ #define INSTALL_CURSOR(FIELD, NAME) \
unblock_input ();
}
- if (FRAME_GTK_OUTER_WIDGET (f))
- gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (f));
+ if (FRAME_GTK_OUTER_WIDGET (f)) {
+ GList *w = gtk_container_get_children(GTK_CONTAINER(FRAME_GTK_OUTER_WIDGET (f)));
+ for (; w != NULL; w = w->next)
+ {
+ gtk_widget_show_all (GTK_WIDGET(w->data));
+ }
+ }
gui_default_parameter (f, parms, Qno_focus_on_map, Qnil,
NULL, NULL, RES_TYPE_BOOLEAN);
--
2.32.0.rc0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] src/pgtkfns.c: Do not show an empty frame prematurely
2021-05-29 18:58 [PATCH] src/pgtkfns.c: Do not show an empty frame prematurely Jindřich Makovička
@ 2021-06-08 15:54 ` Yuuki Harano
2021-06-12 13:13 ` Jindřich Makovička
0 siblings, 1 reply; 8+ messages in thread
From: Yuuki Harano @ 2021-06-08 15:54 UTC (permalink / raw)
To: makovick; +Cc: emacs-devel
On Sat, 29 May 2021 20:58:47 +0200,
Jindřich Makovička <makovick@gmail.com> wrote:
> currently, PGTK Emacs shows an empty 200x200 px GTK window immediately
> when x-create-frame is called, and it takes some time until the "real"
> Emacs frame is shown.
I can't see such an empty window.
What environment are you using?
--
Yuuki Harano
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] src/pgtkfns.c: Do not show an empty frame prematurely
2021-06-08 15:54 ` Yuuki Harano
@ 2021-06-12 13:13 ` Jindřich Makovička
2021-06-13 9:40 ` Yuuki Harano
0 siblings, 1 reply; 8+ messages in thread
From: Jindřich Makovička @ 2021-06-12 13:13 UTC (permalink / raw)
To: Yuuki Harano; +Cc: emacs-devel
On Wed, 09 Jun 2021 00:54:15 +0900 (JST)
Yuuki Harano <masm@masm11.me> wrote:
> On Sat, 29 May 2021 20:58:47 +0200,
> Jindřich Makovička <makovick@gmail.com> wrote:
> > currently, PGTK Emacs shows an empty 200x200 px GTK window
> > immediately when x-create-frame is called, and it takes some time
> > until the "real" Emacs frame is shown.
>
> I can't see such an empty window.
> What environment are you using?
>
It's visible in MATE 1.24.1. Emacs with the legacy GTK UI does not do
this as x_make_frame_visible is the first one to call
gtk_widget_show_all().
--
Jindrich Makovicka
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] src/pgtkfns.c: Do not show an empty frame prematurely
2021-06-12 13:13 ` Jindřich Makovička
@ 2021-06-13 9:40 ` Yuuki Harano
2021-06-14 6:39 ` Jindřich Makovička
0 siblings, 1 reply; 8+ messages in thread
From: Yuuki Harano @ 2021-06-13 9:40 UTC (permalink / raw)
To: makovick; +Cc: emacs-devel
On Sat, 12 Jun 2021 15:13:16 +0200,
Jindřich Makovička <makovick@gmail.com> wrote:
>> I can't see such an empty window.
>> What environment are you using?
>>
>
> It's visible in MATE 1.24.1. Emacs with the legacy GTK UI does not do
> this as x_make_frame_visible is the first one to call
> gtk_widget_show_all().
I don't have MATE, so I couldn't confirm.
Applied, thanks.
--
Yuuki Harano
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] src/pgtkfns.c: Do not show an empty frame prematurely
2021-06-13 9:40 ` Yuuki Harano
@ 2021-06-14 6:39 ` Jindřich Makovička
2021-06-14 8:29 ` martin rudalics
2021-06-14 11:56 ` Yuuki Harano
0 siblings, 2 replies; 8+ messages in thread
From: Jindřich Makovička @ 2021-06-14 6:39 UTC (permalink / raw)
To: Yuuki Harano; +Cc: emacs-devel
On Sun, 13 Jun 2021 18:40:04 +0900 (JST)
Yuuki Harano <masm+emacs@masm11.me> wrote:
> I don't have MATE, so I couldn't confirm.
>
> Applied, thanks.
>
I see the patch being reverted immediately - did it break anything?
--
Jindrich Makovicka
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] src/pgtkfns.c: Do not show an empty frame prematurely
2021-06-14 6:39 ` Jindřich Makovička
@ 2021-06-14 8:29 ` martin rudalics
2021-06-14 11:56 ` Yuuki Harano
1 sibling, 0 replies; 8+ messages in thread
From: martin rudalics @ 2021-06-14 8:29 UTC (permalink / raw)
To: Jindřich Makovička, Yuuki Harano; +Cc: emacs-devel
> I see the patch being reverted immediately - did it break anything?
And if it broke anything, please explain somewhere in the code what it
broke. This should avoid that people apply this or a similar patch in
the future.
Thanks, martin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] src/pgtkfns.c: Do not show an empty frame prematurely
2021-06-14 6:39 ` Jindřich Makovička
2021-06-14 8:29 ` martin rudalics
@ 2021-06-14 11:56 ` Yuuki Harano
2021-06-18 14:32 ` Yuuki Harano
1 sibling, 1 reply; 8+ messages in thread
From: Yuuki Harano @ 2021-06-14 11:56 UTC (permalink / raw)
To: makovick; +Cc: rudalics, emacs-devel
On Mon, 14 Jun 2021 08:39:51 +0200,
Jindřich Makovička <makovick@gmail.com> wrote:
>> Applied, thanks.
>>
>
> I see the patch being reverted immediately - did it break anything?
I'm sorry, I should have told you what was broken.
emacs -Q --eval "(scroll-bar-mode -1)" --eval "(menu-bar-mode -1)" --eval "(tool-bar-mode -1)" --eval "(make-frame-command)"
This command created an empty frame.
It is reported here:
https://github.com/masm11/emacs/issues/105
I debugged a bit but I couldn't solve it, so I reverted the patch.
I'm going to debug with the patch.
On Mon, 14 Jun 2021 10:29:41 +0200,
martin rudalics <rudalics@gmx.at> wrote:
>> I see the patch being reverted immediately - did it break anything?
>
> And if it broke anything, please explain somewhere in the code what it
> broke. This should avoid that people apply this or a similar patch in
> the future.
OK, I'll explain the reason in the commit message of the revert commit
next time.
--
Yuuki Harano
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] src/pgtkfns.c: Do not show an empty frame prematurely
2021-06-14 11:56 ` Yuuki Harano
@ 2021-06-18 14:32 ` Yuuki Harano
0 siblings, 0 replies; 8+ messages in thread
From: Yuuki Harano @ 2021-06-18 14:32 UTC (permalink / raw)
To: makovick; +Cc: emacs-devel
On Mon, 14 Jun 2021 20:56:32 +0900 (JST),
Yuuki Harano <masm+emacs@masm11.me> wrote:
> I'm going to debug with the patch.
Done.
The patch is applied, and the empty frame bug is gone.
Thanks for the patch.
--
Yuuki Harano
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-06-18 14:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-29 18:58 [PATCH] src/pgtkfns.c: Do not show an empty frame prematurely Jindřich Makovička
2021-06-08 15:54 ` Yuuki Harano
2021-06-12 13:13 ` Jindřich Makovička
2021-06-13 9:40 ` Yuuki Harano
2021-06-14 6:39 ` Jindřich Makovička
2021-06-14 8:29 ` martin rudalics
2021-06-14 11:56 ` Yuuki Harano
2021-06-18 14:32 ` Yuuki Harano
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).