Commit Graph

5018 Commits

Author SHA1 Message Date
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
Praveen Illa
aba39ef953 Updated Telugu Translation 2012-04-30 11:00:28 +05:30
Jasper St. Pierre
ebf8c460e1 default plugin: Remove start method that does nothing
All animations use the constants directly, so this is just declaring
a bunch of local variables and then doing nothing with it.

Another clang warning.

https://bugzilla.gnome.org/show_bug.cgi?id=674876
2012-04-26 15:07:46 -04:00
Jasper St. Pierre
25d3432eee window-group: Remove an unnecessary assignment
Clang warns about this.

https://bugzilla.gnome.org/show_bug.cgi?id=674876
2012-04-26 15:07:46 -04:00
Jasper St. Pierre
cd7a74fbcd texture-tower: Remove potential leak
The expression in here does not match the one where we malloc the
data.

https://bugzilla.gnome.org/show_bug.cgi?id=674876
2012-04-26 10:02:41 -04:00
Javier Jardón
c64188c67f core/window.c: Remove unused unmap_frame() function 2012-04-26 11:54:31 +01:00
Javier Jardón
4c2371f2e7 Revert "core/window.c: Remove unused function"
This reverts commit ff6c31dcc0.
2012-04-26 11:54:12 +01:00
Javier Jardón
ff6c31dcc0 core/window.c: Remove unused function 2012-04-26 11:29:24 +01:00
Jasper St. Pierre
1b649c18ed Remove live-hidden-windows from mutter-schemas.convert
The preference no longer exists.
2012-04-26 02:37:34 -04:00
Owen W. Taylor
93037e4c6b Make support for "XFree86" Xinerama mandatory
Require the headers for "XFree86" Xinerama to be present at compile
time. The older "Solaris" Xinerama is only needed for versions of
Solaris where Mutter is unlikely to work. Solaris 10 and 11 include
the XFree86 Xinerama libraries, and apparently that's the only version
that will actually work for Solaris 11, which uses Xorg.

https://bugzilla.gnome.org/show_bug.cgi?id=674727
2012-04-25 14:37:32 -04:00
Neil Roberts
ed358c8f4b meta-texture-rectangle: Use Cogl's API to create a rectangle texture
Cogl now has public experimental API to create a rectangle texture
which we can use instead of creating a foreign texture with GL. This
avoids Mutter depending on Cogl including a GL header from its public
headers which it might not do in future.

https://bugzilla.gnome.org/show_bug.cgi?id=672711
2012-04-25 14:54:09 +01:00
Robert Bragg
a22859a64a shaped-texture: never slice shape mask texture
Since Cogl doesn't support multi-texturing with sliced textures and the
shape texture is combined with the texture-from-pixmap texture we need
to make sure we never construct a sliced mask texture. This patch simply
passes the COGL_TEXTURE_NO_SLICE flag to cogl_texture_from_data when
creating the shape mask texture.

https://bugzilla.gnome.org/show_bug.cgi?id=674731
2012-04-25 11:57:33 +01:00