bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling assume_default_colors


From: Pavel Stehule
Subject: Re: Handling assume_default_colors
Date: Tue, 1 Oct 2019 11:42:05 +0200

Hi

út 1. 10. 2019 v 11:22 odesílatel Thomas Dickey <address@hidden> napsal:
On Mon, Sep 30, 2019 at 11:12:24AM -0500, Bryan Christ wrote:
> Thomas,
>
> In about 90% or more of all scenarios, pair zero is most likely color white

actually that depends on configuration (X defaults to black text on white,
but ncurses assumes white on back because that's documented in X/Open).

There's no portable way for ncurses to know whether its assumption is
correct; assume_default_colors is used to make mistakes about the assumption
less inefficient :-)

I use this function for global changing backgrounds. Is it wrong usage? It is interesting - it is working very well (almost well).
 

> foreground on color black background.  However, assume_default_colors()
> allows this "rule" to be broken.  As far as I can tell, there is no way for
> my terminal emulator to know about this change.
>
> When an application uses init_color() and the underlying term is an xterm
> variant, ncurses emits a OSC sequence that tells me about this custom color
> (via XParseColor).  Would it be possible to have ncurses emit a different
> OSC to indicate when assume_default_colors() is used and what pair zero
> colors are (in XParseColor RGB values)?

--
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net
_______________________________________________
Bug-ncurses mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-ncurses

reply via email to

[Prev in Thread] Current Thread [Next in Thread]