Problem with smartBorders, multiple screens, and fullscreen windows

Hi, I have a problem with fullscreen windows on my multi-monitor setup. After reducing my xmonad.hs bit by bit, I finally tracked down the problem to smartBorders from XMonad.Layout.NoBorders. How to reproduce: 1. Add smartBorders to your layout(s). 1. Make a window fullscreen (e.g. mplayer, virtualbox, flash) on one screen, say screen 1. 2. Change to an arbitrary hidden workspace on another screen, e.g. on screen 2. What I get: The content of the fullscreen window (on screen 1 in the example above) isn't updated anymore. In mplayer, for example, the video simply "freezes" while the sound keeps going. I can fix it by restoring the window and make it fullscreen again. Expected results: Nothing should happen to the fullscreen window. More information: I'm using xmonad 0.10 and xmonad-contrib 0.10 on Arch Linux. I can reproduce this on two machines with different graphic cards, Nvidia and Intel, so I don't think the problem lies with the graphic driver, which was my first suspicion. If I remove borders from all screens except the one with the fullscreen window (by using noBorders), I can switch workspace without "freezing" the fullscreen window. I was surprised that I couldn't find anyone else with a similar issue (except maybe Issue 311http://code.google.com/p/xmonad/issues/detail?id=311) - if someone else can reproduce this, please let me know and I'll submit a bug report. Even better, if someone could help me fix or work around the problem without losing the functionality of smartBorders, I would be extremely happy. Thanks, Hans

Hi Hans,
I can't reproduce this problem. I think it might help if you did two things:
1. include a minimal xmonad.hs that exhibits the problem
2. give very, very specific instructions, like, down to exactly what
keys to press (for example, what does "make a window fullscreen" mean?
I can think of half a dozen things to do in xmonad that might
reasonably be called making a window fullscreen, and probably only one
of them triggers your problem)
Thanks,
~d
Quoting Hans Chen
Hi,
I have a problem with fullscreen windows on my multi-monitor setup. After reducing my xmonad.hs bit by bit, I finally tracked down the problem to smartBorders from XMonad.Layout.NoBorders.
How to reproduce: 1. Add smartBorders to your layout(s). 1. Make a window fullscreen (e.g. mplayer, virtualbox, flash) on one screen, say screen 1. 2. Change to an arbitrary hidden workspace on another screen, e.g. on screen 2.
What I get: The content of the fullscreen window (on screen 1 in the example above) isn't updated anymore. In mplayer, for example, the video simply "freezes" while the sound keeps going. I can fix it by restoring the window and make it fullscreen again.
Expected results: Nothing should happen to the fullscreen window.
More information: I'm using xmonad 0.10 and xmonad-contrib 0.10 on Arch Linux. I can reproduce this on two machines with different graphic cards, Nvidia and Intel, so I don't think the problem lies with the graphic driver, which was my first suspicion. If I remove borders from all screens except the one with the fullscreen window (by using noBorders), I can switch workspace without "freezing" the fullscreen window.
I was surprised that I couldn't find anyone else with a similar issue (except maybe Issue 311http://code.google.com/p/xmonad/issues/detail?id=311) - if someone else can reproduce this, please let me know and I'll submit a bug report. Even better, if someone could help me fix or work around the problem without losing the functionality of smartBorders, I would be extremely happy.
Thanks, Hans

On Wed, Nov 28, 2012 at 9:17 PM,
2. give very, very specific instructions, like, down to exactly what keys to press (for example, what does "make a window fullscreen" mean? I can think of half a dozen things to do in xmonad that might reasonably be called making a window fullscreen, and probably only one of them triggers your problem)
You also don't say which fullscreen mechanism you have in your xmonad.hs; the default doesn't support fullscreen except by the application specifically opening a fullscreen (by its determination) floating window, and there are at least three different ways to add fullscreen support in contrib. Also note that all three of your examples are special cases that can be quite fragile; it's not at all unusual for mplayer or flash to decide to do something stupid on loss of focus of a fullscreened window (or sometimes even a non-fullscreen window; and something different depending on which mplayer video driver you use or whether flash is using hardware acceleration or not: note that the very first thing most "flash doesn't work right fullscreened" help guides tell you to do is turn off its hardware acceleration), and virtualbox's video drivers are in my experience quite unreliable and oddly behaved. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Thanks for your replies!
1. Here's a sample xmonad.hs: http://pastebin.com/FTFahY9T
Note that I have copied /usr/share/xmonad-0.10/man/xmonad.hs and just added
smartBorders to myLayout (and imported XMonad.Layout.NoBorders).
2. More detailed reproduce steps:
- Run "mplayer /path/to/video/file" in a terminal on [screen 1]. A floating
mplayer window should show up on [screen 1].
- Press "f" key to make mplayer fullscreen.
- Move focus to [screen 2], e.g. with mod-e.
- Switch to a hidden workspace on [screen 2], i.e., a workspace not shown
in [screen 1] or [screen 2] (or other screens you may have).
- Notice how mplayer on [screen 1] seems to "freeze".
This only happens when using the fullscreen feature provided by
applications - if I use the Full layout in xmonad, it works as expected
(however there are other issues, e.g. it doesn't work with floating
windows, and mplayer windows become stretched).
mplayer seems to set the following MOTIF_WM_HINTS when it's fullscreen:
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x0, 0x0, 0x0, 0x0
I use vo="xv", zoom="yes", and double="yes".
virtualbox sets _NET_WM_STATE(ATOM) = _NET_WM_STATE_FULLSCREEN, and changes
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x3e, 0x7e, 0x0, 0x0 (tiled) to
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x3, 0x0, 0x0, 0x0 (fullscreen)
Hope that helps,
Hans
On Thu, Nov 29, 2012 at 3:38 AM, Brandon Allbery
On Wed, Nov 28, 2012 at 9:17 PM,
wrote: 2. give very, very specific instructions, like, down to exactly what keys to press (for example, what does "make a window fullscreen" mean? I can think of half a dozen things to do in xmonad that might reasonably be called making a window fullscreen, and probably only one of them triggers your problem)
You also don't say which fullscreen mechanism you have in your xmonad.hs; the default doesn't support fullscreen except by the application specifically opening a fullscreen (by its determination) floating window, and there are at least three different ways to add fullscreen support in contrib.
Also note that all three of your examples are special cases that can be quite fragile; it's not at all unusual for mplayer or flash to decide to do something stupid on loss of focus of a fullscreened window (or sometimes even a non-fullscreen window; and something different depending on which mplayer video driver you use or whether flash is using hardware acceleration or not: note that the very first thing most "flash doesn't work right fullscreened" help guides tell you to do is turn off its hardware acceleration), and virtualbox's video drivers are in my experience quite unreliable and oddly behaved.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Hello Hans. I had a go at following these (much better, thanks!)
instructions. Here are my results:
Quoting Hans Chen
2. More detailed reproduce steps: - Run "mplayer /path/to/video/file" in a terminal on [screen 1]. A floating mplayer window should show up on [screen 1]. - Press "f" key to make mplayer fullscreen.
Nothing happens after this step! Perhaps we're playing with different versions of mplayer? ~% yum info mplayer Loaded plugins: langpacks, presto, refresh-packagekit Installed Packages Name : mplayer Arch : x86_64 Version : 1.0 Release : 0.142.20120205svn.fc17 Size : 3.2 M Repo : installed From repo : rpmfusion-free-updates Summary : Movie player playing most video formats and DVDs URL : http://www.mplayerhq.hu/ License : GPLv3+ Description : MPlayer is a movie player that plays most MPEG, VOB, AVI, OGG/OGM, : VIVO, ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, NuppelVideo, yuv4mpeg, FILM, : RoQ, and PVA files. You can also use it to watch VCDs, SVCDs, DVDs, : 3ivx, RealMedia, and DivX movies. : It supports a wide range of output drivers including X11, XVideo, DGA, : OpenGL, SVGAlib, fbdev, AAlib, DirectFB etc. There are also nice : antialiased shaded subtitles and OSD. : Non-default rpmbuild options: : --with samba: Enable Samba (smb://) support : --with xmms: Enable XMMS input plugin support : --without amr: Disable AMR support : --with faac: Enable FAAC support : --with libmad: Enable libmad support : --with openal: Enable OpenAL support : --with jack: Enable JACK support : --with arts: Enable aRts support : --with esound: Enable EsounD support : --with dga: Enable DGA support : --with directfb:Enable DirectFB support : --with svgalib: Enable SVGAlib support : --with nemesi: Enable libnemesi RTSP support
- Move focus to [screen 2], e.g. with mod-e. - Switch to a hidden workspace on [screen 2], i.e., a workspace not shown in [screen 1] or [screen 2] (or other screens you may have). - Notice how mplayer on [screen 1] seems to "freeze".
mplayer didn't freeze here, but this is probably because something different happened in step two for the two of us.
virtualbox sets _NET_WM_STATE(ATOM) = _NET_WM_STATE_FULLSCREEN, and changes _MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x3e, 0x7e, 0x0, 0x0 (tiled) to _MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x3, 0x0, 0x0, 0x0 (fullscreen)
Oh, are you running mplayer in virtualbox? Can you reproduce this problem when running mplayer in xmonad directly? Is xmonad running on the guest or the host (or both)? ~d

Hi ~d, Thanks for trying to reproduce my results, I really appreciate it! Oh, are you running mplayer in virtualbox? Can you reproduce this problem
when running mplayer in xmonad directly? Is xmonad running on the guest or the host (or both)?
I realize now that I was unclear, sorry about that - no, mplayer and virtualbox are two separate examples, I run mplayer directly (and let xmonad handle the window). Same with virtualbox, xmonad is running on the host and the guest OS is Windows XP.
2. More detailed reproduce steps:
- Run "mplayer /path/to/video/file" in a terminal on [screen 1]. A floating mplayer window should show up on [screen 1]. - Press "f" key to make mplayer fullscreen.
Nothing happens after this step! Perhaps we're playing with different versions of mplayer?
What do you mean with "nothing happens"? Doesn't mplayer fullscreen work at all? Can you get e.g. VLC to do fullscreen? I have the same problem there. I can also reproduce it with flashplayer, but that one's a bit different since by default Flash will exit fullscreen when it loses focus. With best regards, Hans

In case someone else has the same problem and finds this thread: it appears
to have been a bug in Compton (https://github.com/chjj/compton), I'm
running the latest Git version and can't reproduce this issue anymore.
Hooray!
Hans
On Tue, Dec 4, 2012 at 11:56 AM, Hans Chen
Hi ~d,
Thanks for trying to reproduce my results, I really appreciate it!
Oh, are you running mplayer in virtualbox? Can you reproduce this problem
when running mplayer in xmonad directly? Is xmonad running on the guest or the host (or both)?
I realize now that I was unclear, sorry about that - no, mplayer and virtualbox are two separate examples, I run mplayer directly (and let xmonad handle the window). Same with virtualbox, xmonad is running on the host and the guest OS is Windows XP.
2. More detailed reproduce steps:
- Run "mplayer /path/to/video/file" in a terminal on [screen 1]. A floating mplayer window should show up on [screen 1]. - Press "f" key to make mplayer fullscreen.
Nothing happens after this step! Perhaps we're playing with different versions of mplayer?
What do you mean with "nothing happens"? Doesn't mplayer fullscreen work at all? Can you get e.g. VLC to do fullscreen? I have the same problem there. I can also reproduce it with flashplayer, but that one's a bit different since by default Flash will exit fullscreen when it loses focus.
With best regards, Hans
participants (3)
-
Brandon Allbery
-
Hans Chen
-
wagnerdm@seas.upenn.edu