From: Philipp H. <ph...@ph...> - 2012-04-15 19:12:39
|
Hi, I haven't had problems with Flash fullscreen in a long time, but I've now realized that Flash fullscreen completely stops to work whenever the mod_xinerama module is enabled. I have done some digging and I've found one reason for this (which by the way is completely unrelated to the one supposedly addressed by the well-known kludge[1]). When Flash fullscreen is triggered, the browser creates an unmanaged window win, called "Plugin Container" in my case. We call ioncore_manage_clientwin(win), which creates a suitable cwin for the window. We then have the following trace: hook_call_alt -> clientwin_do_manage_default(cwin) -> try_fullscreen(cwin, ...) -> netwm_check_initial_fullscreen(cwin) It turns out that the plugin container has the _NET_WM_STATE_FULLSCREEN property, which is reasonable, so netwm_check_initial_fullscreen will return region_screen_of((WRegion*)cwin) and try_fullscreen will proceed to attach the cwin to this return value. And here's the problem: region_screen_of((WRegion*)cwin) just does a bunch of ((WRegion*)cwin)->parent calls until it finds a WScreen. But the way the cwin is created, it is an immediate child of the root window. So the upshot is that we end up attaching the cwin to the root window. This doesn't cause any problems without mod_xinerama as in this case the only screen and the root window are identical objects. But with mod_xinerama the only reasonable children of the root window are the screens and when we want to fullscreen something, we have to attach it to the screen it is on, not to the root window. A suitable screen for the client is already determined in clientwin_do_manage_default, so I've simply changed the logic to use this screen, see the attached patch. With this Flash fullscreen also works for me with mod_xinerama. Could you guys give this patch a try? Any thoughts? I don't have an actual multihead setup so that I might be missing other problems. Regards, Philipp [1] https://sourceforge.net/apps/mediawiki/notion/index.php?title=Configuration#Flash.2FYouTube_Fullscreen |