[Xmonad] Problem with transients and xinerama

Donald Bruce Stewart dons at cse.unsw.edu.au
Sun Jun 10 07:35:24 EDT 2007


xmonad:
> dons at cse.unsw.edu.au (Donald Bruce Stewart) writes:
> 
> > xmonad:
> >> I'm finding that pop-up dialogs seem sometimes to appear on the wrong
> >> screen.  Wrong in the sense that at the time, the focused window is on
> >> the other screen, so I'm expecting a transient on that window to
> >> appear on the same screen (at least initially).
> >
> > Very interesting
> > You have a specific app that seems to do this?
> 
> synaptic: the dialog that tells about other packages that will be
> removed or added.  So if you ask to remove libc6 or something, the
> dialog that pops up warning about dependencies seems to appear at
> (0,0), regardless of where the main synaptic window is.
> 
> kaffeine: when playing a movie, pressing v pops up a dialog
> controlling some video settings.  That appears:
> 
> xwininfo: Window id: 0x120078e "Video Settings - Kaffeine Player"
> 
>   Absolute upper-left X:  640
>   Absolute upper-left Y:  307
>   Relative upper-left X:  640
>   Relative upper-left Y:  307
>   Width: 449
>   Height: 249
> 
> even when the main kaffeine window is
> 
>   Absolute upper-left X:  1280
>   Absolute upper-left Y:  0
>   Relative upper-left X:  1280
>   Relative upper-left Y:  0
> 
> These are (I guess) application bugs, but it feels like the kind of
> thing a window manager could fairly easily work around.  It probably
> makes sense to do so in xmonad, since the transients are much harder
> to interact with in this case than in other window managers.

Spencer, can you look into this? Is there something funny happening
in 'float'?

    float :: Window -> X ()
    float w = withDisplay $ \d -> do
        xinesc <- gets xineScreens
        sc     <- (genericIndex xinesc . W.screen . W.current) `liftM` gets windowset
        wa     <- io $ getWindowAttributes d w
        let bw = fi . wa_border_width $ wa
        windows $ W.float w
            (W.RationalRect ((fi (wa_x wa) - fi (rect_x sc)) % fi (rect_width sc))
                            ((fi (wa_y wa) - fi (rect_y sc)) % fi (rect_height sc))
                            (fi (wa_width  wa + bw*2) % fi (rect_width sc))
                            (fi (wa_height wa + bw*2) % fi (rect_height sc)))
      where fi x = fromIntegral x

As far as I can see, it should end up on the current screen, but xinerama
geometry is Spencer's area, so I might be missing something.

-- Don


More information about the Xmonad mailing list