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>
Cc: 45620@debbugs.gnu.org
Subject: bug#45620: 28.0.50; Child frames should have their own border width and colour
Date: Mon, 4 Jan 2021 17:22:44 +0100	[thread overview]
Message-ID: <8af92126-3e57-66c0-08e9-b0b5326fa538@gmx.at> (raw)
In-Reply-To: <f4d634a0-9b66-cef5-96e1-dffbd1c29ff6@web.de>

 > What customisations are you referring to? I cannot think of any
 > scenario, other than changing and reloading your theme, that could
 > change the settings of already present child frames.

Here I'm using a child frame for popping up the minibuffer with the
customization

(defcustom pop-up-mini-internal-border "blue"
   "Background of internal border of 'pop-up-mini-frame'."
   ...

and the form

   (set-face-background
    'internal-border pop-up-mini-internal-border pop-up-mini-frame)

to put it into practice when setting up such a frame.  This works fine
until I do M-x customize-face RET internal-border RET.  As soon as I
apply the value I customized there, my minibuffer child frame gets that
border instead of the one specified via 'pop-up-mini-internal-border'
above.

 >  > If I'm not mistaken we use that face for our tooltip frames too which
 >  > means one more conflict.
 >
 > Partially. On my system the internal-border colour and width only
 > applied to the top and left sides of the tooltip frame.

Yes.  I think there's a bug somewhere but the only time I tried to
locate it, I decided that someone else intentionally does it that way.

 > Packages do have the choice, they just have to make sure to override the
 > frame-local faces whenever they show something. The problem, as I see
 > it, is that they *have to* create a face to override the local
 > internal-border, instead of just having the option to do it, because
 > themes cannot offer a general setting, like an easily visible dark
 > border on a bright foreground, because they run into the frame margin
 > colour conflict like modus did in the linked issue. So if a package
 > doesn't overwrite the local internal-border your default look-and-feel
 > is a badly visible same-colour-on-same-colour popup.

Agreed.  On a historical note, I had to add the entire internal border
entertainment to child frames because neither gtk nor X bother to supply
the normal window manager border for them (Windows does) and so you can
neither make them stand apart easily nor can you resize them with the
mouse.  Implementing the latter from within Emacs was even very
entertaining.  I intentionally left the border color alone because I'm
convinced that customizing it is a bad idea as sketched in the above
scenario and packages should always try their own way to specify it.

 >  > So what should we do? Provide a separate 'child-frame-internal-border'
 >  > face and then probably also a 'tooltip-internal-border-face'?
 >
 > That would be perfectly good enough for themes like modus, yes.

Can you propose a patch?  Look at where we use INTERNAL_BORDER_FACE_ID
to set up a face (x_clear_under_internal_border in xterm.c is an
example), check f for child-frameness there and use the new face if the
frame is a child frame.  But be aware: Users like me will then have to
separately set the background for the child frame face so you might get
incompatibility complaints ...

martin





  reply	other threads:[~2021-01-04 16:22 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-03 13:24 bug#45620: 28.0.50; Child frames should have their own border width and colour Alexander Miller
2021-01-03 16:15 ` martin rudalics
2021-01-04 13:38 ` Alexander Miller
2021-01-04 16:22   ` martin rudalics [this message]
2021-01-04 17:48 ` Alexander Miller
2021-01-04 18:54   ` martin rudalics
2021-01-05 12:50 ` Alexander Miller
2021-01-05 15:33   ` martin rudalics
2021-01-05 15:34     ` martin rudalics
2021-01-06 11:32       ` Arthur Miller
2021-01-06 13:36         ` martin rudalics
2021-01-06 15:01           ` Arthur Miller
2021-01-05 16:26     ` Eli Zaretskii
2021-01-06 16:32 ` Alexander Miller
2021-01-06 18:48   ` martin rudalics
2021-01-13  9:17 ` Alexander Miller
2021-01-13 18:07   ` martin rudalics
2021-01-25 12:08 ` Alexander Miller
2021-01-25 19:05   ` martin rudalics
2021-01-26 15:59     ` martin rudalics
2021-01-27 20:49       ` Alan Third
2021-01-28  9:42         ` martin rudalics
2021-01-28 16:35           ` Alan Third
2021-01-29  7:51             ` martin rudalics
2021-01-27 20:44 ` Alexander Miller
2021-01-28  3:33   ` Eli Zaretskii
2021-01-28  7:06 ` Alexander Miller

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=8af92126-3e57-66c0-08e9-b0b5326fa538@gmx.at \
    --to=rudalics@gmx.at \
    --cc=45620@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).