[xmonad] Focus getting stuck on one window

Ferenc Wagner wferi at niif.hu
Tue Feb 22 10:52:38 CET 2011


Ben Butler-Cole <ben at bridesmere.com> writes:

> I asked (edited):
>
>>> I am unable to move focus away from
>>> the first window that I open. I can launch further windows, but they
>>> do not get focus. I can send the focused window to a different
>>> workspace, in which case focus switches to another window
>>>
>>> When I try to switch focus
>>> there is some flickering -- I think the red border disappears and then
>>> reappears again as though focus very briefly switches where I'm trying
>>> to send it and then goes back again.
>>>
>>> I haven't been able to see any pattern in when this does and doesn't
>>> happen.
>>>
>>> I'm running Ubuntu 10.04, using XMonad from the standard package repo.
>
> Brent Yorgey replied:
>
>> As just a first guess, it sounds like perhaps a poor interaction
>> between XMonad.Actions.Warp and something else -- are you using any
>> pointer-warping in your config?  You could also try turning off
>> focusFollowsMouse and see if that helps.
>
> I'm not using any pointer warping. I'm afraid I haven't tried turning
> off focusFollowsMouse yet -- I'll try that now.
>
> I have discovered a few more things about this.
> * It sometimes starts happening in the middle of a session.
> * I can make the problem go away by using the mouse to
>    switch focus.
> * I can sometimes make the problem go away by pushing
>    the offending window to another workspace and then
>    going and getting it back again.
>
> Is there any way to get XMonad to spit out any logging?

For what it's worth, I can reliably reproduce this by starting Pidgin on
an empty workspace.  Pidgin opens two windows (the buddy list and an
authentication dialog -- which is unfortunately tiled, btw.), and I
can't switch away from the buddy list by keyboard.  Using the mouse
helps every time.  Debian squeeze XMonad(-contrib) 0.9.1, my config is:

import XMonad
import XMonad.Util.EZConfig
import XMonad.Hooks.ManageDocks
import XMonad.Layout.NoBorders

import XMonad.Hooks.DynamicLog
import XMonad.Util.Run (spawnPipe,hPutStrLn)

import XMonad.Hooks.UrgencyHook

import Data.List (isPrefixOf)
import Control.Monad (liftM)

main = do
  xmproc <- spawnPipe "xmobar /home/wferi/.xmonad/xmobar.hs"
  xmonad $ withUrgencyHook NoUrgencyHook $ defaultConfig
             { terminal = "urxvt",
               manageHook = composeAll [manageHook defaultConfig,
                                        manageDocks,
                                        title     =? "pinentry" --> doFloat,
                                        (liftM (isPrefixOf "Ardour") className <&&>
                                         liftM not (appName =? "ardour_editor")) --> doFloat,
                                        liftM (isPrefixOf "JACK") title --> doFloat],
               layoutHook = smartBorders $ avoidStruts $ layoutHook defaultConfig,
               logHook = dynamicLogWithPP $ sjanssenPP {
                           ppOutput = hPutStrLn xmproc,
                           ppUrgent = xmobarColor "red" ""
                         }
             } `additionalKeysP`
             [ ("M-S-l", spawn "sleep 1; xset dpms force off; exec xtrlock")
             ]

I'd be happy to help debugging this, given some guidance.
-- 
Regards,
Feri.



More information about the xmonad mailing list