There's still a bug here (frame opacity doesn't "kick in" until we
change the frame geometry), and the colors aren't correct (we're
painting on top of a white surface, not a 0-alpha surface), but we
at least remove some redraw issues that come when you're not always
obscuring the last paint.
Use the CSS 'border' and 'padding' properties rather than frame geometry.
This is a bit messy, so I'll fix it up with a new path representing the
titlebar soon.
It's now unused, and we can't use it if we want to let GTK+ paint and
scan the frame region. With it, we can also stop depending on the
terrible GTK+ hack and remove the corner radius properties in the
frame geometry, as they aren't needed any more.
Use meta_theme_render_background to paint the background of the frame,
and then scan it to give us a region we can use to generate the shape
region from. It may be worth looking at the uses of the shape region
to see if we can replace some (all?) of them by masks instead, so we
don't have to scan the mask.
This effectively makes MetaShapedTexture not a MetaShapedTexture,
but a simple and dumb MetaMaskedTexture, with an optimization for
clipped regions.
We're doing this as the mask may need to be more complicated than
made of a region plus a "cairo overlay" -- we eventually want GTK+
to draw the rounded corner background.
Save rounded corners for a later commit, again.
Besides being unused, it used meta_theme_get_frame_style. Since we
want to remove the static style layout structs, we need to remove
usage of that. Removing unused usage is the way to go.
As we'll have a new API that draws using GtkStyleContext, it makes sense
to put all API using GtkStyleContext where the theme code is. Note that
the MetaThemeVariant code is just a stop-gap right now - in the future,
we'll have per-window theming, using CSS infrastructure like includes
for code reuse.
While the comment claims that we may want to keep this around
for optimization purposes, the operations are raw bitmap operations
that would be cleaner done in cairo.
https://bugzilla.gnome.org/show_bug.cgi?id=662962
From a quick code search and grep of gnome-themes-standard, none of
the themes that I inspected used this feature. Since it's the last
thing that uses a lot of old legacy GdkPixbuf code, I'd rather just
consider the feature unsupported at this point and clean up everything
I need to.
https://bugzilla.gnome.org/show_bug.cgi?id=662962
Part one of porting to cairo. This requires removing support for a seldomly
used feature in the theme format - alpha gradients on tint, icon and image.
Grepping through gnome-themes-standard and searching for code, I couldn't
find any usage of this feature, so I consider it safe to remove.
Thanks to Benjamin Otte for helping me clean this up.
https://bugzilla.gnome.org/show_bug.cgi?id=662962
The EXPORT_PACKAGES variable to the GIR makefile should be the
packages needed to use this gir. It's also unnecessary to set PACKAGES
(which is just used for CFLAGS at scan-time) since CFLAGS is already
pulls in all necessary CFLAGS.
https://bugzilla.gnome.org/show_bug.cgi?id=671092
==31043== 7 bytes in 1 blocks are definitely lost in loss record 213 of 6,861
==31043== at 0x402B018: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==31043== by 0x417789A: ??? (in /usr/lib/libglib-2.0.so.0.3122.0)
==31043== by 0x4177C42: g_malloc (in /usr/lib/libglib-2.0.so.0.3122.0)
==31043== by 0x418DC3A: g_strdup (in /usr/lib/libglib-2.0.so.0.3122.0)
==31043== by 0x408C470: meta_display_open (display.c:475)
==31043== by 0x40A4D42: meta_run (main.c:552)
==31043== by 0x8048A74: main (mutter.c:96)
https://bugzilla.gnome.org/show_bug.cgi?id=672640
If we explicitly check for a NULL pointer, clang will assume
that the pointer may be NULL at some point. We clearly rely
on the pointer being non-NULL earlier, so fix this guy up.
https://bugzilla.gnome.org/show_bug.cgi?id=674876
meta_window_actor_has_shadow() is called for every paint for every
window, verbosely logging in it makes the output of MUTTER_VERBOSE
pretty much useless.