On Friday 24 May 2002 16:48, Sean 'Shaleh' Perry wrote:
> > If that can help, I ran nautilus (something that my poor machine can
> > barely afford !) and I noticed that indeed the main window refuses to
> > be focused.
>
> thanks Bertrand this really helps. It does clearly state that it does
> not want focus. Will look into this a little further, this sound like
> an edge case of the ICCCM "if you set this AND this ok, otherwise no".
the ICCCM does allow this... it's called the GloballyActive focus model...
i've got a fix, but i have no idea if it works... patch is against current
CVS
--------------- snip ----------------------------
Index: Window.cc
===================================================================
RCS file: /cvsroot/blackboxwm/blackbox/src/Window.cc,v
retrieving revision 1.92
diff -u -r1.92 Window.cc
--- Window.cc 24 May 2002 08:28:25 -0000 1.92
+++ Window.cc 24 May 2002 15:01:26 -0000
@@ -1265,19 +1283,20 @@
}
}
+ bool ret = True;
if (focus_mode == F_LocallyActive || focus_mode == F_Passive) {
XSetInputFocus(blackbox->getXDisplay(), client.window,
RevertToPointerRoot, CurrentTime);
+
+ blackbox->setFocusedWindow(this);
} else {
/* we could set the focus to none, since the window doesn't accept
focus,
* but we shouldn't set focus to nothing since this would surely make
* someone angry
*/
- return False;
+ ret = False;
}
- blackbox->setFocusedWindow(this);
-
if (flags.send_focus_message) {
XEvent ce;
ce.xclient.type = ClientMessage;
@@ -1294,11 +1313,7 @@
NoEventMask, &ce);
}
- if (screen->isSloppyFocus() && screen->doAutoRaise()) {
- timer->start();
- }
-
- return True;
+ return ret;
}
@@ -1645,9 +1663,9 @@
frame.plate, frame.uborder_pixel);
}
- if (! focus && screen->isSloppyFocus() && screen->doAutoRaise() &&
- timer->isTiming()) {
- timer->stop();
+ if (screen->isSloppyFocus() && screen->doAutoRaise()) {
+ if (isFocused()) timer->start();
+ else timer->stop();
}
if (isFocused())
--
Bradley T. Hughes - bhughes at trolltech.com
Trolltech AS - Waldemar Thranes gt. 98 N-0175 Oslo, Norway