unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [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; 3+ 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	[flat|nested] 3+ 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; 3+ 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] 3+ 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
  0 siblings, 0 replies; 3+ 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] 3+ messages in thread

end of thread, other threads:[~2021-06-12 13:13 UTC | newest]

Thread overview: 3+ 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

unofficial mirror of emacs-devel@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/emacs-devel/0 emacs-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 emacs-devel emacs-devel/ https://yhetil.org/emacs-devel \
		emacs-devel@gnu.org
	public-inbox-index emacs-devel

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.devel
	nntp://news.gmane.io/gmane.emacs.devel


code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs.git

AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git