From: Philipp H. <ph...@ph...> - 2012-04-15 19:12:39
Attachments:
use_screen.diff
|
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 |
From: Philipp H. <ph...@ph...> - 2012-04-15 19:29:34
Attachments:
use_screen_2.diff
|
Argh, the patch contained a typo. Why did that even compile? Corrected version attached. |
From: <Ten...@ya...> - 2012-04-16 13:43:41
|
Yes, this works for me. Thanks for tracking this down. --Kevin On Sun, Apr 15, 2012 at 09:29:26PM +0200, Philipp Hartwig wrote: > Argh, the patch contained a typo. Why did that even compile? Corrected version > attached. > diff --git a/ioncore/manage.c b/ioncore/manage.c > index 9215804..3741c32 100644 > --- a/ioncore/manage.c > +++ b/ioncore/manage.c > @@ -151,8 +151,8 @@ static bool try_fullscreen(WClientWin *cwin, WScreen *dflt, > fs_scr=dflt; > } > > - if(fs_scr==NULL) > - fs_scr=netwm_check_initial_fullscreen(cwin); > + if(fs_scr==NULL && netwm_check_initial_fullscreen(cwin)) > + fs_scr=dflt; > > if(fs_scr==NULL) > fs_scr=clientwin_fullscreen_chkrq(cwin, param->geom.w, param->geom.h); > diff --git a/ioncore/netwm.c b/ioncore/netwm.c > index 81db3c9..42e97dc 100644 > --- a/ioncore/netwm.c > +++ b/ioncore/netwm.c > @@ -107,7 +107,7 @@ void netwm_init_rootwin(WRootWin *rw) > /*{{{ _NET_WM_STATE */ > > > -WScreen *netwm_check_initial_fullscreen(WClientWin *cwin) > +bool netwm_check_initial_fullscreen(WClientWin *cwin) > { > > int i, n; > @@ -118,16 +118,16 @@ WScreen *netwm_check_initial_fullscreen(WClientWin *cwin) > 1, TRUE, (uchar**)&data); > > if(n<0) > - return NULL; > + return FALSE; > > for(i=0; i<n; i++){ > if(data[i]==(long)atom_net_wm_state_fullscreen) > - return region_screen_of((WRegion*)cwin); > + return TRUE; > } > > XFree((void*)data); > > - return NULL; > + return FALSE; > } > > /*EXTL_DOC > diff --git a/ioncore/netwm.h b/ioncore/netwm.h > index df76886..fc054fa 100644 > --- a/ioncore/netwm.h > +++ b/ioncore/netwm.h > @@ -20,7 +20,7 @@ > extern void netwm_init(); > extern void netwm_init_rootwin(WRootWin *rw); > > -extern WScreen *netwm_check_initial_fullscreen(WClientWin *cwin); > +extern bool netwm_check_initial_fullscreen(WClientWin *cwin); > extern void netwm_update_state(WClientWin *cwin); > extern void netwm_update_allowed_actions(WClientWin *cwin); > extern void netwm_delete_state(WClientWin *cwin); > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Notion-devel mailing list > Not...@li... > https://lists.sourceforge.net/lists/listinfo/notion-devel |