GNU bug report logs - #53839
29.0.50; Strange bug causes tool bar to be overwritten

Previous Next

Package: emacs;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Mon, 7 Feb 2022 09:16:01 UTC

Severity: normal

Found in version 29.0.50

Done: Po Lu <luangruo <at> yahoo.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53839 in the body.
You can then email your comments to 53839 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#53839; Package emacs. (Mon, 07 Feb 2022 09:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Po Lu <luangruo <at> yahoo.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 07 Feb 2022 09:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Strange bug causes tool bar to be overwritten
Date: Mon, 07 Feb 2022 17:15:15 +0800
On any Motif or Lucid build, start Emacs with `-q', making sure that the
splash screen is displayed.  A single pixel at the bottom of the tool
bar will be overwritten by the window underneath it, until the frame is
resized again.

If I comment out this part of xfns.c:

      /* As long as tool_bar_resized is false, effectively try to change
	 F's native height.  */
      if (NILP (fullscreen) || EQ (fullscreen, Qfullwidth))
	adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
			   1, false, Qtool_bar_lines);
      else

The problem goes away, but I can't figure out why that is.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53839; Package emacs. (Mon, 07 Feb 2022 13:24:01 GMT) Full text and rfc822 format available.

Message #8 received at 53839 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Po Lu <luangruo <at> yahoo.com>, 53839 <at> debbugs.gnu.org
Subject: Re: bug#53839: 29.0.50; Strange bug causes tool bar to be overwritten
Date: Mon, 7 Feb 2022 14:23:18 +0100
[Message part 1 (text/plain, inline)]
> On any Motif or Lucid build, start Emacs with `-q', making sure that the
> splash screen is displayed.  A single pixel at the bottom of the tool
> bar will be overwritten by the window underneath it, until the frame is
> resized again.
>
> If I comment out this part of xfns.c:
>
>        /* As long as tool_bar_resized is false, effectively try to change
> 	 F's native height.  */
>        if (NILP (fullscreen) || EQ (fullscreen, Qfullwidth))
> 	adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
> 			   1, false, Qtool_bar_lines);
>        else
>
> The problem goes away, but I can't figure out why that is.

I cannot reproduce that here, neither with the release branch nor with
master.  See the attached screenshot and notice one pixel between tool
bar and root window that comes from 'tool-bar-border'.

martin
[Lucid-master-emacs-q.png (image/png, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53839; Package emacs. (Mon, 07 Feb 2022 13:30:01 GMT) Full text and rfc822 format available.

Message #11 received at 53839 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 53839 <at> debbugs.gnu.org
Subject: Re: bug#53839: 29.0.50; Strange bug causes tool bar to be overwritten
Date: Mon, 07 Feb 2022 21:29:34 +0800
martin rudalics <rudalics <at> gmx.at> writes:

> I cannot reproduce that here, neither with the release branch nor with
> master.  See the attached screenshot and notice one pixel between tool
> bar and root window that comes from 'tool-bar-border'.

Maybe it's related to some code waiting for a configure event that never
arrives?

FWIW, the window manager I used to test was GNOME Shell.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53839; Package emacs. (Mon, 07 Feb 2022 15:51:01 GMT) Full text and rfc822 format available.

Message #14 received at 53839 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 53839 <at> debbugs.gnu.org
Subject: Re: bug#53839: 29.0.50; Strange bug causes tool bar to be overwritten
Date: Mon, 7 Feb 2022 16:49:57 +0100
> FWIW, the window manager I used to test was GNOME Shell.

Then the reason is what I told you earlier: In x_wm_set_size_hint in
xterm.c I have


#ifndef USE_GTK
void
x_wm_set_size_hint (struct frame *f, long flags, bool user_position, bool base_size)
{
  XSizeHints size_hints;
  Window window = FRAME_OUTER_WINDOW (f);

  if (!window)
    return;

  /* 2021 REMIX: Don't call widget_update_wm_size_hints here since on
     GNOME shell get_wm_shell may fail to produce the wmshell widget.
     As a consequence, no size hints get set before we issue our resize
     request, mutter (presumably) refuses to resize the outer window as
     requested and we end up with a wrong initial frame size.

     It's not clear whether other calls of update_wm_hints are affected
     as well but not calling widget_update_wm_size_hints here seems
     sufficient to fix the bug.  */

/** #ifdef USE_X_TOOLKIT **/
/**   if (f->output_data.x->widget) **/
/**     { **/
/**       widget_update_wm_size_hints (f->output_data.x->widget); **/
/**       return; **/
/**     } **/
/** #endif **/

  /* Setting PMaxSize caused various problems.  */

...

which works around that problem.  (I didn't try your fix but am
convinced that it gets the initial frame height wrong.)

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53839; Package emacs. (Tue, 08 Feb 2022 00:47:02 GMT) Full text and rfc822 format available.

Message #17 received at 53839 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 53839 <at> debbugs.gnu.org
Subject: Re: bug#53839: 29.0.50; Strange bug causes tool bar to be overwritten
Date: Tue, 08 Feb 2022 08:46:07 +0800
martin rudalics <rudalics <at> gmx.at> writes:

>   /* 2021 REMIX: Don't call widget_update_wm_size_hints here since on
>      GNOME shell get_wm_shell may fail to produce the wmshell widget.
>      As a consequence, no size hints get set before we issue our resize
>      request, mutter (presumably) refuses to resize the outer window as
>      requested and we end up with a wrong initial frame size.
>
>      It's not clear whether other calls of update_wm_hints are affected
>      as well but not calling widget_update_wm_size_hints here seems
>      sufficient to fix the bug.  */
>
> /** #ifdef USE_X_TOOLKIT **/
> /**   if (f->output_data.x->widget) **/
> /**     { **/
> /**       widget_update_wm_size_hints (f->output_data.x->widget); **/
> /**       return; **/
> /**     } **/
> /** #endif **/
>
> which works around that problem.  (I didn't try your fix but am
> convinced that it gets the initial frame height wrong.)

I fixed the calls to widget_update_wm_size_hints on master, and it fixes
the bug, so if you're happy with that fix I'll close this bug now.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53839; Package emacs. (Tue, 08 Feb 2022 08:58:02 GMT) Full text and rfc822 format available.

Message #20 received at 53839 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 53839 <at> debbugs.gnu.org
Subject: Re: bug#53839: 29.0.50; Strange bug causes tool bar to be overwritten
Date: Tue, 8 Feb 2022 09:57:26 +0100
> I fixed the calls to widget_update_wm_size_hints on master, and it fixes
> the bug, so if you're happy with that fix I'll close this bug now.

If it works for you, close it.  I do not synch with master these days
because of Bug#52709.

martin




Reply sent to Po Lu <luangruo <at> yahoo.com>:
You have taken responsibility. (Tue, 08 Feb 2022 09:23:03 GMT) Full text and rfc822 format available.

Notification sent to Po Lu <luangruo <at> yahoo.com>:
bug acknowledged by developer. (Tue, 08 Feb 2022 09:23:03 GMT) Full text and rfc822 format available.

Message #25 received at 53839-done <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 53839-done <at> debbugs.gnu.org
Subject: Re: bug#53839: 29.0.50; Strange bug causes tool bar to be overwritten
Date: Tue, 08 Feb 2022 17:22:07 +0800
martin rudalics <rudalics <at> gmx.at> writes:

>> I fixed the calls to widget_update_wm_size_hints on master, and it fixes
>> the bug, so if you're happy with that fix I'll close this bug now.

> If it works for you, close it.  I do not synch with master these days
> because of Bug#52709.

Thanks, closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 08 Mar 2022 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 108 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.