[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird problem with inital frame sizing

From: Perry E. Metzger
Subject: Re: Weird problem with inital frame sizing
Date: Sat, 15 Sep 2018 19:23:26 -0400

On Thu, 13 Sep 2018 21:14:23 -0400 Stefan Monnier
<address@hidden> wrote:
> > And what does it have to do with the overall problem I'm having?
> Nothing directly.  You just pulled on one of the loose threads ;-)

I changed my font setting to use "face-spec-set". Naturally it changed
nothing but now no one can complain that I'm using the wrong
function. :)

So getting back to my problem:

On one of my remote machines (which I view over xpra), if I set:

(add-hook 'window-setup-hook
          (lambda ()
            (when window-system
              (sleep-for 1)   ; *** NOTE THIS PART HERE ***
              (set-frame-size (car (frame-list)) 80 50))))

the frame is set to 50 lines, and if I do

(add-hook 'window-setup-hook
          (lambda ()
            (when window-system
              ;;(sleep-for 1)
              (set-frame-size (car (frame-list)) 80 50))))

that is, without the sleep, it does not get set properly (and indeed
sometimes is very messed up indeed, at random, as though the frame
size was set to what it would have been in pixels if I hadn't changed
the font.)

Note that I have both default-frame-alist and initial-frame-alist set
to indicate the frame should be 50 lines. This only seems to work for
subsequent frames.

(fyi, why "(car (frame-list))": I was using it instead of
"selected-frame" just in case there was some weirdness with the frame
not being selected at the start. This helped nothing.)

Anyone with ideas on how to debug this apparent race condition? I'd be
very grateful.

Perry E. Metzger                address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]