
gecko-mediaplayer - issue #14
After fullscreen, window won't back to right position
in apple trailers (http://www.apple.com/trailers), gecko-mediaplayer window wont back to the right position, the position always in x=0 y=0
never try in another site, but i think it would be same
my box is debian etchnhalf, gtk 2.10 (backports)
Comment #1
Posted on Mar 18, 2009 by Helpful LionI tested several sites at apple.com and was unable to duplicate this issue. What version of gecko-mediaplayer are you using?
Comment #2
Posted on Mar 19, 2009 by Quick WombatThe newest (0.9.5) and before both for gecko-mediaplayer and gnome-mplayer. Is it because of the GTK+2 one ? Im using GTK 2.10 backports. Never try on another machine or higher version of GTK
I will try in another box later. I guess this because the version of GTK. But i'm already try your mplayerplug-in, it doesn't produce the same problem.
Comment #3
Posted on May 13, 2009 by Happy WombatI too have this issue, the player window does not embed back into firefox after leaving full screen. Tried with versions 0.6.3 and 0.9.5.
Might this have something to do with the window manager in use?
The problem occurs on systems with KDE window manager (version 3.5.9) and on my system with the ION3 window manager.
Some software versions: The KDE system uses GTK+ 2.14.7, cairo 1.8.6, Firefox 3.0.10. The ION3 system uses GTK+ 2.12.11, cairo 1.6.4, Firefox 3.0.10.
After leaving fullscreen the player window is at the top left corner, without any window decoration. Under KDE the window can be moved while holding down the alt key.
Comment #4
Posted on May 13, 2009 by Helpful LionVery likely to be a window manager issue. Since the code is not doing anything unusual. You might try with metacity and see if the problem persists there.
Comment #5
Posted on May 13, 2009 by Quick Wombatim using KDE too upgrading gtk still produce the issue
can u make it work without changing the window manager im very comfort with KDE window manager
KDE 3.5.7 GTK+ 2.12.12 cairo2 1.6.4 firefox 3.0.6
Comment #6
Posted on May 13, 2009 by Happy WombatIn the old mplayerplug-in the re-embedding works as expected, could that method of re-embedding be used for this plugin too? Or are there architectural differences between the two preventing this.
Comment #7
Posted on May 13, 2009 by Helpful LionIt is pretty much the same code... I'm asking around to some other KDE people, cause I do know that this worked at one point, and I expect it to work now.
Comment #8
Posted on May 13, 2009 by Helpful LionI tested this site http://www.apple.com/trailers/paramount/startrek/startrek_trailer1_small.html
With my Fedora 11 system, running under gnome, but with the fvwm window manager instead of metacity and everything was working perfectly. I could go to fullscreen and back with no problems. It also worked fine with metacity.
Comment #9
Posted on May 13, 2009 by Happy WombatOn my ION3 window manager that site also experiences the problem.
My kde3 system has 64bit mplayer installed atm, and it looks like the plugin/player crahses. The embedded object just vanishes (becomes black and right click menu is that of firefox in stead of the plugin). I did test stand alone mplayer on the movie url (http://movies.apple.com/movies/paramount/star_trek/star_trek-tlr1_h.320.mov) and that seems to work. I'll turn debug mode on to see whats happening here, but that will have to wait till tomorrow.
The site I've tested earlier today is http://www.beleefdelente.nl/slechtvalk but so far all sites have the same problem here.
Comment #10
Posted on May 13, 2009 by Swift DogI am experiencing the same problem for a while. The problem does not depend on the website, it just happens under KDE (I haven't tried with other WM) after you switch from fullscreen mode. The behaviour changed from KDE3 to KDE4 though, under KDE3 the video was not embedding back to Firefox and became a borderless/window decorationless video moving to top left of the screen as another window. Now I am running under KDE4 and video is totally gone when I switch back from fullscreen, though it is still playing since I can hear the sound and see mplayer running in process table.
I have tried with GTK from 2.12 to 2.16.1 Firefox 3.0 to 3.5beta4 KDE 3.5.9 to 4.2.3 SVN versions of MPlayer from about a year ago up to few days ago,with different ao and vo settings With many kinds video cards (just to eliminate the possibility) etc.
None of them changed behaviour / fixed the problem for me, though switching from KDE3 to KDE4 changed the symptom, so I am almost sure it is a Firefox/Gecko-mediaplayer/KDE problem. Don't know where the problem lies or how can be fixed though.
HTH
Comment #11
Posted on May 13, 2009 by Helpful LionI was able to duplicate the bug running kwin as my window manager in Gnome. So I'll see if I can put in a workaround...
Comment #12
Posted on May 13, 2009 by Helpful LionLooking more like a bug in kwin, specifically with the gdk_window_reparent call. Gonna try a couple of other window managers. I also tried switching the code to XReparentWindow, which is what mplayerplug-in uses and it fails with that as well.
window managers metacity: ok fvwm: ok xfwm4: ok kwin: broke blackbox: broke, fullscreen is across both displays (which is wrong), and window disappears on reparent. icewm: broken differently than kwin, window comes back, but not embedded and desktop is black
So I'm 3 for 6.... I still believe the window manager needs to give a reason as to why the reparent is failing, since the initial reparent works, the reparent to NULL works (pops us out of the window)
my kwin is kwin --version Qt: 4.5.0 KDE: 4.2.2 (KDE 4.2.2) KWin: 4.2.2 (KDE 4.2.2)
I a get the effect where the plugin window disappears as well.
Comment #13
Posted on May 14, 2009 by Happy WombatWhat other differences are there between the gecko-mediaplayer and mplayerplug-in that could cause this?
Could this have to do with the fact mplayer-plugin which runs inside the firefox process, so it embeds an external window into itself. In contrast to gnome-mplayer which runs as a separate process that is trying to embed itself into a window (firefox) it does not own?
I've also tried the XReparentWindow in gnome-mplayer in the ION3 window manager and it fails to embed in the same way (end up with a separate movie window).
Am I correct that these are the functions that implement the (un)fullscreen in both plugins? gnome-mplayer-0.9.5/src/gui.c: void menuitem_fs_callback(GtkMenuItem * menuitem, void *data) mplayerplug-in-3.55/Source/plugin.cpp: void nsPluginInstance::SetFullscreen(PRBool value)
Comment #14
Posted on May 14, 2009 by Helpful LionYes you are in the right spot, and you probably saw that the code using XReparentWindow was there but commented out. Being in process may have something to do with it. However, the fact that the window is initially embedded properly means that it should work. It just means that the second embed/reparent is failing.
Comment #15
Posted on May 14, 2009 by Happy WombatAnother difference between both plugins is the way they go into full screen mode.
mplayerplug-in first creates a new toplevel window and reparents the movie window into the newly created window
gnome-mplayer just reparents with new_parent NULL
The behaviour for new_parent=NULL does not seem to be documented in the GDK reference (http://library.gnome.org/devel/gdk/stable/gdk-Windows.html#gdk-window-reparent) from what I can find. Neither does the man page of XReparentWindow describe the behaviour.
xwininfo -root -tree does list a window with id = 0x0, but I can't seem to get any properties of it with xwininfo -id 0x0 or xprop -id 0x0.
Comment #16
Posted on May 14, 2009 by Happy WombatApparently new_parent == NULL is valid from looking in the implementation of gdk_window_reparent in the gtk toolkit (gtk+-2.12.12/gdk/x11/gdkwindow-x11.c):
if (!new_parent) new_parent = gdk_screen_get_root_window (GDK_WINDOW_SCREEN (window));
Comment #17
Posted on May 14, 2009 by Helpful LionI also tried changing the code to this, one the switch to fullscreen
gdk_window_reparent(window->window, gdk_window_lookup(gdk_x11_get_default_root_xwindow()), 0, 0);
And that worked ok with metacity, but failed with kwin...
Comment #18
Posted on May 14, 2009 by Helpful LionAttaching test program, so you can use a local file and don't have to test in the browser.
You will need to edit the code to point to gnome-mplayer, you can remove the path on the executable to load it from the path.
Also, change the line to point to a valid video file.
I also found when using this test program if you use the 'f' key to go fullscreen and then back. Under kwin if you hit it again, the fullscreen window appears, but it is iconized, so for some reason the kwin is thinking the window is being iconized when being reparented, so perhaps that is a feature of another window swallowing another window under kwin. Need to know how to undo that.
- main.c 3.4KB
- Makefile 138
Comment #19
Posted on May 14, 2009 by Helpful LionThere was some discussion on the mailing list awhile ago about this issue.. Might be related to this gtk issue
Comment #20
Posted on May 14, 2009 by Helpful Lionok, After a long day of working with this I finally solved it. I used the code from mplayerplug-in, but a little extra stuff to fix this. None of this work around should have been needed, but it appears it was.
Committed to SVN
Comment #21
Posted on May 15, 2009 by Happy WombatGreat work Kevin! This change also solves the problem for the ION3 window manager.
Comment #22
Posted on May 17, 2009 by Swift DogWorks great on KDE 4.2.3 with Firefox 3.5beta4, thank you :)
Status: Fixed
Labels:
Type-Defect
Priority-Medium