Created attachment 17678 [details] [review] draw to the visual from the NPWindow Currently the swfdec plugin draws with the visual from the browser toplevel window which is not necessarily appropriate for the Drawable of windowless plugins. This can result in "BadMatch (invalid parameter attributes)" when the depths differ or colour confusion if the depths are the same but color masks differ. Once this Mozilla bug is fixed, its test case can serve as a test case for this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=445250 Even without non-unit opacity, it's possible there may be some Xserver/application configurations where the visual on the toplevel window differs from that used within Mozilla, which is gdk_rgb_get_colormap(), or other browser.
Just for reference, this patch break the plugin with webkit gtk 1.0.1, it looks like it is already fixed in webkit svn though: https://bugs.webkit.org/show_bug.cgi?id=19309. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb57e7720 (LWP 6895)] 0xb4bf5742 in plugin_set_window (instance=0xb4c79820, window=0xb4c79828) at plugin.c:398 398 plugin_x11_setup_windowed (instance->pdata, (Window) window->window, (gdb) bt full #0 0xb4bf5742 in plugin_set_window (instance=0xb4c79820, window=0xb4c79828) at plugin.c:398 No locals. #1 0xb73cecdc in WebCore::PluginView::stop (this=0xb4c79700) at ../WebCore/plugins/gtk/PluginViewGtk.cpp:289 streams = {m_impl = {static m_minTableSize = <optimized out>, static m_maxLoad = <optimized out>, static m_minLoad = <optimized out>, m_table = 0x0, m_tableSize = 0, m_tableSizeMask = 0, m_keyCount = 0, m_deletedCount = 0}} dropAllLocks = {<WTFNoncopyable::Noncopyable> = {<No data fields>}, m_lockCount = 0}
*** Bug 17093 has been marked as a duplicate of this bug. ***
Patch applied in git (373931a2f30088951659d3fb011ef9e6a09e9a36) Thank you!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.