all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org
Subject: Re: Frame size changes
Date: Sun, 05 Oct 2008 22:08:15 +0200	[thread overview]
Message-ID: <48E91EAF.6060506@swipnet.se> (raw)
In-Reply-To: <87od1y99gi.fsf@cyd.mit.edu>



Chong Yidong skrev:
> How about the proposed solution (patch included):
> 
> The variable after-init-time (new to Emacs 23) is set to `current-time'
> after initialization.  Since it's nil during initialization, we can use
> it to tell if Emacs is currently being initialized.  Suppose we make
> after-init-time a built-in variable.  Then, make x_wm_set_size_hint a
> no-op when after-init-time is nil.  The result is that WM hints are not
> set during initialization.
> 
> According to my (non-thorough) testing, this eliminates the erratic
> frame sizing during startup, without introducing any other ill effects.
> 
> What do you think?

Sounds very interesting.  I'd say check it in so we can get it tested by 
pretesters.  Good work!


	Jan D.

> 
> 
> *** trunk/lisp/startup.el.~1.507.~	2008-10-02 16:21:54.000000000 -0400
> --- trunk/lisp/startup.el	2008-10-05 14:17:47.000000000 -0400
> ***************
> *** 257,268 ****
>   therefore, if you set `debug-on-error' non-nil in `.emacs',
>   an error in one of these functions will invoke the debugger.")
>   
> - (defvar before-init-time nil
> -   "Value of `current-time' before Emacs begins initialization.")
> - 
> - (defvar after-init-time nil
> -   "Value of `current-time' after loading the init files.")
> - 
>   (defvar emacs-startup-hook nil
>     "Normal hook run after loading init files and handling the command line.")
>   
> --- 257,262 ----
> 
> *** trunk/src/lisp.h.~1.644.~	2008-09-24 16:14:33.000000000 -0400
> --- trunk/src/lisp.h	2008-10-05 14:23:45.000000000 -0400
> ***************
> *** 3102,3107 ****
> --- 3102,3108 ----
>   /* defined in emacs.c */
>   extern Lisp_Object decode_env_path P_ ((char *, char *));
>   extern Lisp_Object Vinvocation_name, Vinvocation_directory;
> + extern Lisp_Object Vbefore_init_time, Vafter_init_time;
>   extern Lisp_Object Vinstallation_directory;
>   extern Lisp_Object empty_unibyte_string, empty_multibyte_string;
>   EXFUN (Fkill_emacs, 1);
> *** trunk/src/emacs.c.~1.447.~	2008-10-05 14:07:06.000000000 -0400
> --- trunk/src/emacs.c	2008-10-05 14:27:01.000000000 -0400
> ***************
> *** 131,136 ****
> --- 131,139 ----
>      nil means get them only from PATH_LOADSEARCH.  */
>   Lisp_Object Vinstallation_directory;
>   
> + /* The values of `current-time' before and after Emacs initialization.  */
> + Lisp_Object Vbefore_init_time, Vafter_init_time;
> + 
>   /* Hook run by `kill-emacs' before it does really anything.  */
>   Lisp_Object Vkill_emacs_hook;
>   
> ***************
> *** 2497,2502 ****
> --- 2500,2513 ----
>     DEFVAR_LISP ("previous-system-time-locale", &Vprevious_system_time_locale,
>   	       doc: /* Most recently used system locale for time.  */);
>     Vprevious_system_time_locale = Qnil;
> + 
> +   DEFVAR_LISP ("before-init-time", &Vbefore_init_time,
> + 	       doc: /* Value of `current-time' before Emacs begins initialization.  */);
> +   Vbefore_init_time = Qnil;
> + 
> +   DEFVAR_LISP ("after-init-time", &Vafter_init_time,
> + 	       doc: /* Value of `current-time' after loading the init files.  */);
> +   Vafter_init_time = Qnil;
>   }
>   
>   /* arch-tag: 7bfd356a-c720-4612-8ab6-aa4222931c2e
> *** trunk/src/gtkutil.c.~1.138.~	2008-07-29 12:15:41.000000000 -0400
> --- trunk/src/gtkutil.c	2008-10-05 14:22:01.000000000 -0400
> ***************
> *** 934,939 ****
> --- 934,942 ----
>        long flags;
>        int user_position;
>   {
> +   if (NILP (Vafter_init_time))
> +     return;
> + 
>     if (FRAME_GTK_OUTER_WIDGET (f))
>     {
>       /* Must use GTK routines here, otherwise GTK resets the size hints
> 




      parent reply	other threads:[~2008-10-05 20:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-02 17:54 Frame size changes Chong Yidong
2008-10-03  7:08 ` Jan Djärv
2008-10-03 18:15   ` Chong Yidong
2008-10-04  7:19     ` Jan Djärv
2008-10-04 15:06       ` Stefan Monnier
2008-10-06  4:16         ` Miles Bader
2008-10-06  7:19           ` Juanma Barranquero
2008-10-06 13:59             ` Miles Bader
2008-10-06 14:08               ` Juanma Barranquero
2008-10-06 14:14                 ` Miles Bader
2008-10-06 14:20                   ` Juanma Barranquero
2008-10-05 18:35       ` Chong Yidong
2008-10-05 19:43         ` Eli Zaretskii
2008-10-05 21:11           ` Chong Yidong
2008-10-05 21:23             ` Eli Zaretskii
2008-10-05 21:50               ` Chong Yidong
2008-10-05 21:37             ` Lennart Borgman (gmail)
2008-10-05 20:08         ` Jan Djärv [this message]

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=48E91EAF.6060506@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=cyd@stupidchicken.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 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.