[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46827: Broken initial size of GTK3 frame
From: |
martin rudalics |
Subject: |
bug#46827: Broken initial size of GTK3 frame |
Date: |
Mon, 3 May 2021 18:51:52 +0200 |
Please try it and tell me whether the frame size history (hoperemains empty
now.
> > 1. when the frame flashes:
> >
> > Frame size history of #<frame *Minibuf-1* 0x55555935ffb0>
> > tab-bar-lines (3), TS=640x610~>640x612, TC=80x35~>80x36,
IS=656x610~>656x612, MS=32x51 IH IV
> > tab-bar-lines (3), TS=640x612~>640x610, TC=80x36~>80x35,
IS=656x612~>656x610, MS=80x85 IH IV
> > x_make_frame_visible
> > set_window_configuration (4), MS=80x85 IH IV
> >
> > 2. when no flash after adding sit-for in window--display-buffer:
> >
> > Frame size history of #<frame *Minibuf-1* 0x55555935ffb0>
> > tab-bar-lines (3), TS=640x610~>640x612, TC=80x35~>80x36,
IS=656x610~>656x612, MS=32x51 IH IV
> > tab-bar-lines (3), TS=640x612~>640x610, TC=80x36~>80x35,
IS=656x612~>656x610, MS=32x51 IH IV
> > x_make_frame_visible
> > set_window_configuration (4), MS=80x85 IH IV
>
> Didn't you earlier say that all this happens in a maximized frame? The
> sizes above seem to contradict that. In either case, someone requests
> to enlarge and shrink the tab bar by two pixels which contradicts your
> earlier "and the tab bar is not resized". So who wants to do that to
> the tab bar and why? And who wants to set the window configuration here
> and why?
What apparently happens is the following: x_set_tab_bar_lines (why?)
gets called all the time with a VALUE of 1 and translates that to
FRAME_LINE_HEIGHT (f) when calling x_change_tab_bar_height. So the
latter sets FRAME_TAB_BAR_HEIGHT (f) to FRAME_LINE_HEIGHT (f) which is
two pixels less than the height needed to display the tab bar. This
means we enlarge and move upwards the root window by two pixels and
later shrink and move it down when redisplay has calculated the new
size.
The attached patch tries to fix that. Note that a simple
nlines != olines
is not sufficient since the tab bar occupies 2 lines while VALUE is 1.
Maybe we should do a similar thing for the tool and/or menu bars (but I
recall that some builds do process a VALUE > 1 specially for them).
martin
xfns.c.diff
Description: Text Data
- bug#46827: Broken initial size of GTK3 frame, Juri Linkov, 2021/05/01
- bug#46827: Broken initial size of GTK3 frame, martin rudalics, 2021/05/02
- bug#46827: Broken initial size of GTK3 frame, Juri Linkov, 2021/05/02
- bug#46827: Broken initial size of GTK3 frame, martin rudalics, 2021/05/03
- bug#46827: Broken initial size of GTK3 frame,
martin rudalics <=
- bug#46827: Broken initial size of GTK3 frame, Juri Linkov, 2021/05/03
- bug#46827: Broken initial size of GTK3 frame, martin rudalics, 2021/05/03
- bug#46827: Broken initial size of GTK3 frame, martin rudalics, 2021/05/04
- bug#46827: Broken initial size of GTK3 frame, Juri Linkov, 2021/05/04
- bug#46827: Broken initial size of GTK3 frame, martin rudalics, 2021/05/05
- bug#46827: Broken initial size of GTK3 frame, Juri Linkov, 2021/05/05
- bug#46827: Broken initial size of GTK3 frame, martin rudalics, 2021/05/06
- bug#46827: Broken initial size of GTK3 frame, Juri Linkov, 2021/05/07
- bug#46827: Broken initial size of GTK3 frame, martin rudalics, 2021/05/10
- bug#46827: Broken initial size of GTK3 frame, Juri Linkov, 2021/05/10