unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Alexander Miller <alexanderm@web.de>, 40639@debbugs.gnu.org
Subject: bug#40639: 26.3; Child frame border color not rendered when child frame has no minibuffer
Date: Wed, 15 Apr 2020 19:20:45 +0200	[thread overview]
Message-ID: <ab39a882-3dc9-6b3c-7cbb-441fdb96104f@gmx.at> (raw)
In-Reply-To: <16aef18e-c440-ca3a-a41b-5079d206ece4@web.de>

 > Starting from emacs -q run this:
 >
 > (set-face-background 'internal-border "red")
 > (select-window
 >   (display-buffer-in-child-frame
 >    (get-buffer-create "*scratch*")
 >    '((child-frame-parameters
 >       .
 >       ((left . 100)
 >        (top  . 100)
 >        (height . 10)
 >        (width . 100)
 >        (minibuffer . nil)
 >        (internal-border-width . 300))))))
 >
 > The child frame will pop up and its large border covers a large parts of
 > the buffer, but it is the same color as the background, not the red we
 > have set above. The only way I found to fix the color is to click on the
 > child frame. Calling the likes of select-frame, x-focus-frame,
 > select-frame-set-input-focus does not help. When the minibuffer
 > parameter is set to t the border is drawn as expected.
 >
 > If the call to select-window is left out the border will have the wrong
 > color regardless of minibuffer setting. Clicking the child frame will
 > likewise change it to red.
 >
 > It could be that this is related to my unorthodox wm setup: I am running
 > xfce with i3wm replacing xfwm4.

I'm aware of this bug and see it frequently when debugging child frame
issues.  Unfortunately, I don't know what's causing it because I have no
idea how face remapping is supposed to work internally.  What happens is
that when x_clear_under_internal_border runs this part

       int face_id =
	!NILP (Vface_remapping_alist)
	? lookup_basic_face (NULL, f, INTERNAL_BORDER_FACE_ID)
	: INTERNAL_BORDER_FACE_ID;
       struct face *face = FACE_FROM_ID_OR_NULL (f, face_id);

       block_input ();

       if (face)
	{
	  unsigned long color = face->background;

the value of color for a new normal frame is for a few calls white but
switches to red before the frame appears on the display.  A child frame
usually must be explicitly focused before its border becomes red (I
don't necessarily need the mouse for that purpose, C-x 5 o works too).

Maybe our experts in face remapping have an idea.

martin





  reply	other threads:[~2020-04-15 17:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15 10:10 bug#40639: 26.3; Child frame border color not rendered when child frame has no minibuffer Alexander Miller
2020-04-15 17:20 ` martin rudalics [this message]
2020-04-15 17:32   ` Eli Zaretskii
2020-04-16  8:31     ` martin rudalics
2020-04-18  8:51       ` martin rudalics

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=ab39a882-3dc9-6b3c-7cbb-441fdb96104f@gmx.at \
    --to=rudalics@gmx.at \
    --cc=40639@debbugs.gnu.org \
    --cc=alexanderm@web.de \
    /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).