unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: "Basil L. Contovounesios" <contovob@tcd.ie>, 48809@debbugs.gnu.org
Subject: bug#48809: 28.0.50; Missing Lucid/GTK2 graphical elements on tiling WM
Date: Fri, 4 Jun 2021 11:17:05 +0200	[thread overview]
Message-ID: <1e9040b0-dbb8-fc45-2bb7-6ec6d9bf81eb@gmx.at> (raw)
In-Reply-To: <875yyv2jsi.fsf@tcd.ie>

 > Further to the tangent in bug#48229, the menu, tool, and scroll bars are
 > sometimes not drawn when creating new Lucid/GTK2 frames under the tiling
 > WM Xmonad.  The missing elements reappear after the affected frames are
 > resized.
 >
 > I cannot reproduce any of these issues with GTK3/PGTK, but the Lucid
 > behaviour is present since at least Emacs 24.5.1 (I don't have old GTK2
 > builds at hand).  Affected Emacs 28 configurations follow my signature.

Thanks.  The only thing that is evident from your examples is that only
toolkit elements are affected.  Elements Emacs draws itself are not
missing in your examples.  I suppose the behavior you see happens
because Xmonad rejects a first size proposal of Emacs for these elements
and does not draw them, notifies Emacs that it wants different sizes for
these elements and that notification gets lost - somehow and at least
sometimes.  I have no good explanation why things work with GTK3 and not
with GTK2 though.  Are all behaviors you reported reliably reproducible?

One thing I'd like to exclude is that this is yet another instance of
Tom Gillespie's observation that Emacs does not play well with window
managers that do not set _NET_WM_STATE.  x_get_current_wm_state
apparently fails on such systems and we probably never (or at least not
always) get a not_hidden frame in the MapNotify case and have to wait
for a ConfigureNotify instead (which your remark about the reappearance
of missing elements after resizing would confirm).

To check this please do (setq frame-size-history '(100)) and proceed
with some of your broken behaviors.  I'd be interested if when you then
do (frame--size-history) and look into the *frame-size-history* buffer
you can see

"MapNotify, not hidden & not iconified"

entries.  Alternatively, you could set a watchpoint at xterm.c's

           bool not_hidden = x_get_current_wm_state (f, event->xmap.window, &value, &sticky);

and see whether a value of true is ever returned.

One thing you could try is to change

       if (v == 1 && f->visible != 1)
	redisplay_other_windows ();

to

       if (v == 1)
	redisplay_other_windows ();

in frame.h's SET_FRAME_VISIBLE so maybe Emacs would send the modified
elements (modified because the WM changed their size to something Emacs
didn't ask for) again.  Honestly, I have no hope that this would help.

martin





  reply	other threads:[~2021-06-04  9:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03 12:51 bug#48809: 28.0.50; Missing Lucid/GTK2 graphical elements on tiling WM Basil L. Contovounesios
2021-06-04  9:17 ` martin rudalics [this message]
2021-06-11 12:02   ` Basil L. Contovounesios
2021-06-11 16:40     ` martin rudalics
2021-06-12 10:44       ` Basil L. Contovounesios
2021-06-12 16:46         ` martin rudalics
2021-11-29 19:27           ` Lars Ingebrigtsen
2021-12-13 13:11             ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-14 13:39               ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e9040b0-dbb8-fc45-2bb7-6ec6d9bf81eb@gmx.at \
    --to=rudalics@gmx.at \
    --cc=48809@debbugs.gnu.org \
    --cc=contovob@tcd.ie \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).