[Top][All Lists]

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

Re: Proposing changes to adjust_frame_size

From: martin rudalics
Subject: Re: Proposing changes to adjust_frame_size
Date: Mon, 10 May 2021 10:25:36 +0200

>> Elementary.  But why should it react so allergically to our resize
>> request?
> Sorry, I'm a layman in WMs.  What does or doesn't it do?

If I only knew.  From what I've been able to understand till now, a
tiling WM on X that sends Emacs a MapNotify event when displaying a
frame, doesn't like to be told by Emacs that the size it allots to the
Emacs frame is not the size Emacs actually wants (with emacs -Q that's
the default 80 columns 36 lines frame).

>> Basically, we have no choice: For some "normal" WMs we have to tell
>> them the size we want when the frame is mapped because before that
>> they may ignore our resize requests and after that the frame has
>> already appeared with its wrong size.  For a tiling WM requesting a
>> size when the frame is mapped is apparently a mortal sin.
> If you think that the window manager does something wrong or could at
> least so something better, I'm happy to file a sway bug report or ask
> the sway devs on IRC.

That would not help because IIUC XMonad and EXWM do the same.

>> Whatever it be, I attach a patch to address this issue.
> Hm, I can see no difference with your patch applied.  Still emacs -Q has
> just a menubar and the toolbar is not shown until I move focus to
> another WM window and back to the emacs frame.

Darn.  It could not have worked because `x-create-frame-with-faces'
removes any visibility spec, creates the frame as invisible and re-adds
the visibility spec later on

  (let* (...
         (visibility-spec (assq 'visibility parameters))
    (setq frame (x-create-frame `((visibility . nil) . ,params)))
          (if (null visibility-spec)
              (make-frame-visible frame)
            (modify-frame-parameters frame (list visibility-spec)))

so I could never have caught this anyway and the entire

      if (EQ (visibility, Qicon))
        x_iconify_frame (f);
          if (EQ (visibility, Qunbound))
            visibility = Qt;

          if (!NILP (visibility))
            x_make_frame_visible (f);
            f->was_invisible = true;

      store_frame_param (f, Qvisibility, visibility);

block in Fx_create_frame is for the birds when this is called from
`x-create-frame-with-faces'.  This kludge needs additional surgery in
the Lisp part so please bear with me.


reply via email to

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