* Kim Woelders ([EMAIL PROTECTED]) wrote: > Hmm... I don't like these massive if's that are impossible to read. > EwinIsOnScreen() can be used to test if the window is on-screen. > The ewin->ibox, ewin->menu and ewin->pager tests are now (just comitted) > redundant because they will have ewin->skipfocus set.
I agree, I wanted to make this change as small as possible compared to
the code there.
>
> Configuration - currently we can say no, or we can say yes and get a
> behavior that some will consider broken.
Yes, whatever we choose, someone might find it broken (I thought it was
broken before because I could see the window in the iconbox, but I could
not get to it until I was in the correct viewport, which of course I did
not know which one it was).
> Maybe it should be possible to select "include icons" between
> - Off
> - Current viewport (current behavior)
> - Current desktop
> - All desktops
> The problem with this is mainly that the configuration dialogs don't
> have drop-down boxes and it would take up unreasonable amounts of real
> estate using radiobuttons.
>
> I think we should try selecting between none or all, as you suggest.
> I'll do that when I get around to it or you can drop a patch with the
> suggested changes and I'll put it in right away.
OK, I put the patch at the end of this email. I put some comments, and
tried to make the if structure clearer.
> Btw, is it useful to be able to exclude sticky windows? I don't think
> so.
I don't really know. All of my sticky windows have remember settings, so
it's just a question of remembering skip-focus. I can make another patch
that removes this (and the configuration option as well).
Alan
schmitta:/usr/src/enlightenment/e16/e> cvs diff
Index: src/warp.c
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/warp.c,v
retrieving revision 1.33
diff -u -p -r1.33 warp.c
--- src/warp.c 2 Feb 2004 19:42:35 -0000 1.33
+++ src/warp.c 24 Feb 2004 09:20:13 -0000
@@ -100,16 +100,16 @@ WarpFocus(int delta)
for (i = num0 - 1; i >= 0; --i)
{
ewin = lst0[i];
- if (((ewin->sticky) || (ewin->desktop == desks.current))
- && (ewin->x + ewin->w > 0) && (ewin->x < root.w)
- && (ewin->y + ewin->h > 0) && (ewin->y < root.h)
- && (!ewin->skipfocus) && !(ewin->shaded
- && !conf.warplist.warpshaded)
- && (!ewin->menu) && (!ewin->pager) && !(ewin->sticky
- && !conf.warplist.
- warpsticky)
- && (!ewin->ibox) && !(ewin->iconified
- && !conf.warplist.warpiconified)
+ if (/* Either visible or iconified */
+ ( (EwinIsOnScreen(ewin)) || (ewin->iconified) )
+ /* Exclude windows that explicitely say so */
+ && (!ewin->skipfocus)
+ /* Keep shaded windows if conf say so */
+ && ((!ewin->shaded) || (conf.warplist.warpshaded))
+ /* Keep sticky windows if conf say so */
+ && ((!ewin->sticky) || (conf.warplist.warpsticky))
+ /* Keep iconified windows if conf say so */
+ && ((!ewin->iconified) || (conf.warplist.warpiconified))
/*&& (ewin->client.mwm_decor_title) &&
* (ewin->client.mwm_decor_border) */
)
--
The hacker: someone who figured things out and made something cool happen.
.O.
..O
OOO
pgp00000.pgp
Description: PGP signature
