[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tabs
From: |
martin rudalics |
Subject: |
Re: Tabs |
Date: |
Mon, 14 Oct 2019 20:02:57 +0200 |
> This will require some surgery, so don't expect a fix in a few days.
>
> And I have no idea yet whether and how this could affect GTK builds.
The forensics (informal):
(1) Suppose you have a frame with a visible tab-bar (and no other
pseudo window) and save its window configuration. In the saved
configuration, the root window is at a line 3.
(2) You disable the tab-bar. The root window is now at line 0.
(3) You restore the configuration saved in (1). The root window is at
line 2 again. Now adjust_frame_size kicks in. And this one had
the optimization to do almost nothing in the most frequent case
where
&& new_text_width == old_text_width
&& new_text_height == old_text_height
&& new_windows_width == old_windows_width
&& new_windows_height == old_windows_height
&& new_pixel_width == old_pixel_width
&& new_pixel_height == old_pixel_height
&& new_cols == old_cols
&& new_lines == old_lines)
/* No change. Sanitize window sizes and return. */
hold. Unfortunately, in our case all of these miraculously do
hold, apparently nothing changed.
The reason for this is the 'frame-inhibit-implied-resize' nil setting.
When (2) removes the tab bar from the frame this sets all these sizes
(which later here appear as old_...) to the sizes of the saved window
configuration (which appear here as new_...) and we have a frame where
the root window remains at line 3 and its bottom is cut off.
I attach a patch for this. Please carefully check all builds with
'frame-inhibit-implied-resize' nil for whether they DTRT now (and
obviously the GTK build is affected too since the tab-bar is now its
first internal window).
martin
PS: I noticed two annoying things about tab-bar - it (1) usurpates my
private <C-tab> binding even after I turned it off and (2) apparently
turns off 'truncate-lines' (always t here) in the buffer from where I
invoked it. Finally, I can't make tab-bar work on Windows any more
always getting something like
Debugger entered--Lisp error: (wrong-type-argument sequencep #<buffer
*Messages*>)
#f(compiled-function (tab) #<bytecode 0x1d723d1>)((current-tab (name . #<buffer
*Messages*>)))
mapcan(#f(compiled-function (tab) #<bytecode 0x1d723d1>) ((current-tab (name .
#<buffer *Messages*>))))
tab-bar-make-keymap-1()
tab-bar-make-keymap(ignore)
redisplay_internal\ \(C\ function\)()
redisplay()
sit-for(2)
execute-extended-command(nil "tab-bar-mode" "tab-bar-mode")
funcall-interactively(execute-extended-command nil "tab-bar-mode"
"tab-bar-mode")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
Any ideas?
adjust_frame_size.diffs
Description: Text document
- Re: Tabs, (continued)
- Re: Tabs, Juri Linkov, 2019/10/09
- Re: Tabs, Eli Zaretskii, 2019/10/10
- Re: Tabs, Juri Linkov, 2019/10/10
- Re: Tabs, martin rudalics, 2019/10/11
- Re: Tabs, Juri Linkov, 2019/10/12
- Re: Tabs, martin rudalics, 2019/10/13
- Re: Tabs,
martin rudalics <=
- Re: Tabs, Eli Zaretskii, 2019/10/14
- Re: Tabs, martin rudalics, 2019/10/15
- Re: Tabs, Juri Linkov, 2019/10/14
- Re: Tabs, T.V Raman, 2019/10/14
- Re: Tabs, Phil Sainty, 2019/10/14
- Re: Tabs, Juri Linkov, 2019/10/14
- Re: Tabs, T.V Raman, 2019/10/14
- Re: Tabs, Juri Linkov, 2019/10/15
- Re: Tabs, T.V Raman, 2019/10/15
- Re: Tabs, Eli Zaretskii, 2019/10/15