[xmonad] xmonad non-xinerama multi-head problem

Lewis Cawthorne cawthorn at mailbox.sc.edu
Wed Nov 4 17:39:55 EST 2009

Hello All!

I am a new xmonad user and am loving it, except for one little issue 
that I can't get worked out.  To put it simply...  Xmonad seems to not 
like reaccepting mouse control after I leave the screen and come back on 
my system that is set up with three screens and xinerama flagged off in 
my xorg.conf.

Case A) xmonad on screen0; no wm or openbox on either of the other 
screens.  I can open up my e-mail client on my second screen, screen1 
(openbox menu or 'DISPLAY=:0.1 thunderbird').  I can with 100% 
reliability switch over to it with my mouse, open some items, etc.  If I 
mouse back to screen0, about 90% or more of the time firefox looks like 
it has focus, when I mouse over links they will darken, even more 
curious - when I use the scroll wheel I can scroll up and down in the 
webpage that is displayed, BUT I cannot get it to recognize the click 
action on any item (ie. if I click a link, nothing happens.  if I put my 
mouse over a button it darkens, but the click does nothing).  I can 
reliably fix this situation by simply mousing over any other open window 
on the screen with firefox (say one of my terminals), and even without 
clicking on them return to firefox and everything works fine.

Case B) xmonad on screen0, xmonad on screen 1.  same as above, but it 
can happen when I enter either screen.  I can 'work around' the issue by 
making sure there are two windows open on any given screen so I have a 
second thing to mouse over.  I have taken to leaving xclock and 
thunderbird both open on screen 1 and firefox with three terminals open 
on screen0.  when i go to my mail, i manually browse over the clock and 
then go to my mail program and don't have problems.  when i return to 
screen0, i simply go past firefox to a terminal, then back to firefox.  
it is somewhat tiresome, but workable.  it becomes more problematic when 
i only have one thing open on a screen, but i can generally just go to a 
terminal and manually fire something else up with a 'DISPLAY=:0.1 xclock 
&' or whatever.  (when doing this, i had to remove fullscreen from my 
layouts to prevent mistakenly causing myself major problems getting to 
any of my screens) one odd thing about the double xmonad setup is that 
when my scroll wheel and shadows appear on one screen but my clicks are 
not being accepted, invariably focus of the keyboard is still on the old 
screen because if I hit the command to open a terminal, it will appear 
on the old window.
Note: it isn't just with Firefox/Thunderbird.  I just have them open 
most of the time.  I can duplicate the behavior easily in XChat, only 
open terminals, etc.

Case C) xmonad on screen0, xmonad on screen1, xmonad on screen3.  I jsut 
tested this to see what would happen, and it did the following:
If I sit on this screen with my browser and hit my keystroke to open a 
terminal, it opens on this screen (Screen0).
If I move the mouse one screen to the left (Screen1) and open a 
terminal, it opens on this main screen again (Screen0).
If I move the mouse one screen to the left (Screen2) and open a 
terminal, it opens on the middle screen (Screen1).
If I move the mouse one screen to the right (Screen1) and open a 
terminal, it appears on the television (Screen2).
If I move the mouse one screen to the right (Screeen0) and open a 
terminal, it appers on the proper screen!  (Screen0).

Here's what I have done so far without it helping:
0- Same setup works with other WM's with no changes (even sscreen in 
ratpoison and what not).
1- Tried Xinerama.  I believe everything worked fine, but xorg turned 
off my composite extension.
2- Booted into my Gentoo install, and had the same problem with a clean 
install of xmonad 0.8.  (same hardware; same xorg.conf)
3- Deleted my config and used the default.  Also tested with two random 
configurations from the website.
4- Switched to nouveau video driver (from nvidia)
5- Move my second monitor from being connected to my third card (along 
with my tv) to being connected to my primary card
6- Setup gaps around my screen with import.layout.gaps (and appropriate 
layoutHook changes) in hopes that xmoand would 'catch' the transition better
7- imported UpdateFocus (and did the startupHook/eventHook to 
updateFocus on mouse move, in hopes it would compensate
8- turned off focusFollowsMouse

In case I haven't included enough information in this e-mail, I have 
kept a bit more detailed list of observations as I messed around at:

Any help that could be offered would be greatly appreciated.

Lewis Cawthorne

More information about the xmonad mailing list