emacs-devel
[Top][All Lists]
Advanced

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

Re: Proposing changes to adjust_frame_size


From: Tassilo Horn
Subject: Re: Proposing changes to adjust_frame_size
Date: Sun, 09 May 2021 20:48:47 +0200
User-agent: mu4e 1.5.13; emacs 28.0.50

martin rudalics <rudalics@gmx.at> writes:

>> Yes, pretty much like Emacs splits windows into two balanced halves.
>> I have a 1600 pixel wide screen, 3 pixels gap between WM windows, and
>> 3 pixel window borders.  That makes 1579 pixels width for actual WM
>> windows, divided by two (I've had a terminal at the left and emacs at
>> the right), makes 789.5 pixels per window.
>
> 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?

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

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

That's the frame size history with your patch applied.

--8<---------------cut here---------------start------------->8---
Frame size history of #<frame *scratch* - GNU Emacs at thinkpad-t440p 
0x55598075aca8>
x_create_frame_1 (5), TS=80x25~>640x525, NS=80x25~>656x525, IS=80x25~>656x525, 
MS=16x42 IH IV
gui_figure_window_size (5), TS=640x525~>640x756, TC=80x25~>80x36, 
NS=656x525~>656x756, IS=656x525~>656x756, MS=16x42 IH IV
scroll-bar-width (3), NS=656x756~>672x756, IS=656x756~>672x756, MS=80x105
scroll-bar-height (3), MS=80x105
menu-bar-lines (2), MS=80x105
x_create_frame_2 (0), MS=80x105
xg_frame_set_char_size, invisible, PS=672x756, XS=672x756, DS=672x756
xg_frame_set_char_size (5), MS=16x42 IH IV
MapNotify, not hidden & not iconified, PS=672x756, DS=672x756
xg_frame_set_char_size, visible, PS=672x756, XS=672x756, DS=672x756
ConfigureNotify, PS=672x756, XS=672x756, DS=672x756
xg_frame_resized, unchanged, PS=672x756, XS=672x756
ConfigureNotify, PS=672x756, XS=794x851, DS=672x756
xg_frame_resized, changed, PS=672x756, XS=794x851
change_frame_size_1, delayed, PS=672x756, XS=794x851, DS=672x756
change_frame_size (5), TS=640x756~>762x851, TC=80x36~>95x40, 
NS=672x756~>794x851, IS=672x756~>794x851, MS=16x42 IH IV
tool-bar-lines (2), MS=80x105 IH IV
ConfigureNotify, PS=794x851, XS=794x810
xg_frame_resized, changed, PS=794x851, XS=794x810
change_frame_size_1, delayed, PS=794x851, XS=794x810
change_frame_size (5), TS=762x851~>762x810, TC=95x40~>95x38, 
NS=794x851~>794x810, IS=794x851~>794x810, MS=16x42 IH IV
--8<---------------cut here---------------end--------------->8---

The numbers are slightly different (the frame is a bit larger) because
I've deactivated gaps between windows.

Bye,
Tassilo



reply via email to

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