unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jindřich Makovička" <makovick@gmail.com>
To: emacs-devel@gnu.org
Subject: [PATCH] src/pgtkfns.c: Do not show an empty frame prematurely
Date: Sat, 29 May 2021 20:58:47 +0200	[thread overview]
Message-ID: <20210529205847.1d128399@holly> (raw)

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


             reply	other threads:[~2021-05-29 18:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-29 18:58 Jindřich Makovička [this message]
2021-06-08 15:54 ` [PATCH] src/pgtkfns.c: Do not show an empty frame prematurely 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

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210529205847.1d128399@holly \
    --to=makovick@gmail.com \
    --cc=emacs-devel@gnu.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.
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).