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; 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

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).