Commit Graph

5029 Commits

Author SHA1 Message Date
Jasper St. Pierre
2666303045 frames: Support rendering layouts 2012-05-03 23:17:36 -04:00
Jasper St. Pierre
0a9bc8995a frames: Support opacity in frame drawing
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.
2012-05-03 16:03:45 -04:00
Jasper St. Pierre
143436c37c frames: Remove reset_frames / unflicker_bg 2012-05-03 16:00:26 -04:00
Jasper St. Pierre
7c11e0b0eb frames: Remove caching
XXX hack just to see how slow it is
2012-05-02 14:37:17 -04:00
Jasper St. Pierre
beccdd64f5 frames: Remove invalidate_cache_timeout
WTF was this for? Was this a hacky bugfix? The git log gives no
information.
2012-05-02 14:37:17 -04:00
Jasper St. Pierre
dd0a6d7e08 frames: Only make one call to meta_frames_paint 2012-05-02 14:37:17 -04:00
Jasper St. Pierre
02bb550bd6 theme: Calculate frame geometry borders from CSS
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.
2012-05-02 14:37:17 -04:00
Jasper St. Pierre
8f789a8fad ui: Remove meta_ui_theme_get_frame_borders
The function is easily replaced, and also becomes more correct
as different window types may have different extents.
2012-05-02 14:37:17 -04:00
Jasper St. Pierre
865b9df9a9 window-actor: Use MetaRegionBuilder when scanning the visible region
This gives a pretty solid performance improvement when resizing windows.
2012-05-02 14:37:17 -04:00
Jasper St. Pierre
1e9268045d window-actor: Add a debugging tool to write a region to a PNG
Just a helper function that I keep rewriting all over the place.
2012-05-02 14:37:17 -04:00
Jasper St. Pierre
20acb73024 frames: Remove get_frame_bounds
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.
2012-05-02 14:37:17 -04:00
Jasper St. Pierre
b97ad209c2 window-actor: Don't use get_frame_bounds
We want to remove it.
2012-05-02 14:37:17 -04:00
Jasper St. Pierre
f2d8e3266b window-actor: Use cairo to paint regular shape region 2012-05-02 14:37:16 -04:00
Jasper St. Pierre
11be2fa36a window-actor: Work around cairo bug
Thank to Company and ickle, a cairo bug was identified and then fixed.
They helped me verify I'm not going insane!

http://cgit.freedesktop.org/cairo/commit/?id=ec400daf9ec3bbd8403324db7fcdaf175e185e7b
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
302302a116 window-actor: Paint the frame mask with GTK+ as well
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.
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
fd13dad0c4 window-actor: Use cairo_region_create_rectangles
Instead of the bunch of unions.
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
2da1ed1ae0 theme: Split GtkStateFlags grabbing code out 2012-05-02 14:37:16 -04:00
Jasper St. Pierre
58f04c7284 Add simple dumb CSS rendering 2012-05-02 14:37:16 -04:00
Jasper St. Pierre
a6737ef129 theme: Make meta_frame_style_draw_with_style private 2012-05-02 14:37:16 -04:00
Jasper St. Pierre
52fee4df1c window-actor: Add back antialiased window corners
This simply adds fancy arcs to the mask texture.
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
8da12ac0e0 window-actor: Punt mask generation to MetaWindowActor
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.
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
e43f8db6e8 window-actor: Remove an unnecessary frame check
meta_frame_calc_borders will zero out the borders if we don't have a frame.
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
a7cbc9ad9a meta-shaped-texture: Remove corners for now
We'll add them back with gtk_render_background
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
0be3f81841 theme: Use a MetaWindow path rather than a GtkWidget path
This is a terrible ugly hack.
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
f53e26bc39 frames: Fix border-radius stupidity
Since we're breaking the theme format, we don't need to do this any
logner.
2012-05-02 14:37:16 -04:00
Jasper St. Pierre
cc3be6da4d theme: Parse window radiuses from CSS
This requires a local hack to GTK+ that's ugly and I'm not sharing it.
We'll do things properly soon enough.
2012-05-02 14:37:15 -04:00
Jasper St. Pierre
fef2a061a8 theme: Require a GTK+ style context in meta_theme_calc_geometry 2012-05-02 14:37:15 -04:00
Jasper St. Pierre
bdb995d758 theme: Make meta_frame_layout_calc_geometry private 2012-05-02 14:37:15 -04:00
Jasper St. Pierre
2a729f89aa preview-widget: Remove the unused meta_preview_get_clip_region
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.
2012-05-02 14:37:15 -04:00
Jasper St. Pierre
af242b27b2 ui: Move theme variant code loading into theme.c
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.
2012-05-02 14:37:15 -04:00
Jasper St. Pierre
a198ff415a theme: Remove dead code
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
2012-05-02 14:37:00 -04:00
Jasper St. Pierre
981c1c2ab5 theme: Remove bogus comment
https://bugzilla.gnome.org/show_bug.cgi?id=662962
2012-05-02 14:37:00 -04:00
Jasper St. Pierre
fb35f9fa49 theme: Replace char array element comparisons with strncmp
https://bugzilla.gnome.org/show_bug.cgi?id=662962
2012-05-02 14:37:00 -04:00
Jasper St. Pierre
9194a04faa theme: Remove COLORIZE feature of images
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
2012-05-02 14:37:00 -04:00
Jasper St. Pierre
a0ed41d8ce theme: Use cairo for drawing uncolorized IMAGEs
https://bugzilla.gnome.org/show_bug.cgi?id=662962
2012-05-02 14:37:00 -04:00
Jasper St. Pierre
e3e87727b6 theme: Use cairo for TINT operations with alpha
https://bugzilla.gnome.org/show_bug.cgi?id=662962
2012-05-02 14:37:00 -04:00
Jasper St. Pierre
2d878f29eb theme: Use cairo for drawing ICON
Thanks to Benjamin Otte for helping me clean this up.

https://bugzilla.gnome.org/show_bug.cgi?id=662962
2012-05-02 14:37:00 -04:00
Jasper St. Pierre
307e4c7d0e theme: Properly indent code
s/tabs/spaces/

https://bugzilla.gnome.org/show_bug.cgi?id=662962
2012-05-02 14:37:00 -04:00
Jasper St. Pierre
43e7687d89 theme: Consolidate unused ops
https://bugzilla.gnome.org/show_bug.cgi?id=662962
2012-05-02 14:36:59 -04:00
Jasper St. Pierre
2e4f67f3f9 theme: Remove our own gradient stuff
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
2012-05-02 14:36:59 -04:00
Jasper St. Pierre
69c11b59c4 theme: Remove unused RECTANGLE code
https://bugzilla.gnome.org/show_bug.cgi?id=662962
2012-05-02 14:36:59 -04:00
Evan Broder
4148a5cc6a Fix introspection gir metadata
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
2012-05-02 14:13:48 -04:00
Pavel Vasin
8a6a568aca meta_stack_tracker_free(): fix memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=672640
2012-05-02 14:03:56 -04:00
Pavel Vasin
12cc0cee29 display: correctly init and free hostname
==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
2012-05-02 14:03:34 -04:00
Jasper St. Pierre
878b1012b4 window-actor: Another simple clang warning fix
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
2012-05-01 18:25:33 -04:00
Jasper St. Pierre
a78fec7951 window: Remove setting of an unused variable
Well, technically it's used, but only in one block, so let's
just make it scoped to that block.

https://bugzilla.gnome.org/show_bug.cgi?id=674876
2012-05-01 18:21:17 -04:00
Jasper St. Pierre
a24c512caa boxes: Remove an unnecessary assignment
https://bugzilla.gnome.org/show_bug.cgi?id=674876
2012-05-01 18:21:17 -04:00
Owen W. Taylor
c669a3892e meta_window_move_frame(): fix crash when frame is NULL
When meta_frame_calc_borders() was made to take a NULL frame argument,
a crash was accidentally introduced into meta_window_move_frame().

This partially reverts 8c1b2d5.

https://bugzilla.gnome.org/show_bug.cgi?id=675254
2012-05-01 13:44:35 -04:00
Owen W. Taylor
ba4f008d40 meta_window_actor_has_shadow: remove verbosity
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.
2012-05-01 11:37:23 -04:00
Jasper St. Pierre
b0a099935b frames: Remove forgotten references to tooltips
Tooltips were removed a little while back, but two historical artifacts
were untouched. We're not in the museum business, now are we...
2012-04-30 16:36:18 -04:00