After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 598050 - Flickering in a gtk_socket
Flickering in a gtk_socket
Product: gtk+
Classification: Platform
Component: Widget: Other
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Depends on:
Reported: 2009-10-11 00:39 UTC by kdekorte
Modified: 2009-12-01 20:11 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description kdekorte 2009-10-11 00:39:11 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: 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.
Comment 1 Alois Nespor 2009-10-14 20:04:24 UTC
I can confirm, same problem with gtk 2.18.2 and gnome-mplayer
Comment 2 kdekorte 2009-10-21 12:55:14 UTC
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.
Comment 3 Alexander Larsson 2009-11-02 13:50:47 UTC
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.
Comment 4 Alexander Larsson 2009-11-05 13:25:34 UTC
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.
Comment 5 kdekorte 2009-11-05 15:11:28 UTC
What release of GTK 2.18 should this patch be in? Guessing 2.18.4?
Comment 6 Alexander Larsson 2009-11-06 09:20:07 UTC
Comment 7 Hicham HAOUARI 2009-11-26 17:42:49 UTC
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 ?
Comment 8 Alexander Larsson 2009-11-27 13:26:12 UTC
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.
Comment 9 kdekorte 2009-11-27 14:50:05 UTC

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.

Comment 10 Hicham HAOUARI 2009-11-27 18:33:08 UTC

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
Comment 11 Alexander Larsson 2009-12-01 09:14:25 UTC
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.
Comment 12 kdekorte 2009-12-01 16:01:43 UTC
I got gtk 2.18.4 from Fedora 12's koji and it does fix the flickering problem for me as well.
Comment 13 Hicham HAOUARI 2009-12-01 19:58:23 UTC
Confirmed, gtk-2.18.4 fixes the issue for me.

Thanks Alex for the patches :)
Comment 14 Javier Jardón (IRC: jjardon) 2009-12-01 20:11:19 UTC
Seems that this bug is already resolved now, setting to FIXED