GNOME Bugzilla – Bug 598050
Flickering in a gtk_socket
Last modified: 2009-12-01 20:11:19 UTC
The application gnome-mplayer embeds mplayer into a gtk_socket located in a fixed object. Since gtk 2.18 when the gtk_socket is resized I get massive flickering. this did not happen in 2.16. Also I have tried
and running the app as found in this in this document: http://library.gnome.org/devel/gtk/2.18/gtk-migrating-ClientSideWindows.html and it does not correct it. It appears the background of the socket is getting redrawn.
I've tried hooking the expose-event and cancelling it, I've disabled double buffering. None of it seems to affect this.
I can confirm, same problem with gtk 2.18.2 and gnome-mplayer
Can we get someone for the GTK team to comment on this issue. I'm starting to get a lot of duplicate bugs in my bug tracker due to this issue.
Any suggestions would be helpful.
The GtkSocket doesn't have EXPOSURE_MASK set, and this means we clear it by default to the set window background when it would otherwise have been exposed. This is required so that we can e.g. correctly clear the background when a client side subwindow has moved.
I'm not sure its possible to make it not do this, I'm looking into this, or for the best workaround if not.
Commit 76cadc9d3acf2953209996c57e04e0410103add3 on gtk-2-18 branch (its on master too) contains the fixes required to make this nice.
However, even with these fixes there will be some flashing on resize-to-larger beneath and to the right of the video. You need to set the background of the GtkSocket to black to fix these. gtk_widget_modify_bg() will do this for you.
What release of GTK 2.18 should this patch be in? Guessing 2.18.4?
I have tested the commit 76cadc9d3acf2953209996c57e04e0410103add3 but the issue is still there. So there is no way to have a 2.16 behavior in this case ?
Hicham: Well, it fixes the flickering in gnome-mplayer for me, although the background is wrong and need to be fixed as per the above. I don't know why it did not make any difference to you, seems weird.
The change was made to gnome-mplayer as directed. And should be in the gnome-mplayer svn. In my bug report he said he saw a black square flickering instead of a grey one.
I took gtk2-2.18.3-22.fc12.src.rpm and added :
then I installed gnome-mplayer-svn1594.
Result: the flickering is always there
True, it is not a big issue, but with time, it gets annoying
I built svn head (r1597) and tried it with my current gtk master build (which really have no other fixes for this than the just released 2.18.4), and it works fine for me (imho). Here is how it looks:
I tried to switch video output settings to the various availible modes, but it looked the same in all of them.
There has got to be some difference between our setups, but I don't really understand what it is.
I got gtk 2.18.4 from Fedora 12's koji and it does fix the flickering problem for me as well.
Confirmed, gtk-2.18.4 fixes the issue for me.
Thanks Alex for the patches :)
Seems that this bug is already resolved now, setting to FIXED