Hi All,

Please review.

This is a fix to the current libwnck-01-trusted-extensions patch that
causes the background of the workspace switcher applet to be drawn in
black in a non trusted session. See bugster# 6493430 for more details.

An error was introduced in the port from the previous trusted-extension
patch based on the gnome-2.6 code base.
In libwnck-2.16.1/libwnck/pager.c:

#ifdef HAVE_XTSOL
      if (_wnck_check_xtsol_extension() &&
_wnck_use_trusted_extensions())
        gdk_cairo_set_source_color (cr, &widget->style->light[state]);
#else
      gdk_cairo_set_source_color (cr, &widget->style->dark[state]);
#endif /* HAVE_XTSOL */

The #else macro should actually be a "else" statement to ensure that
the cairo context is setup properly on both trusted and non-trusted
extensions systems:

#ifdef HAVE_XTSOL
      if (_wnck_check_xtsol_extension() &&
_wnck_use_trusted_extensions())
        gdk_cairo_set_source_color (cr, &widget->style->light[state]);
      else
#endif /* HAVE_XTSOL */
      gdk_cairo_set_source_color (cr, &widget->style->dark[state]);

I have also noticed a minor error in libwnck/window.c where a trusted 
extensions specific window structure data member is initialised outside
of the HAVE_XTSOL #defs, in the function wnck_window_init().
This will result in a build failure if the patch is applied on a 
non-trusted build environment. The fix is trivial so I'm
including it here, simply surround the initialisation with the
HAVE_XTSOL #def:


> #ifdef HAVE_XTSOL
>   window->priv->is_trusted = -1;
> #endif

I've attached the updated libwnck patch incorporating these changes.

Thanks,
Niall.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libwnck-01-trusted-extensions.diff
Type: text/x-patch
Size: 103574 bytes
Desc: not available
URL: 
<http://mail.opensolaris.org/pipermail/jds-review/attachments/20061116/27bcb25f/attachment.bin>

Reply via email to