Re: [dwm] urxvt and show/hide bar

From: Carlos Pita <carlosjosepita_AT_gmail.com>
Date: Tue, 11 Nov 2008 04:30:57 -0200

I've also patched dwm to put the bar above other windows, which is
fine regarding the way I use it, giving it a quick glance now and
then. It's a very simple patch that modifies updategeom() a bit:

1619c1619
< wy = showbar && topbar ? sy + bh : sy;

---
> 		wy = sy;
1621c1621
< 		wh = showbar ? sh - bh : sh;
---
> 		wh = sh;
1625c1625
< 	by = showbar ? (topbar ? wy - bh : wy + wh) : -bh;
---
> 	by = showbar ? (topbar ? 0 : sh - bh) : -bh
Which I'm unsure about is the following line in manage():
	/* only fix client y-offset, if the client center might cover the bar */
		c->y = MAX(c->y, ((by == 0) && (c->x + (c->w / 2) >= wx) && (c->x +
(c->w / 2) < wx + ww)) ? bh : sy);
I understand the condition meaning (x client center is inside window
and bar is visible) but I can't see the point of it. Besides, this is
called before window layout, so if wy = sy as in my patch, most
layouts will move the window to sy afterwards.
Could you clarify this  point? Should  I change the entire line to
c->y = MAX(c->y, sy) to be coherent with my patch?
Best regards
-Carlos
On Tue, Nov 11, 2008 at 3:04 AM, Carlos Pita <carlosjosepita_AT_gmail.com> wrote:
> Ok, I reset resizehints to true and change nonselected border to black
> (with black root). It seems a saner setup and it's still visually
> pleasant.
>
> Btw, I noticed that other terminal emulators, even other variants of
> rxvt, don't show this "phantom line" behavior. Anyway, I prefer to
> play fair with apps instead of fooling them just for aesthetic
> matters.
>
> Regards
> -Carlos
>
> On Tue, Nov 11, 2008 at 2:01 AM, Premysl Hruby <dfenze_AT_gmail.com> wrote:
>> On (11/11/08 01:01), Carlos Pita wrote:
>>> To: dwm mail list <dwm_AT_suckless.org>
>>> From: Carlos Pita <carlosjosepita_AT_gmail.com>
>>> Subject: [dwm] urxvt and show/hide bar
>>> Reply-To: dwm mail list <dwm_AT_suckless.org>
>>> List-Id: dwm mail list <dwm.suckless.org>
>>>
>>> Hi all,
>>>
>>> I usually prefer to keep the bar hidden so I've written a tiny patch
>>> in order to show it when a window has the urgent hint.
>>>
>>> But when I'm working with the urxvt term and the bar appears, the last
>>> line in the console is duplicated, a phantom version of it appears
>>> below it. If I change the tag or the layout, or hide the bar again,
>>> the term is redrawn correctly again.
>>>
>>> Any ideas?
>>>
>>> Best regards
>>> -Carlos
>>>
>>
>> Hi,
>>
>> Afaik there's no easy solution, as (u)rxvt depends with this on having
>> window size be multiple of windows size increments (given by wmhints).
>> But this iirc is NOT MUST by ICCCM. This is how this broblem occur, the
>> last line is duplicated, because rxvt doesn't redraw it (because it
>> think that it have window size given by itself -- which mustn't be true
>> in tile mode with resizehints == false).
>>
>> -Ph
>>
>> --
>> Premysl "Anydot" Hruby, http://www.redrum.cz/
>>
>>
>
Received on Tue Nov 11 2008 - 06:30:57 UTC

This archive was generated by hypermail 2.2.0 : Tue Nov 11 2008 - 06:36:04 UTC