Hi,

Since I failed to convince Michael to accept my newer patch, I decide to
drop those more "advanced" patch, and try to push this simple patch into i3.

On Fri, Feb 24, 2012 at 8:13 AM, Fernando Lemos <[email protected]>wrote:

> Hi,
>
> On Wed, Feb 22, 2012 at 7:15 AM, DR <[email protected]> wrote:
> > On Wed, Feb 22, 2012 at 2:21 PM, DR <[email protected]> wrote:
> >> When a workspace marked 'urgent', i3bar unhide itself. if I want to
> >> hide it again, I must press the modifier.
> >> This sometimes annoys me.
> >>
> >> In this patch I change the above behavior to this: If a urgent
> >> workspace occurs, i3bar will unhide itself; and when you navigates
> >> away from the last urgent workspace and there is no more urgent
> >> workspace, i3bar will hide itself again.
>
> This sounds interesting, but have you discussed it with Michael first?
> I'd recommend always pinging Michael first to see if what you intend
> to do is in line with the project goals and things like that. Unless,
> of course, you don't care about getting your patches merged.
>
> Anyways, some comments below.
>
> > Oops... I messed it up.
> > Here is the patch fix build, and improve the behavior a little bit more:
> > When the urgent workspace is currently focused, i3bar will hide as
> > soon as the urgent mark has gone.
>
> Please merge both patches in a single one to make it easier to review
> (unless they do separate things, of course).
>
> I noticed you used "if (" and "if(", please stick with "if (" as
> that's what the rest of xcb.c uses.
>
> You declare and read bar_hidden, but you never seem to write to it. Am
> I missing something? Also, I'd rather have the code that calls
> hide/unhide_bar simply not call those functions rather than do the
> checking inside the functions, but that's subjective, I guess.
>
> The indentation level on the call to hide_bars() in the last chunk of
> the second patch is wrong. Are you sure you don't want that enclosed
> by brackets, as part of the "else" branch?
>
Above problem are solved.

>
> You're doing all the logic in the drawing code. Perhaps it would be
> better to detect that stuff directly in the ipc.c, when you receive
> the workspace info from i3, after the call to parse_workspaces_json.
>
I think it's fine. The original hide/unhide logical is done in draw_bar as
well, I just follow it. And I think the logical is simple enough to be
included in drawing code.


>
> Regards,
>

Attachment: 0001-Automatically-hide-i3bar-when-it-s-unneeded.patch
Description: Binary data

Reply via email to