From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751685AbdGaRZe (ORCPT ); Mon, 31 Jul 2017 13:25:34 -0400 Received: from vern.gendns.com ([206.190.152.46]:58980 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750987AbdGaRZc (ORCPT ); Mon, 31 Jul 2017 13:25:32 -0400 Subject: Re: [PATCH] fbcon: Use background color for margins To: Pavel Machek Cc: linux-fbdev@vger.kernel.org, Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org References: <1501273590-3237-1-git-send-email-david@lechnology.com> <20170730094726.GB18381@amd> <2cafbde9-6b31-9586-e3eb-0b80355eab3c@lechnology.com> <20170730215108.GA806@amd> From: David Lechner Message-ID: Date: Mon, 31 Jul 2017 12:25:28 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170730215108.GA806@amd> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/30/2017 04:51 PM, Pavel Machek wrote: > Hi! > >>>> Screens that don't have a black border around the active area will have >>>> ugly black bars for the margin when the text background color is not black. >>>> This is especially noticeable on an LCD screen (not the backlit kind) when >>>> the terminal colors are inverted. >>> >>> Are you sure? >> >> Of course I am sure. Otherwise I would not send a patch. ;-) >> >> I have attached some pictures to explain it better. The default-console.jpg >> picture shows what it looks like using just defaults. I think it is hard to >> read the white text with the black background. >> >> So, the solution is to invert the terminal colors. But when you do this, the >> margins are not inverted, so you are left with black bars on the bottom and >> the right as seen in inverted-without-patch.jpg. >> >> With this patch applied, the margins are also inverted, so you don't have >> the black bars as seen in inverted-with-patch.jpg. I think this is much >> nicer. >> >> It is quite common to have different backgrounds in >>> different parts of the screen, how it is supposed to work there? >> >> There will be nothing different in this regard. Only the margins (non-text >> area) are changed. > > So you have something like midnight commander, which uses colors. > > Lets say top half of screen is normal, bottom one is inverted. What > color will borders be? > > Will not they do something stupid (such as changing) when the > curses-based application refreshes? > Ah. I see what you mean now. The margin will be whatever is set for the vc_video_erase_char in the kernel, which can be changed by userspace. I tried midnight commander and sure enough, I still have the black margins when I invert the screen (`setterm -inverse on`). Interestingly, after allowing the console to blank after a timeout, the console was blanked with white, then after pressing a key to unblank, the margins were also white. So, scratch this one. I will re-evaluate and send a new patch.