[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#72986: Disabling menu-bar-mode changes size of new frames
From: |
martin rudalics |
Subject: |
bug#72986: Disabling menu-bar-mode changes size of new frames |
Date: |
Sat, 14 Sep 2024 16:43:29 +0200 |
User-agent: |
Mozilla Thunderbird |
> Here is the frame size history:
Thanks.
> x_create_frame_2 (0), MS=160x175
> xg_frame_set_char_size, invisible, PS=1328x1260, XS=1328x1260, DS=1328x1260
> xg_frame_set_char_size (5), MS=32x70 IH IV
> x_make_frame_visible
> MapNotify, not hidden & not iconified, PS=1328x1260, DS=1328x1260
> ConfigureNotify, PS=1328x1260, XS=400x340, DS=1328x1260
Here we go again with the small size, reject it and ask for the previous
size ...
> xg_frame_resized, rejected, PS=1328x1260, XS=400x340, DS=1328x1260
> tool-bar-lines (2), MS=160x175
> xg_frame_set_char_size, visible, PS=1328x1260, XS=1328x1260, DS=1328x1260
> ConfigureNotify, PS=1328x1260, XS=2560x1346, DS=1328x1260
... but now all of a sudden we should handle a frame size about twice as
large which we reject again ...
> xg_frame_resized, rejected, PS=1328x1260, XS=2560x1346, DS=1328x1260
> ConfigureNotify, PS=1328x1260, XS=2560x1326, DS=1328x1260
> xg_frame_resized, rejected, PS=1328x1260, XS=2560x1326, DS=1328x1260
> set_window_configuration (4), MS=160x175 IH IV
>
> Note that something quite different happens when I open the second frame:
> it ends up full screen, but the Emacs window only occupies the same space
> as the initial window (roughly half the screen wide, and a little shorter
> than the screen).
... and never fill accordingly because we don't like it. This was a bad
idea. The second call of gtk_window_resize simply has to get the same
dimensions as the first one as in the first version of this patch.
Just that the "first version" of this patch had another problem: The
sizes we ask for in gtk_window_resize via outer_height and outer_width
include tool and menu bars. The sizes reported by ConfigureNotify are
those of the native rectangle only. I hopefully fixed that now. Please
try again and tell me the histories you get here for the initial frame
and the second frame both with and without the menu bar by evaluating
(frame--size-history).
> frame-char-width: 16
> frame-char-height: 35
Times twice gets us the MS=32x70 above.
Next I'd like to know what you see with
(let ((frame (make-frame '((visibility . nil)))))
(make-frame-visible frame))
and
(let ((frame (make-frame '((visibility . nil) (menu-bar-lines . 0)))))
(make-frame-visible frame))
both with an unpatched Emacs and a patched one. Here the second frame
appears exactly where the first one is, so we would have to care about
the placement ourselves.
I only want to know whether this "visibly" improves the behavior you
observe (no need to look at the history of these frames). The idea is
that we could make creation of the second frame smoother so that you
don't see its initial size.
martin
gtkutil-reject.diff
Description: Text Data
- bug#72986: Disabling menu-bar-mode changes size of new frames, (continued)
- bug#72986: Disabling menu-bar-mode changes size of new frames, martin rudalics, 2024/09/09
- bug#72986: Disabling menu-bar-mode changes size of new frames, Reuben Thomas, 2024/09/09
- bug#72986: Disabling menu-bar-mode changes size of new frames, martin rudalics, 2024/09/09
- bug#72986: Disabling menu-bar-mode changes size of new frames, Reuben Thomas, 2024/09/09
- bug#72986: Disabling menu-bar-mode changes size of new frames, martin rudalics, 2024/09/09
- bug#72986: Disabling menu-bar-mode changes size of new frames, Reuben Thomas, 2024/09/09
- bug#72986: Disabling menu-bar-mode changes size of new frames, martin rudalics, 2024/09/10
- bug#72986: Disabling menu-bar-mode changes size of new frames, Reuben Thomas, 2024/09/10
- bug#72986: Disabling menu-bar-mode changes size of new frames, martin rudalics, 2024/09/10
- bug#72986: Disabling menu-bar-mode changes size of new frames, Reuben Thomas, 2024/09/12
- bug#72986: Disabling menu-bar-mode changes size of new frames,
martin rudalics <=
- bug#72986: Disabling menu-bar-mode changes size of new frames, Reuben Thomas, 2024/09/15
- bug#72986: Disabling menu-bar-mode changes size of new frames, martin rudalics, 2024/09/16
- bug#72986: Disabling menu-bar-mode changes size of new frames, Reuben Thomas, 2024/09/25
- bug#72986: Disabling menu-bar-mode changes size of new frames, Eli Zaretskii, 2024/09/03
- bug#72986: Disabling menu-bar-mode changes size of new frames, Reuben Thomas, 2024/09/03
- bug#72986: Disabling menu-bar-mode changes size of new frames, martin rudalics, 2024/09/04