unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#52986: 29.0.50; tab bar doesn't immediately show
@ 2022-01-03 19:15 Dustin Lacewell
  2022-01-03 19:39 ` Eli Zaretskii
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Dustin Lacewell @ 2022-01-03 19:15 UTC (permalink / raw)
  To: 52986

[-- Attachment #1: Type: text/plain, Size: 3531 bytes --]

Evaluating (tab-bar-mode 1) after startup, the tab-bar does not immediately
appear. I must resize or bring some other (non-emacs) window in front of
emacs in order for it to (repaint? and) display.

I use a tiling window manager on Linux, not sure if that's relevant.

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30,
cairo version 1.16.0)
Repository revision: af729b1dfd235de400f6a0998a968222417596bf
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: NixOS 22.05 (Quokka)

Configured using:
 'configure
 --prefix=/nix/store/qy1nhgarwvb43zz3yxfr1hhv2fbp868a-emacs-git-20220102.0
 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft
 --with-cairo --with-native-compilation'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/ldlework/.nix-profile/share/emacs/site-lisp/site-start hides
/nix/store/qy1nhgarwvb43zz3yxfr1hhv2fbp868a-emacs-git-20220102.0/share/emacs/site-lisp/site-start

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media rmc puny
dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg
rfc6068 epg-config gnus-util text-property-search time-date mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils seq gv subr-x byte-opt bytecomp byte-compile cconv
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget keymap hashtable-print-readable backquote threads
dbusbind inotify dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 59128 8770)
 (symbols 48 5672 0)
 (strings 32 16682 1329)
 (string-bytes 1 583802)
 (vectors 16 11876)
 (vector-slots 8 265741 16015)
 (floats 8 21 33)
 (intervals 56 342 0)
 (buffers 992 11))

[-- Attachment #2: Type: text/html, Size: 3897 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#52986: 29.0.50; tab bar doesn't immediately show
  2022-01-03 19:15 bug#52986: 29.0.50; tab bar doesn't immediately show Dustin Lacewell
@ 2022-01-03 19:39 ` Eli Zaretskii
       [not found]   ` <CAMDmBpH-+Vt+Wf2PzFHYsLQRWwd9bT-AEkwr2SMdtMESG6e0gg@mail.gmail.com>
  2022-01-04  1:08 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2022-01-03 19:39 UTC (permalink / raw)
  To: Dustin Lacewell; +Cc: 52986

> From: Dustin Lacewell <dlacewell@gmail.com>
> Date: Mon, 3 Jan 2022 13:15:02 -0600
> 
> Evaluating (tab-bar-mode 1) after startup, the tab-bar does not immediately appear. I must resize or bring
> some other (non-emacs) window in front of emacs in order for it to (repaint? and) display.

Not reproducible here.

> I use a tiling window manager on Linux, not sure if that's relevant.

It probably is.  Activating tab-bar-mode involves resizing the frame,
so the WM is involved.  If it doesn't feed us the events we expect, we
won't repaint the frame, I think.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#52986: 29.0.50; tab bar doesn't immediately show
       [not found]   ` <CAMDmBpH-+Vt+Wf2PzFHYsLQRWwd9bT-AEkwr2SMdtMESG6e0gg@mail.gmail.com>
@ 2022-01-03 20:04     ` Eli Zaretskii
  2022-01-04  8:51       ` martin rudalics
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2022-01-03 20:04 UTC (permalink / raw)
  To: Dustin Lacewell, martin rudalics; +Cc: 52986

[Please use Reply All to keep the bug tracker on the CC list.]

> From: Dustin Lacewell <dlacewell@gmail.com>
> Date: Mon, 3 Jan 2022 13:57:40 -0600
> 
> Do you have any idea what the window manager needs to do? I can try to relay some advice upstream to the
> QTile project.

I think the ConfigureNotify event?  Martin, am I right?





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#52986: 29.0.50; tab bar doesn't immediately show
  2022-01-03 19:15 bug#52986: 29.0.50; tab bar doesn't immediately show Dustin Lacewell
  2022-01-03 19:39 ` Eli Zaretskii
@ 2022-01-04  1:08 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-01-04  8:51 ` martin rudalics
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-01-04  1:08 UTC (permalink / raw)
  To: Dustin Lacewell; +Cc: 52986

Dustin Lacewell <dlacewell@gmail.com> writes:

> I use a tiling window manager on Linux, not sure if that's relevant.

Can you tell us the value of:

  (frame-parameter nil 'fullscreen)

Immediately after startup?  Thanks.

I suspect Emacs is trying to resize the frame to accommodate the tab
bar, but the window manager isn't sending a ConfigureNotify event back
to Emacs.

IMO, tiling window managers should simply set
_NET_WM_STATE_MAXIMIZED_HORZ and _NET_WM_STATE_MAXIMIZED_VERT on all
windows, which avoids this problem completely, but they should at least
send a ConfigureNotify event to Emacs.

Which window manager are you using?

Thanks.





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#52986: 29.0.50; tab bar doesn't immediately show
  2022-01-03 19:15 bug#52986: 29.0.50; tab bar doesn't immediately show Dustin Lacewell
  2022-01-03 19:39 ` Eli Zaretskii
  2022-01-04  1:08 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-01-04  8:51 ` martin rudalics
  2022-01-22 23:02 ` Alex Griffin via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-01-24  9:52 ` martin rudalics
  4 siblings, 0 replies; 11+ messages in thread
From: martin rudalics @ 2022-01-04  8:51 UTC (permalink / raw)
  To: Dustin Lacewell, 52986

 > Evaluating (tab-bar-mode 1) after startup,

Maybe adding a (tab-bar-lines . 1) entry to 'default-frame-alist' would
be better.  To further improve things, you could try to do that in your
early-init file.

 > the tab-bar does not immediately
 > appear. I must resize or bring some other (non-emacs) window in front of
 > emacs in order for it to (repaint? and) display.

Does this problem also happen when you toggle 'tab-bar-mode' later?
Does toggling the menu, tool or scroll bar suffer a similar problem?

 > I use a tiling window manager on Linux, not sure if that's relevant.

With a tiling window manager, set 'frame-inhibit-implied-resize' to t
unconditionally.  This should spare you lots of problems.

martin





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#52986: 29.0.50; tab bar doesn't immediately show
  2022-01-03 20:04     ` Eli Zaretskii
@ 2022-01-04  8:51       ` martin rudalics
  0 siblings, 0 replies; 11+ messages in thread
From: martin rudalics @ 2022-01-04  8:51 UTC (permalink / raw)
  To: Eli Zaretskii, Dustin Lacewell; +Cc: 52986

 >> Do you have any idea what the window manager needs to do? I can try to relay some advice upstream to the
 >> QTile project.
 >
 > I think the ConfigureNotify event?  Martin, am I right?

Yes.  Although IMHO the QTile people should not be bothered with one of
the silliest of our idiosyncrasies.

martin





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#52986: 29.0.50; tab bar doesn't immediately show
  2022-01-03 19:15 bug#52986: 29.0.50; tab bar doesn't immediately show Dustin Lacewell
                   ` (2 preceding siblings ...)
  2022-01-04  8:51 ` martin rudalics
@ 2022-01-22 23:02 ` Alex Griffin via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-01-23 10:15   ` martin rudalics
  2022-01-24  9:52   ` martin rudalics
  2022-01-24  9:52 ` martin rudalics
  4 siblings, 2 replies; 11+ messages in thread
From: Alex Griffin via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-01-22 23:02 UTC (permalink / raw)
  To: 52986

I think I'm also hitting this issue just by docking Emacs to the side in
GNOME Shell. I've set 'frame-inhibit-implied-resize' to t, but Emacs
still wants to resize the frame when initializing tab-bar-mode.

I'm currently using Emacs 29.0.50 for the new GTK/Wayland support, and I
don't see the same issue on Emacs 28.0.91.

Thanks,
--
Alex Griffin






^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#52986: 29.0.50; tab bar doesn't immediately show
  2022-01-22 23:02 ` Alex Griffin via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-01-23 10:15   ` martin rudalics
  2022-01-24  9:52   ` martin rudalics
  1 sibling, 0 replies; 11+ messages in thread
From: martin rudalics @ 2022-01-23 10:15 UTC (permalink / raw)
  To: Alex Griffin, 52986

 > I think I'm also hitting this issue just by docking Emacs to the side in
 > GNOME Shell. I've set 'frame-inhibit-implied-resize' to t, but Emacs
 > still wants to resize the frame when initializing tab-bar-mode.

'frame-inhibit-implied-resize' defaults to '(tab-bar-lines) so you don't
even have to change its value.  What you see is the following: It's a
long established practice that people want their frames initially have
a specified number of lines, disregarding the height of things like the
tool or tab bar.  To do that, Emacs calculates the initial pixel height
of a GUI frame from the number of lines specified for it plus the pixel
heights of a tool and tab bar, if present.

Now the code that adds the latter ('x_change_tab_bar_height') uses two
boolean slots for each frame - tab_bar_resized and tab_bar_redisplayed -
both initially false.  The latter is set by the display engine in
redisplay_tab_bar to indicate that the tab bar has been redisplayed once
so its pixel height has been established.  The former is then set by
'x_change_tab_bar_height' from the latter.  As long as tab_bar_resized
has not been set for a specific frame, 'frame-inhibit-implied-resize'
has no effect - Emacs will ask the window manager to resize it.

 > I'm currently using Emacs 29.0.50 for the new GTK/Wayland support, and I
 > don't see the same issue on Emacs 28.0.91.

You should see it on Emacs 28.  Only if you start Emacs with tab bar
mode enabled initially you should not see it.

martin





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#52986: 29.0.50; tab bar doesn't immediately show
  2022-01-03 19:15 bug#52986: 29.0.50; tab bar doesn't immediately show Dustin Lacewell
                   ` (3 preceding siblings ...)
  2022-01-22 23:02 ` Alex Griffin via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-01-24  9:52 ` martin rudalics
  4 siblings, 0 replies; 11+ messages in thread
From: martin rudalics @ 2022-01-24  9:52 UTC (permalink / raw)
  To: Dustin Lacewell, 52986

 > Evaluating (tab-bar-mode 1) after startup, the tab-bar does not immediately
 > appear. I must resize or bring some other (non-emacs) window in front of
 > emacs in order for it to (repaint? and) display.
 >
 > I use a tiling window manager on Linux, not sure if that's relevant.

Please try again with most recent master.

Thanks, martin





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#52986: 29.0.50; tab bar doesn't immediately show
  2022-01-22 23:02 ` Alex Griffin via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-01-23 10:15   ` martin rudalics
@ 2022-01-24  9:52   ` martin rudalics
  2022-02-21 14:22     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 11+ messages in thread
From: martin rudalics @ 2022-01-24  9:52 UTC (permalink / raw)
  To: Alex Griffin, 52986

 > I think I'm also hitting this issue just by docking Emacs to the side in
 > GNOME Shell. I've set 'frame-inhibit-implied-resize' to t, but Emacs
 > still wants to resize the frame when initializing tab-bar-mode.
 >
 > I'm currently using Emacs 29.0.50 for the new GTK/Wayland support, and I
 > don't see the same issue on Emacs 28.0.91.

I checked in a fix.  Please try again with most recent master.

Thanks, martin





^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#52986: 29.0.50; tab bar doesn't immediately show
  2022-01-24  9:52   ` martin rudalics
@ 2022-02-21 14:22     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-21 14:22 UTC (permalink / raw)
  To: martin rudalics; +Cc: Alex Griffin, 52986

martin rudalics <rudalics@gmx.at> writes:

>> I'm currently using Emacs 29.0.50 for the new GTK/Wayland support, and I
>> don't see the same issue on Emacs 28.0.91.
>
> I checked in a fix.  Please try again with most recent master.

This was the final post in this bug thread (a month ago), so I assume
that it worked well, and I'm therefore closing this bug report.  If it's
still an issue, please respond to the debbugs address and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-02-21 14:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-03 19:15 bug#52986: 29.0.50; tab bar doesn't immediately show Dustin Lacewell
2022-01-03 19:39 ` Eli Zaretskii
     [not found]   ` <CAMDmBpH-+Vt+Wf2PzFHYsLQRWwd9bT-AEkwr2SMdtMESG6e0gg@mail.gmail.com>
2022-01-03 20:04     ` Eli Zaretskii
2022-01-04  8:51       ` martin rudalics
2022-01-04  1:08 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-04  8:51 ` martin rudalics
2022-01-22 23:02 ` Alex Griffin via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-23 10:15   ` martin rudalics
2022-01-24  9:52   ` martin rudalics
2022-02-21 14:22     ` Lars Ingebrigtsen
2022-01-24  9:52 ` martin rudalics

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).