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

Re: [PATCH] Double Window Borders



On Sun, Jul 22, 2012 at 04:34:11PM +0200, Bastien Dejean wrote:
> > the code itself works as expected.
> 
> While it works as expected, I noticed some flickering when switching the
> focus from one window to the other.
> 
> I thought it might be related to the *set_double_window_border* function
> being called multiple times, and unfortunately it seems it is the case:
> I've added an *HSDebug* call in that function and when the focus moves
> from window A to window B, the function is called 2 times on A and 3
> times on B!
> 
> I read the comment in the *window_focus* function: âwindow_focus is
> always called twiceâ, why is that? What's the difference between
> `window_unfocus(lastfocus)` and `window_unfocus_last()`?

I set the focus before and after mapping the clients (before mapping it
to actually avoid flickering and after to ensure that the focus is put
correctly).

The window_unfocus_last() only unfocuses the focused window *and* gives
the focus to the root window. That is needed if a frame with no clients
in it is focused. So "root_window_focus()" would be a better name for
it.

> > So we maybe also should rename the smart_*_surroundings to
> > smart_*_surrounding. (But maybe surroundings is OK here; if we rename
> > that, that would be another commit of course)
> 
> No, it should remain like that: *surroundings* is a (singular) noun
> while *surrounding* is an adjective.

You're right... I just made this mistake the second time...

Thorsten

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/