diff --git a/mutter-2.31.5.tar.bz2 b/mutter-2.31.5.tar.bz2 new file mode 100644 index 0000000..df972f1 --- /dev/null +++ b/mutter-2.31.5.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:518df8d359acd7ec91e8ffcce1c3420fce5bcf85fefba6f4571ad3f6c419d398 +size 1992924 diff --git a/mutter-2.91.0.tar.bz2 b/mutter-2.91.0.tar.bz2 deleted file mode 100644 index 039d2b3..0000000 --- a/mutter-2.91.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dde22aa6da7dee0f2d230aa64754bb491bf866ef6559e0fa0f0871d2bc8955bd -size 2007378 diff --git a/mutter-gdk-cairo.patch b/mutter-gdk-cairo.patch new file mode 100644 index 0000000..503f95d --- /dev/null +++ b/mutter-gdk-cairo.patch @@ -0,0 +1,1114 @@ +From 08cfdcd802c762b04351798e8a03524e11db637e Mon Sep 17 00:00:00 2001 +From: Florian Müllner +Date: Mon, 19 Jul 2010 15:55:00 +0000 +Subject: Replace GDK drawing API with cairo + +The GDK drawing API was deprecated/removed. + +https://bugzilla.gnome.org/show_bug.cgi?id=626583 +--- +Index: mutter-2.31.5/src/ui/draw-workspace.c +=================================================================== +--- mutter-2.31.5.orig/src/ui/draw-workspace.c ++++ mutter-2.31.5/src/ui/draw-workspace.c +@@ -180,6 +180,7 @@ wnck_draw_workspace (GtkWidget + GdkRectangle workspace_rect; + GtkStateType state; + GtkStyle *style; ++ cairo_t *cr; + + workspace_rect.x = x; + workspace_rect.y = y; +@@ -194,28 +195,21 @@ wnck_draw_workspace (GtkWidget + state = GTK_STATE_NORMAL; + + style = gtk_widget_get_style (widget); ++ cr = gdk_cairo_create (drawable); + + if (workspace_background) + { +- gdk_draw_pixbuf (drawable, +- style->dark_gc[state], +- workspace_background, +- 0, 0, +- x, y, +- -1, -1, +- GDK_RGB_DITHER_MAX, +- 0, 0); ++ gdk_cairo_set_source_pixbuf (cr, workspace_background, x, y); ++ cairo_paint (cr); + } + else + { +- cairo_t *cr; +- +- cr = gdk_cairo_create (gtk_widget_get_window (widget)); + gdk_cairo_set_source_color (cr, &style->dark[state]); + cairo_rectangle (cr, x, y, width, height); + cairo_fill (cr); +- cairo_destroy (cr); + } ++ ++ cairo_destroy (cr); + + i = 0; + while (i < n_windows) +Index: mutter-2.31.5/src/ui/frames.c +=================================================================== +--- mutter-2.31.5.orig/src/ui/frames.c ++++ mutter-2.31.5/src/ui/frames.c +@@ -2004,46 +2004,64 @@ meta_frames_destroy_event (Gtk + return TRUE; + } + +-/* Cut and paste from GDK */ +-static GdkGC * +-get_bg_gc (GdkWindow *window, int x_offset, int y_offset) ++#if !GTK_CHECK_VERSION(2,21,6) ++/* Copied from GDK */ ++static cairo_pattern_t * ++gdk_window_get_background_pattern (GdkWindow *window) ++{ ++ GdkWindowObject *private = (GdkWindowObject *) window; ++ cairo_pattern_t *pattern; ++ ++ g_return_val_if_fail (GDK_IS_WINDOW (window), NULL); ++ ++ if (private->bg_pixmap == GDK_PARENT_RELATIVE_BG) ++ pattern = NULL; ++ else if (private->bg_pixmap != GDK_NO_BG && ++ private->bg_pixmap != NULL) ++ { ++ static cairo_user_data_key_t key; ++ cairo_surface_t *surface; ++ ++ surface = _gdk_drawable_ref_cairo_surface (private->bg_pixmap); ++ pattern = cairo_pattern_create_for_surface (surface); ++ cairo_surface_destroy (surface); ++ ++ cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT); ++ cairo_pattern_set_user_data (pattern, ++ &key, ++ g_object_ref (private->bg_pixmap), ++ g_object_unref); ++ } ++ else ++ pattern = ++ cairo_pattern_create_rgb (private->bg_color.red / 65535., ++ private->bg_color.green / 65535., ++ private->bg_color.blue / 65535.); ++ } ++ ++ return pattern; ++} ++#endif ++ ++static void ++setup_bg_cr (cairo_t *cr, GdkWindow *window, int x_offset, int y_offset) + { + GdkWindow *parent = gdk_window_get_parent (window); +- GdkPixmap *back_pixmap; +- gboolean parent_relative; +- guint gc_mask = 0; +- GdkGCValues gc_values; ++ cairo_pattern_t *bg_pattern; + +- gdk_window_get_back_pixmap (window, &back_pixmap, &parent_relative); +- if (parent_relative && parent) ++ bg_pattern = gdk_window_get_background_pattern (window); ++ if (bg_pattern == NULL && parent) + { + gint window_x, window_y; + + gdk_window_get_position (window, &window_x, &window_y); +- return get_bg_gc (parent, +- x_offset + window_x, +- y_offset + window_y); +- } +- else if (back_pixmap) +- { +- gc_values.fill = GDK_TILED; +- gc_values.tile = back_pixmap; +- gc_values.ts_x_origin = x_offset; +- gc_values.ts_y_origin = y_offset; +- +- gc_mask = GDK_GC_FILL | GDK_GC_TILE | GDK_GC_TS_X_ORIGIN | GDK_GC_TS_Y_ORIGIN; +- +- return gdk_gc_new_with_values (window, &gc_values, gc_mask); ++ setup_bg_cr (cr, parent, x_offset + window_x, y_offset + window_y); + } +- else ++ else if (bg_pattern) + { +- GdkColor bg_color; +- GdkGC *gc = gdk_gc_new (window); +- +- gdk_window_get_background (window, &bg_color); +- gdk_gc_set_foreground (gc, &bg_color); +- +- return gc; ++ cairo_translate (cr, - x_offset, - y_offset); ++ cairo_set_source (cr, bg_pattern); ++ cairo_translate (cr, x_offset, y_offset); + } + } + +@@ -2052,12 +2070,16 @@ clear_backing (GdkPixmap *pixmap, + GdkWindow *window, + int xoffset, int yoffset) + { +- GdkGC *tmp_gc = get_bg_gc (window, xoffset, yoffset); ++ int width, height; ++ cairo_t *cr = gdk_cairo_create (pixmap); ++ ++ setup_bg_cr (cr, window, xoffset, yoffset); + +- gdk_draw_rectangle (pixmap, tmp_gc, TRUE, +- 0, 0, -1, -1); ++ gdk_drawable_get_size (GDK_DRAWABLE (pixmap), &width, &height); ++ cairo_rectangle (cr, 0, 0, width, height); ++ cairo_fill (cr); + +- g_object_unref (tmp_gc); ++ cairo_destroy (cr); + } + + /* Returns a pixmap with a piece of the windows frame painted on it. +@@ -2220,10 +2242,10 @@ cached_pixels_draw (CachedPixels *pixels + GdkWindow *window, + MetaRegion *region) + { +- GdkGC *gc; ++ cairo_t *cr; + int i; + +- gc = gdk_gc_new (window); ++ cr = gdk_cairo_create (window); + + for (i = 0; i < 4; i++) + { +@@ -2232,16 +2254,15 @@ cached_pixels_draw (CachedPixels *pixels + + if (piece->pixmap) + { +- gdk_draw_drawable (window, gc, piece->pixmap, +- 0, 0, +- piece->rect.x, piece->rect.y, +- -1, -1); ++ gdk_cairo_set_source_pixmap (cr, piece->pixmap, ++ piece->rect.x, piece->rect.y); ++ cairo_paint (cr); + subtract_from_region (region, piece->pixmap, + piece->rect.x, piece->rect.y); + } + } + +- g_object_unref (gc); ++ cairo_destroy (cr); + } + + static gboolean +@@ -2550,11 +2571,6 @@ meta_frames_set_window_background (MetaF + GTK_WIDGET (frames), + &color); + +- /* Fill in color.pixel */ +- +- gdk_rgb_find_color (gtk_widget_get_colormap (GTK_WIDGET (frames)), +- &color); +- + /* Set A in ARGB to window_background_alpha, if we have ARGB */ + + visual = gtk_widget_get_visual (GTK_WIDGET (frames)); +Index: mutter-2.31.5/src/ui/tabpopup.c +=================================================================== +--- mutter-2.31.5.orig/src/ui/tabpopup.c ++++ mutter-2.31.5/src/ui/tabpopup.c +@@ -83,6 +83,7 @@ outline_window_expose (GtkWidget *w + TabEntry *te; + GtkStyle *style; + GdkWindow *window; ++ cairo_t *cr; + + popup = data; + +@@ -92,20 +93,24 @@ outline_window_expose (GtkWidget *w + te = popup->current_selected_entry; + window = gtk_widget_get_window (widget); + style = gtk_widget_get_style (widget); +- +- gdk_draw_rectangle (window, +- style->white_gc, +- FALSE, +- 0, 0, +- te->rect.width - 1, +- te->rect.height - 1); +- +- gdk_draw_rectangle (window, +- style->white_gc, +- FALSE, +- te->inner_rect.x - 1, te->inner_rect.y - 1, +- te->inner_rect.width + 1, +- te->inner_rect.height + 1); ++ cr = gdk_cairo_create (window); ++ ++ cairo_set_line_width (cr, 1.0); ++ gdk_cairo_set_source_color (cr, &style->white); ++ ++ cairo_rectangle (cr, ++ 0.5, 0.5, ++ te->rect.width - 1, ++ te->rect.height - 1); ++ cairo_stroke (cr); ++ ++ cairo_rectangle (cr, ++ te->inner_rect.x - 0.5, te->inner_rect.y - 0.5, ++ te->inner_rect.width + 1, ++ te->inner_rect.height + 1); ++ cairo_stroke (cr); ++ ++ cairo_destroy (cr); + + return FALSE; + } +@@ -710,6 +715,7 @@ meta_select_image_expose_event (GtkWidge + int x, y, w, h; + gint xpad, ypad; + gfloat xalign, yalign; ++ cairo_t *cr; + + misc = GTK_MISC (widget); + +@@ -734,27 +740,28 @@ meta_select_image_expose_event (GtkWidge + window = gtk_widget_get_window (widget); + style = gtk_widget_get_style (widget); + state = gtk_widget_get_state (widget); ++ cr = gdk_cairo_create (window); + +- gdk_draw_rectangle (window, +- style->fg_gc[state], +- FALSE, +- x, y, w, h); +- gdk_draw_rectangle (window, +- style->fg_gc[state], +- FALSE, +- x - 1, y - 1, w + 2, h + 2); +- ++ cairo_set_line_width (cr, 2.0); ++ gdk_cairo_set_source_color (cr, &style->fg[state]); ++ ++ cairo_rectangle (cr, x, y, w + 1, h + 1); ++ cairo_stroke (cr); ++ ++ cairo_set_line_width (cr, 1.0); + #if 0 +- gdk_draw_rectangle (widget->window, +- widget->style->bg_gc[GTK_STATE_SELECTED], +- TRUE, +- x, y, w, h); ++ gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_SELECTED]); ++ cairo_rectangle (cr, x, y, w, h); ++ cairo_fill (cr); + #endif ++ + #if 0 + gtk_paint_focus (widget->style, widget->window, + &event->area, widget, "meta-tab-image", + x, y, w, h); + #endif ++ ++ cairo_destroy (cr); + } + + return GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event); +@@ -906,6 +913,7 @@ meta_select_workspace_expose_event (GtkW + GtkAllocation allocation; + GtkStyle *style; + GdkWindow *window; ++ cairo_t *cr; + int i, n_windows; + GList *tmp, *list; + +@@ -965,20 +973,19 @@ meta_select_workspace_expose_event (GtkW + if (META_SELECT_WORKSPACE (widget)->selected) + { + style = gtk_widget_get_style (widget); +- i = SELECT_OUTLINE_WIDTH - 1; ++ cr = gdk_cairo_create (window); + +- while (i >= 0) +- { +- gdk_draw_rectangle (window, +- style->fg_gc[gtk_widget_get_state (widget)], +- FALSE, +- i, +- i, +- allocation.width - i * 2 - 1, +- allocation.height - i * 2 - 1); ++ gdk_cairo_set_source_color (cr, ++ &style->fg[gtk_widget_get_state (widget)]); ++ cairo_set_line_width (cr, SELECT_OUTLINE_WIDTH); ++ ++ cairo_rectangle (cr, ++ SELECT_OUTLINE_WIDTH / 2.0, SELECT_OUTLINE_WIDTH / 2.0, ++ allocation.width - SELECT_OUTLINE_WIDTH, ++ allocation.height - SELECT_OUTLINE_WIDTH); ++ cairo_stroke (cr); + +- --i; +- } ++ cairo_destroy (cr); + } + + return TRUE; +Index: mutter-2.31.5/src/ui/testgradient.c +=================================================================== +--- mutter-2.31.5.orig/src/ui/testgradient.c ++++ mutter-2.31.5/src/ui/testgradient.c +@@ -24,7 +24,7 @@ + #include + + typedef void (* RenderGradientFunc) (GdkDrawable *drawable, +- GdkGC *gc, ++ cairo_t *cr, + int width, + int height); + +@@ -34,28 +34,22 @@ draw_checkerboard (GdkDrawable *drawable + int height) + { + gint i, j, xcount, ycount; +- GdkGC *gc1, *gc2; +- GdkColor color; ++ GdkColor color1, color2; ++ cairo_t *cr; + + #define CHECK_SIZE 10 + #define SPACING 2 + +- /* It would be a bit more efficient to keep these +- * GC's around instead of recreating on each expose, but +- * this is the lazy/slow way. +- */ +- gc1 = gdk_gc_new (drawable); +- color.red = 30000; +- color.green = 30000; +- color.blue = 30000; +- gdk_gc_set_rgb_fg_color (gc1, &color); +- +- gc2 = gdk_gc_new (drawable); +- color.red = 50000; +- color.green = 50000; +- color.blue = 50000; +- gdk_gc_set_rgb_fg_color (gc2, &color); +- ++ color1.red = 30000; ++ color1.green = 30000; ++ color1.blue = 30000; ++ ++ color2.red = 50000; ++ color2.green = 50000; ++ color2.blue = 50000; ++ ++ cr = gdk_cairo_create (drawable); ++ + xcount = 0; + i = SPACING; + while (i < width) +@@ -64,23 +58,17 @@ draw_checkerboard (GdkDrawable *drawable + ycount = xcount % 2; /* start with even/odd depending on row */ + while (j < height) + { +- GdkGC *gc; +- + if (ycount % 2) +- gc = gc1; ++ gdk_cairo_set_source_color (cr, &color1); + else +- gc = gc2; ++ gdk_cairo_set_source_color (cr, &color2); + + /* If we're outside event->area, this will do nothing. + * It might be mildly more efficient if we handled + * the clipping ourselves, but again we're feeling lazy. + */ +- gdk_draw_rectangle (drawable, +- gc, +- TRUE, +- i, j, +- CHECK_SIZE, +- CHECK_SIZE); ++ cairo_rectangle (cr, i, j, CHECK_SIZE, CHECK_SIZE); ++ cairo_fill (cr); + + j += CHECK_SIZE + SPACING; + ++ycount; +@@ -90,13 +78,12 @@ draw_checkerboard (GdkDrawable *drawable + ++xcount; + } + +- g_object_unref (G_OBJECT (gc1)); +- g_object_unref (G_OBJECT (gc2)); ++ cairo_destroy (cr); + } + + static void + render_simple (GdkDrawable *drawable, +- GdkGC *gc, ++ cairo_t *cr, + int width, int height, + MetaGradientType type, + gboolean with_alpha) +@@ -131,52 +118,48 @@ render_simple (GdkDrawable *drawable, + draw_checkerboard (drawable, width, height); + } + +- gdk_draw_pixbuf (drawable, +- gc, +- pixbuf, +- 0, 0, +- 0, 0, width, height, +- GDK_RGB_DITHER_MAX, +- 0, 0); ++ gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0); ++ cairo_rectangle (cr, 0, 0, width, height); ++ cairo_fill (cr); + + g_object_unref (G_OBJECT (pixbuf)); + } + + static void + render_vertical_func (GdkDrawable *drawable, +- GdkGC *gc, ++ cairo_t *cr, + int width, int height) + { +- render_simple (drawable, gc, width, height, META_GRADIENT_VERTICAL, FALSE); ++ render_simple (drawable, cr, width, height, META_GRADIENT_VERTICAL, FALSE); + } + + static void + render_horizontal_func (GdkDrawable *drawable, +- GdkGC *gc, ++ cairo_t *cr, + int width, int height) + { +- render_simple (drawable, gc, width, height, META_GRADIENT_HORIZONTAL, FALSE); ++ render_simple (drawable, cr, width, height, META_GRADIENT_HORIZONTAL, FALSE); + } + + static void + render_diagonal_func (GdkDrawable *drawable, +- GdkGC *gc, ++ cairo_t *cr, + int width, int height) + { +- render_simple (drawable, gc, width, height, META_GRADIENT_DIAGONAL, FALSE); ++ render_simple (drawable, cr, width, height, META_GRADIENT_DIAGONAL, FALSE); + } + + static void + render_diagonal_alpha_func (GdkDrawable *drawable, +- GdkGC *gc, ++ cairo_t *cr, + int width, int height) + { +- render_simple (drawable, gc, width, height, META_GRADIENT_DIAGONAL, TRUE); ++ render_simple (drawable, cr, width, height, META_GRADIENT_DIAGONAL, TRUE); + } + + static void + render_multi (GdkDrawable *drawable, +- GdkGC *gc, ++ cairo_t *cr, + int width, int height, + MetaGradientType type) + { +@@ -194,14 +177,9 @@ render_multi (GdkDrawable *drawable, + colors, N_COLORS, + type); + +- gdk_draw_pixbuf (drawable, +- gc, +- pixbuf, +- 0, 0, +- 0, 0, +- width, height, +- GDK_RGB_DITHER_NORMAL, +- 0, 0); ++ gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0); ++ cairo_rectangle (cr, 0, 0, width, height); ++ cairo_fill (cr); + + g_object_unref (G_OBJECT (pixbuf)); + #undef N_COLORS +@@ -209,31 +187,31 @@ render_multi (GdkDrawable *drawable, + + static void + render_vertical_multi_func (GdkDrawable *drawable, +- GdkGC *gc, ++ cairo_t *cr, + int width, int height) + { +- render_multi (drawable, gc, width, height, META_GRADIENT_VERTICAL); ++ render_multi (drawable, cr, width, height, META_GRADIENT_VERTICAL); + } + + static void + render_horizontal_multi_func (GdkDrawable *drawable, +- GdkGC *gc, ++ cairo_t *cr, + int width, int height) + { +- render_multi (drawable, gc, width, height, META_GRADIENT_HORIZONTAL); ++ render_multi (drawable, cr, width, height, META_GRADIENT_HORIZONTAL); + } + + static void + render_diagonal_multi_func (GdkDrawable *drawable, +- GdkGC *gc, ++ cairo_t *cr, + int width, int height) + { +- render_multi (drawable, gc, width, height, META_GRADIENT_DIAGONAL); ++ render_multi (drawable, cr, width, height, META_GRADIENT_DIAGONAL); + } + + static void + render_interwoven_func (GdkDrawable *drawable, +- GdkGC *gc, ++ cairo_t *cr, + int width, int height) + { + GdkPixbuf *pixbuf; +@@ -249,14 +227,9 @@ render_interwoven_func (GdkDrawable *dra + colors, height / 10, + colors + 2, height / 14); + +- gdk_draw_pixbuf (drawable, +- gc, +- pixbuf, +- 0, 0, +- 0, 0, +- width, height, +- GDK_RGB_DITHER_NORMAL, +- 0, 0); ++ gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0); ++ cairo_rectangle (cr, 0, 0, width, height); ++ cairo_fill (cr); + + g_object_unref (G_OBJECT (pixbuf)); + } +@@ -267,17 +240,25 @@ expose_callback (GtkWidget *widget, + gpointer data) + { + RenderGradientFunc func = data; ++ GdkWindow *window; + GtkAllocation allocation; + GtkStyle *style; ++ cairo_t *cr; + + style = gtk_widget_get_style (widget); + gtk_widget_get_allocation (widget, &allocation); + ++ window = gtk_widget_get_window (widget); ++ cr = gdk_cairo_create (window); ++ gdk_cairo_set_source_color (cr, &style->fg[gtk_widget_get_state (widget)]); ++ + (* func) (gtk_widget_get_window (widget), +- style->fg_gc[gtk_widget_get_state (widget)], ++ cr, + allocation.width, + allocation.height); + ++ cairo_destroy (cr); ++ + return TRUE; + } + +Index: mutter-2.31.5/src/ui/theme.c +=================================================================== +--- mutter-2.31.5.orig/src/ui/theme.c ++++ mutter-2.31.5/src/ui/theme.c +@@ -2922,36 +2922,6 @@ meta_draw_op_free (MetaDrawOp *op) + g_free (op); + } + +-static GdkGC* +-get_gc_for_primitive (GtkWidget *widget, +- GdkDrawable *drawable, +- MetaColorSpec *color_spec, +- const GdkRectangle *clip, +- int line_width) +-{ +- GdkGC *gc; +- GdkGCValues values; +- GdkColor color; +- +- meta_color_spec_render (color_spec, widget, &color); +- +- values.foreground = color; +- +- gdk_rgb_find_color (gdk_drawable_get_colormap (drawable), +- &values.foreground); +- +- values.line_width = line_width; +- +- gc = gdk_gc_new_with_values (drawable, &values, +- GDK_GC_FOREGROUND | GDK_GC_LINE_WIDTH); +- +- if (clip) +- gdk_gc_set_clip_rectangle (gc, +- (GdkRectangle*) clip); /* const cast */ +- +- return gc; +-} +- + static GdkPixbuf* + apply_alpha (GdkPixbuf *pixbuf, + MetaAlphaGradientSpec *spec, +@@ -2988,54 +2958,6 @@ apply_alpha (GdkPixbuf *pixb + return pixbuf; + } + +-static void +-render_pixbuf (GdkDrawable *drawable, +- const GdkRectangle *clip, +- GdkPixbuf *pixbuf, +- int x, +- int y) +-{ +- /* grumble, render_to_drawable_alpha does not accept a clip +- * mask, so we have to go through some BS +- */ +- /* FIXME once GTK 1.3.13 has been out a while we can use +- * render_to_drawable() which now does alpha with clip. +- * +- * Though the gdk_rectangle_intersect() check may be a useful +- * optimization anyway. +- */ +- GdkRectangle pixbuf_rect; +- GdkRectangle draw_rect; +- +- pixbuf_rect.x = x; +- pixbuf_rect.y = y; +- pixbuf_rect.width = gdk_pixbuf_get_width (pixbuf); +- pixbuf_rect.height = gdk_pixbuf_get_height (pixbuf); +- +- if (clip) +- { +- if (!gdk_rectangle_intersect ((GdkRectangle*)clip, +- &pixbuf_rect, &draw_rect)) +- return; +- } +- else +- { +- draw_rect = pixbuf_rect; +- } +- +- gdk_draw_pixbuf (drawable, +- NULL, +- pixbuf, +- draw_rect.x - pixbuf_rect.x, +- draw_rect.y - pixbuf_rect.y, +- draw_rect.x, draw_rect.y, +- draw_rect.width, +- draw_rect.height, +- GDK_RGB_DITHER_NORMAL, +- draw_rect.x - pixbuf_rect.x, +- draw_rect.y - pixbuf_rect.y); +-} +- + static GdkPixbuf* + pixbuf_tile (GdkPixbuf *tile, + int width, +@@ -3476,6 +3398,17 @@ fill_env (MetaPositionExprEnv *env, + env->theme = meta_current_theme; + } + ++/* This code was originally rendering anti-aliased using X primitives, and ++ * now has been switched to draw anti-aliased using cairo. In general, the ++ * closest correspondence between X rendering and cairo rendering is given ++ * by offsetting the geometry by 0.5 pixels in both directions before rendering ++ * with cairo. This is because X samples at the upper left corner of the ++ * pixel while cairo averages over the entire pixel. However, in the cases ++ * where the X rendering was an exact rectangle with no "jaggies" ++ * we need to be a bit careful about applying the offset. We want to produce ++ * the exact same pixel-aligned rectangle, rather than a rectangle with ++ * fuzz around the edges. ++ */ + static void + meta_draw_op_draw_with_env (const MetaDrawOp *op, + GtkStyle *style_gtk, +@@ -3486,7 +3419,18 @@ meta_draw_op_draw_with_env (const MetaDr + MetaRectangle rect, + MetaPositionExprEnv *env) + { +- GdkGC *gc; ++ GdkColor color; ++ cairo_t *cr; ++ ++ cr = gdk_cairo_create (drawable); ++ ++ cairo_set_line_width (cr, 1.0); ++ ++ if (clip) ++ { ++ gdk_cairo_rectangle (cr, clip); ++ cairo_clip (cr); ++ } + + switch (op->type) + { +@@ -3494,18 +3438,19 @@ meta_draw_op_draw_with_env (const MetaDr + { + int x1, x2, y1, y2; + +- gc = get_gc_for_primitive (widget, drawable, +- op->data.line.color_spec, +- clip, +- op->data.line.width); ++ meta_color_spec_render (op->data.line.color_spec, widget, &color); ++ gdk_cairo_set_source_color (cr, &color); ++ ++ if (op->data.line.width > 0) ++ cairo_set_line_width (cr, op->data.line.width); + + if (op->data.line.dash_on_length > 0 && + op->data.line.dash_off_length > 0) + { +- gint8 dash_list[2]; ++ double dash_list[2]; + dash_list[0] = op->data.line.dash_on_length; + dash_list[1] = op->data.line.dash_off_length; +- gdk_gc_set_dashes (gc, 0, dash_list, 2); ++ cairo_set_dash (cr, dash_list, 2, 0); + } + + x1 = parse_x_position_unchecked (op->data.line.x1, env); +@@ -3514,7 +3459,10 @@ meta_draw_op_draw_with_env (const MetaDr + if (!op->data.line.x2 && + !op->data.line.y2 && + op->data.line.width==0) +- gdk_draw_point (drawable, gc, x1, y1); ++ { ++ cairo_rectangle (cr, x1, y1, 1, 1); ++ cairo_fill (cr); ++ } + else + { + if (op->data.line.x2) +@@ -3527,10 +3475,34 @@ meta_draw_op_draw_with_env (const MetaDr + else + y2 = y1; + +- gdk_draw_line (drawable, gc, x1, y1, x2, y2); +- } ++ /* This is one of the cases where we are matching the exact ++ * pixel aligned rectangle produced by X. ++ */ ++ if (y1 == y2 || x1 == x2) ++ { ++ double offset = (op->data.line.width == 0 || ++ op->data.line.width % 2) ? .5 : 0; ++ /* X includes end points for lines of width 0 */ ++ double line_extend = op->data.line.width == 0 ? 1. : 0.; + +- g_object_unref (G_OBJECT (gc)); ++ if (y1 == y2) ++ { ++ cairo_move_to (cr, x1, y1 + offset); ++ cairo_line_to (cr, x2 + line_extend, y2 + offset); ++ } ++ else ++ { ++ cairo_move_to (cr, x1 + offset, y1); ++ cairo_line_to (cr, x2 + offset, y2 + line_extend); ++ } ++ } ++ else ++ { ++ cairo_move_to (cr, x1 + .5, y1 + .5); ++ cairo_line_to (cr, x2 + .5, y2 + .5); ++ } ++ cairo_stroke (cr); ++ } + } + break; + +@@ -3538,45 +3510,69 @@ meta_draw_op_draw_with_env (const MetaDr + { + int rx, ry, rwidth, rheight; + +- gc = get_gc_for_primitive (widget, drawable, +- op->data.rectangle.color_spec, +- clip, 0); ++ meta_color_spec_render (op->data.rectangle.color_spec, widget, &color); ++ gdk_cairo_set_source_color (cr, &color); + + rx = parse_x_position_unchecked (op->data.rectangle.x, env); + ry = parse_y_position_unchecked (op->data.rectangle.y, env); + rwidth = parse_size_unchecked (op->data.rectangle.width, env); + rheight = parse_size_unchecked (op->data.rectangle.height, env); + +- gdk_draw_rectangle (drawable, gc, +- op->data.rectangle.filled, +- rx, ry, rwidth, rheight); +- +- g_object_unref (G_OBJECT (gc)); ++ /* Filled and stroked rectangles are the other cases ++ * we pixel-align to X rasterization ++ */ ++ if (op->data.rectangle.filled) ++ { ++ cairo_rectangle (cr, rx, ry, rwidth, rheight); ++ cairo_fill (cr); ++ } ++ else ++ { ++ cairo_rectangle (cr, rx + .5, ry + .5, rwidth, rheight); ++ cairo_stroke (cr); ++ } + } + break; + + case META_DRAW_ARC: + { + int rx, ry, rwidth, rheight; ++ double start_angle, end_angle; ++ double center_x, center_y; + +- gc = get_gc_for_primitive (widget, drawable, +- op->data.arc.color_spec, +- clip, 0); ++ meta_color_spec_render (op->data.arc.color_spec, widget, &color); ++ gdk_cairo_set_source_color (cr, &color); + + rx = parse_x_position_unchecked (op->data.arc.x, env); + ry = parse_y_position_unchecked (op->data.arc.y, env); + rwidth = parse_size_unchecked (op->data.arc.width, env); + rheight = parse_size_unchecked (op->data.arc.height, env); + +- gdk_draw_arc (drawable, +- gc, +- op->data.arc.filled, +- rx, ry, rwidth, rheight, +- op->data.arc.start_angle * (360.0 * 64.0) - +- (90.0 * 64.0), /* start at 12 instead of 3 oclock */ +- op->data.arc.extent_angle * (360.0 * 64.0)); ++ start_angle = op->data.arc.start_angle * (M_PI / 180.) ++ - (.25 * M_PI); /* start at 12 instead of 3 oclock */ ++ end_angle = start_angle + op->data.arc.extent_angle * (M_PI / 180.); ++ center_x = rx + (double)rwidth / 2. + .5; ++ center_y = ry + (double)rheight / 2. + .5; ++ ++ cairo_save (cr); ++ ++ cairo_translate (cr, center_x, center_y); ++ cairo_scale (cr, (double)rwidth / 2., (double)rheight / 2.); + +- g_object_unref (G_OBJECT (gc)); ++ if (op->data.arc.extent_angle >= 0) ++ cairo_arc (cr, 0, 0, 1, start_angle, end_angle); ++ else ++ cairo_arc_negative (cr, 0, 0, 1, start_angle, end_angle); ++ ++ cairo_restore (cr); ++ ++ if (op->data.arc.filled) ++ { ++ cairo_line_to (cr, center_x, center_y); ++ cairo_fill (cr); ++ } ++ else ++ cairo_stroke (cr); + } + break; + +@@ -3599,15 +3595,11 @@ meta_draw_op_draw_with_env (const MetaDr + + if (!needs_alpha) + { +- gc = get_gc_for_primitive (widget, drawable, +- op->data.tint.color_spec, +- clip, 0); +- +- gdk_draw_rectangle (drawable, gc, +- TRUE, +- rx, ry, rwidth, rheight); ++ meta_color_spec_render (op->data.tint.color_spec, widget, &color); ++ gdk_cairo_set_source_color (cr, &color); + +- g_object_unref (G_OBJECT (gc)); ++ cairo_rectangle (cr, rx + .5, ry + .5, rwidth, rheight); ++ cairo_fill (cr); + } + else + { +@@ -3618,7 +3610,8 @@ meta_draw_op_draw_with_env (const MetaDr + + if (pixbuf) + { +- render_pixbuf (drawable, clip, pixbuf, rx, ry); ++ gdk_cairo_set_source_pixbuf (cr, pixbuf, rx, ry); ++ cairo_paint (cr); + + g_object_unref (G_OBJECT (pixbuf)); + } +@@ -3641,7 +3634,8 @@ meta_draw_op_draw_with_env (const MetaDr + + if (pixbuf) + { +- render_pixbuf (drawable, clip, pixbuf, rx, ry); ++ gdk_cairo_set_source_pixbuf (cr, pixbuf, rx, ry); ++ cairo_paint (cr); + + g_object_unref (G_OBJECT (pixbuf)); + } +@@ -3670,7 +3664,8 @@ meta_draw_op_draw_with_env (const MetaDr + rx = parse_x_position_unchecked (op->data.image.x, env); + ry = parse_y_position_unchecked (op->data.image.y, env); + +- render_pixbuf (drawable, clip, pixbuf, rx, ry); ++ gdk_cairo_set_source_pixbuf (cr, pixbuf, rx, ry); ++ cairo_paint (cr); + + g_object_unref (G_OBJECT (pixbuf)); + } +@@ -3753,7 +3748,8 @@ meta_draw_op_draw_with_env (const MetaDr + rx = parse_x_position_unchecked (op->data.icon.x, env); + ry = parse_y_position_unchecked (op->data.icon.y, env); + +- render_pixbuf (drawable, clip, pixbuf, rx, ry); ++ gdk_cairo_set_source_pixbuf (cr, pixbuf, rx, ry); ++ cairo_paint (cr); + + g_object_unref (G_OBJECT (pixbuf)); + } +@@ -3766,9 +3762,8 @@ meta_draw_op_draw_with_env (const MetaDr + int rx, ry; + PangoRectangle ink_rect, logical_rect; + +- gc = get_gc_for_primitive (widget, drawable, +- op->data.title.color_spec, +- clip, 0); ++ meta_color_spec_render (op->data.title.color_spec, widget, &color); ++ gdk_cairo_set_source_color (cr, &color); + + rx = parse_x_position_unchecked (op->data.title.x, env); + ry = parse_y_position_unchecked (op->data.title.y, env); +@@ -3790,7 +3785,7 @@ meta_draw_op_draw_with_env (const MetaDr + * correct for this, by reducing the ellipsization width by the overflow + * of the un-ellipsized text on the right... it's always the visual + * right we want regardless of bidi, since since the X we pass in to +- * gdk_draw_layout() is always the left edge of the line. ++ * cairo_move_to() is always the left edge of the line. + */ + right_bearing = (ink_rect.x + ink_rect.width) - (logical_rect.x + logical_rect.width); + right_bearing = MAX (right_bearing, 0); +@@ -3806,15 +3801,12 @@ meta_draw_op_draw_with_env (const MetaDr + pango_layout_set_width (info->title_layout, PANGO_SCALE * ellipsize_width); + } + +- gdk_draw_layout (drawable, gc, +- rx, ry, +- info->title_layout); ++ cairo_move_to (cr, rx, ry); ++ pango_cairo_show_layout (cr, info->title_layout); + + /* Remove any ellipsization we might have set; will short-circuit + * if the width is already -1 */ + pango_layout_set_width (info->title_layout, -1); +- +- g_object_unref (G_OBJECT (gc)); + } + break; + +@@ -3882,6 +3874,8 @@ meta_draw_op_draw_with_env (const MetaDr + } + break; + } ++ ++ cairo_destroy (cr); + } + + void +@@ -6637,7 +6631,8 @@ draw_bg_gradient_composite (const MetaTe + GDK_INTERP_BILINEAR, + 255 * alpha); + +- render_pixbuf (drawable, clip, composited, x, y); ++ gdk_cairo_set_source_pixbuf (cr, composited, x, y); ++ cairo_paint (cr); + + g_object_unref (G_OBJECT (bg_pixbuf)); + g_object_unref (G_OBJECT (fg_pixbuf)); +Index: mutter-2.31.5/src/ui/ui.c +=================================================================== +--- mutter-2.31.5.orig/src/ui/ui.c ++++ mutter-2.31.5/src/ui/ui.c +@@ -419,21 +419,17 @@ meta_image_window_set (MetaImageWindow * + int y) + { + GdkWindow *window; ++ cairo_t *cr; + + /* We use a back pixmap to avoid having to handle exposes, because + * it's really too slow for large clients being minimized, etc. + * and this way flicker is genuinely zero. + */ + +- gdk_draw_pixbuf (iw->pixmap, +- gtk_widget_get_style (iw->window)->black_gc, +- pixbuf, +- 0, 0, +- 0, 0, +- gdk_pixbuf_get_width (pixbuf), +- gdk_pixbuf_get_height (pixbuf), +- GDK_RGB_DITHER_NORMAL, +- 0, 0); ++ cr = gdk_cairo_create (iw->pixmap); ++ gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0); ++ cairo_paint (cr); ++ cairo_destroy (cr); + + window = gtk_widget_get_window (iw->window); + +@@ -1001,7 +997,7 @@ meta_ui_get_pixbuf_from_pixmap (Pixmap + + depth = gdk_drawable_get_depth (GDK_DRAWABLE (gpmap)); + if (depth <= 24) +- cmap = gdk_screen_get_rgb_colormap (screen); ++ cmap = gdk_screen_get_system_colormap (screen); + else + cmap = gdk_screen_get_rgba_colormap (screen); + +Index: mutter-2.31.5/src/gdk-compat.h +=================================================================== +--- mutter-2.31.5.orig/src/gdk-compat.h ++++ mutter-2.31.5/src/gdk-compat.h +@@ -11,24 +11,7 @@ + + #if !GTK_CHECK_VERSION (2, 21, 1) + +-#define gdk_window_get_background(w,c) *c = GDK_WINDOW_OBJECT (w)->bg_color + #define gdk_visual_get_depth(v) GDK_VISUAL(v)->depth +-#define gdk_window_get_back_pixmap(w,p,r) \ +- G_STMT_START { \ +- GdkWindowObject *priv = GDK_WINDOW_OBJECT (w); \ +- \ +- if (p != NULL) \ +- { \ +- if (priv->bg_pixmap == GDK_PARENT_RELATIVE_BG || \ +- priv->bg_pixmap == GDK_NO_BG) \ +- *p = NULL; \ +- else \ +- *p = priv->bg_pixmap; \ +- } \ +- \ +- if (r != NULL) \ +- *r = (priv->bg_pixmap == GDK_PARENT_RELATIVE_BG); \ +- } G_STMT_END + + #endif /*GTK_CHECK_VERSION */ + diff --git a/mutter-gdk-keys.patch b/mutter-gdk-keys.patch new file mode 100644 index 0000000..604c738 --- /dev/null +++ b/mutter-gdk-keys.patch @@ -0,0 +1,46 @@ +From 8a6b583cdcda3742bf31df9220c0256a838917b6 Mon Sep 17 00:00:00 2001 +From: Florian Müllner +Date: Thu, 09 Sep 2010 15:01:52 +0000 +Subject: Adjust for API break in gdkkeysyms.h + +The key symbols were renamed to avoid namespace conflicts with +gobject-introspection. +--- +diff --git a/src/gdk-compat.h b/src/gdk-compat.h +index 31991e8..501b4f4 100644 +--- a/src/gdk-compat.h ++++ b/src/gdk-compat.h +@@ -15,4 +15,10 @@ + + #endif /*GTK_CHECK_VERSION */ + ++ ++/* Compatibility with old GDK key symbols */ ++#ifndef GDK_KEY_Escape ++#define GDK_KEY_Escape GDK_Escape ++#endif /* GDK_KEY_Escape */ ++ + #endif /* __GDK_COMPAT_H__ */ +diff --git a/src/tools/mutter-mag.c b/src/tools/mutter-mag.c +index 23a0487..b45c538 100644 +--- a/src/tools/mutter-mag.c ++++ b/src/tools/mutter-mag.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + static GtkWidget *grab_widget = NULL; + static GtkWidget *display_window = NULL; +@@ -191,7 +192,7 @@ key_press (GtkWidget *invisible, + GdkEventKey *event, + gpointer data) + { +- if (event->keyval == GDK_Escape) ++ if (event->keyval == GDK_KEY_Escape) + { + shutdown_grab (); + +-- +cgit v0.8.3.1 diff --git a/mutter-no-gdk_display.patch b/mutter-no-gdk_display.patch new file mode 100644 index 0000000..4271bdb --- /dev/null +++ b/mutter-no-gdk_display.patch @@ -0,0 +1,886 @@ +From 0d51d9e4cf1c175f921728ae419cefa7044c1b46 Mon Sep 17 00:00:00 2001 +From: Jasper St. Pierre +Date: Fri, 10 Sep 2010 07:17:55 +0000 +Subject: Remove usage of 'gdk_display', a removed symbol in gtk3. + +https://bugzilla.gnome.org/show_bug.cgi?id=629232 +--- +diff --git a/src/core/main.c b/src/core/main.c +index 8eae74f..b3a673e 100644 +--- a/src/core/main.c ++++ b/src/core/main.c +@@ -401,7 +401,7 @@ static GSourceFuncs event_funcs = { + static void + meta_clutter_init (GOptionContext *ctx, int *argc, char ***argv) + { +- clutter_x11_set_display (gdk_display); ++ clutter_x11_set_display (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ())); + clutter_x11_disable_event_retrieval (); + + if (CLUTTER_INIT_SUCCESS == clutter_init (argc, argv)) +diff --git a/src/tools/mutter-message.c b/src/tools/mutter-message.c +index 22977e7..4aed444 100644 +--- a/src/tools/mutter-message.c ++++ b/src/tools/mutter-message.c +@@ -29,6 +29,7 @@ + #define _(x) dgettext (GETTEXT_PACKAGE, x) + #define N_(x) x + ++static Display *display; + + static void + send_restart (void) +@@ -38,9 +39,9 @@ send_restart (void) + xev.xclient.type = ClientMessage; + xev.xclient.serial = 0; + xev.xclient.send_event = True; +- xev.xclient.display = gdk_display; ++ xev.xclient.display = display; + xev.xclient.window = gdk_x11_get_default_root_xwindow (); +- xev.xclient.message_type = XInternAtom (gdk_display, ++ xev.xclient.message_type = XInternAtom (display, + "_MUTTER_RESTART_MESSAGE", + False); + xev.xclient.format = 32; +@@ -48,14 +49,14 @@ send_restart (void) + xev.xclient.data.l[1] = 0; + xev.xclient.data.l[2] = 0; + +- XSendEvent (gdk_display, ++ XSendEvent (display, + gdk_x11_get_default_root_xwindow (), + False, + SubstructureRedirectMask | SubstructureNotifyMask, + &xev); + +- XFlush (gdk_display); +- XSync (gdk_display, False); ++ XFlush (display); ++ XSync (display, False); + } + + static void +@@ -66,9 +67,9 @@ send_reload_theme (void) + xev.xclient.type = ClientMessage; + xev.xclient.serial = 0; + xev.xclient.send_event = True; +- xev.xclient.display = gdk_display; ++ xev.xclient.display = display; + xev.xclient.window = gdk_x11_get_default_root_xwindow (); +- xev.xclient.message_type = XInternAtom (gdk_display, ++ xev.xclient.message_type = XInternAtom (display, + "_MUTTER_RELOAD_THEME_MESSAGE", + False); + xev.xclient.format = 32; +@@ -76,14 +77,14 @@ send_reload_theme (void) + xev.xclient.data.l[1] = 0; + xev.xclient.data.l[2] = 0; + +- XSendEvent (gdk_display, ++ XSendEvent (display, + gdk_x11_get_default_root_xwindow (), + False, + SubstructureRedirectMask | SubstructureNotifyMask, + &xev); + +- XFlush (gdk_display); +- XSync (gdk_display, False); ++ XFlush (display); ++ XSync (display, False); + } + + static void +@@ -94,9 +95,9 @@ send_set_keybindings (gboolean enabled) + xev.xclient.type = ClientMessage; + xev.xclient.serial = 0; + xev.xclient.send_event = True; +- xev.xclient.display = gdk_display; ++ xev.xclient.display = display; + xev.xclient.window = gdk_x11_get_default_root_xwindow (); +- xev.xclient.message_type = XInternAtom (gdk_display, ++ xev.xclient.message_type = XInternAtom (display, + "_MUTTER_SET_KEYBINDINGS_MESSAGE", + False); + xev.xclient.format = 32; +@@ -104,14 +105,14 @@ send_set_keybindings (gboolean enabled) + xev.xclient.data.l[1] = 0; + xev.xclient.data.l[2] = 0; + +- XSendEvent (gdk_display, ++ XSendEvent (display, + gdk_x11_get_default_root_xwindow (), + False, + SubstructureRedirectMask | SubstructureNotifyMask, + &xev); + +- XFlush (gdk_display); +- XSync (gdk_display, False); ++ XFlush (display); ++ XSync (display, False); + } + + #ifdef WITH_VERBOSE_MODE +@@ -123,9 +124,9 @@ send_toggle_verbose (void) + xev.xclient.type = ClientMessage; + xev.xclient.serial = 0; + xev.xclient.send_event = True; +- xev.xclient.display = gdk_display; ++ xev.xclient.display = display; + xev.xclient.window = gdk_x11_get_default_root_xwindow (); +- xev.xclient.message_type = XInternAtom (gdk_display, ++ xev.xclient.message_type = XInternAtom (display, + "_MUTTER_TOGGLE_VERBOSE", + False); + xev.xclient.format = 32; +@@ -133,14 +134,14 @@ send_toggle_verbose (void) + xev.xclient.data.l[1] = 0; + xev.xclient.data.l[2] = 0; + +- XSendEvent (gdk_display, ++ XSendEvent (display, + gdk_x11_get_default_root_xwindow (), + False, + SubstructureRedirectMask | SubstructureNotifyMask, + &xev); + +- XFlush (gdk_display); +- XSync (gdk_display, False); ++ XFlush (display); ++ XSync (display, False); + } + #endif + +@@ -162,6 +163,8 @@ main (int argc, char **argv) + if (argc < 2) + usage (); + ++ display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); ++ + if (strcmp (argv[1], "restart") == 0) + send_restart (); + else if (strcmp (argv[1], "reload-theme") == 0) +diff --git a/src/ui/frames.c b/src/ui/frames.c +index 27928f1..f7654a5 100644 +--- a/src/ui/frames.c ++++ b/src/ui/frames.c +@@ -361,7 +361,7 @@ queue_recalc_func (gpointer key, gpointer value, gpointer data) + meta_frames_set_window_background (frames, frame); + + invalidate_whole_window (frames, frame); +- meta_core_queue_frame_resize (gdk_display, ++ meta_core_queue_frame_resize (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), + frame->xwindow); + if (frame->layout) + { +@@ -456,7 +456,7 @@ meta_frames_ensure_layout (MetaFrames *frames, + + g_return_if_fail (gtk_widget_get_realized (widget)); + +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), frame->xwindow, + META_CORE_GET_FRAME_FLAGS, &flags, + META_CORE_GET_FRAME_TYPE, &type, + META_CORE_GET_END); +@@ -539,7 +539,7 @@ meta_frames_calc_geometry (MetaFrames *frames, + MetaFrameType type; + MetaButtonLayout button_layout; + +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), frame->xwindow, + META_CORE_GET_CLIENT_WIDTH, &width, + META_CORE_GET_CLIENT_HEIGHT, &height, + META_CORE_GET_FRAME_FLAGS, &flags, +@@ -625,7 +625,7 @@ meta_frames_manage_window (MetaFrames *frames, + * and meta_ui_create_frame_window() return to meta_window_ensure_frame(). + */ + +- meta_core_grab_buttons (gdk_display, frame->xwindow); ++ meta_core_grab_buttons (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), frame->xwindow); + + g_hash_table_replace (frames->frames, &frame->xwindow, frame); + } +@@ -648,7 +648,7 @@ meta_frames_unmanage_window (MetaFrames *frames, + invalidate_all_caches (frames); + + /* restore the cursor */ +- meta_core_set_screen_cursor (gdk_display, ++ meta_core_set_screen_cursor (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), + frame->xwindow, + META_CURSOR_DEFAULT); + +@@ -715,7 +715,7 @@ meta_frames_get_geometry (MetaFrames *frames, + if (frame == NULL) + meta_bug ("No such frame 0x%lx\n", xwindow); + +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), frame->xwindow, + META_CORE_GET_FRAME_FLAGS, &flags, + META_CORE_GET_FRAME_TYPE, &type, + META_CORE_GET_END); +@@ -780,7 +780,7 @@ meta_frames_unflicker_bg (MetaFrames *frames, + meta_frames_paint_to_drawable (frames, frame, pixmap); + #endif + +- set_background_none (gdk_display, frame->xwindow); ++ set_background_none (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), frame->xwindow); + } + + void +@@ -797,10 +797,13 @@ meta_frames_apply_shapes (MetaFrames *frames, + XRectangle xrect; + Region corners_xregion; + Region window_xregion; ++ Display *display; + + frame = meta_frames_lookup_window (frames, xwindow); + g_return_if_fail (frame != NULL); + ++ display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); ++ + meta_frames_calc_geometry (frames, frame, &fgeom); + + if (!(fgeom.top_left_corner_rounded_radius != 0 || +@@ -815,7 +818,7 @@ meta_frames_apply_shapes (MetaFrames *frames, + "Unsetting shape mask on frame 0x%lx\n", + frame->xwindow); + +- XShapeCombineMask (gdk_display, frame->xwindow, ++ XShapeCombineMask (display, frame->xwindow, + ShapeBounding, 0, 0, None, ShapeSet); + frame->shape_applied = FALSE; + } +@@ -940,8 +943,8 @@ meta_frames_apply_shapes (MetaFrames *frames, + + attrs.override_redirect = True; + +- shape_window = XCreateWindow (gdk_display, +- RootWindow (gdk_display, screen_number), ++ shape_window = XCreateWindow (display, ++ RootWindow (display, screen_number), + -5000, -5000, + new_window_width, + new_window_height, +@@ -953,11 +956,11 @@ meta_frames_apply_shapes (MetaFrames *frames, + &attrs); + + /* Copy the client's shape to the temporary shape_window */ +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (display, frame->xwindow, + META_CORE_GET_CLIENT_XWINDOW, &client_window, + META_CORE_GET_END); + +- XShapeCombineShape (gdk_display, shape_window, ShapeBounding, ++ XShapeCombineShape (display, shape_window, ShapeBounding, + fgeom.left_width, + fgeom.top_height, + client_window, +@@ -980,17 +983,17 @@ meta_frames_apply_shapes (MetaFrames *frames, + + XDestroyRegion (client_xregion); + +- XShapeCombineRegion (gdk_display, shape_window, ++ XShapeCombineRegion (display, shape_window, + ShapeBounding, 0, 0, window_xregion, ShapeUnion); + + /* Now copy shape_window shape to the real frame */ +- XShapeCombineShape (gdk_display, frame->xwindow, ShapeBounding, ++ XShapeCombineShape (display, frame->xwindow, ShapeBounding, + 0, 0, + shape_window, + ShapeBounding, + ShapeSet); + +- XDestroyWindow (gdk_display, shape_window); ++ XDestroyWindow (display, shape_window); + } + else + { +@@ -1000,7 +1003,7 @@ meta_frames_apply_shapes (MetaFrames *frames, + "Frame 0x%lx has shaped corners\n", + frame->xwindow); + +- XShapeCombineRegion (gdk_display, frame->xwindow, ++ XShapeCombineRegion (display, frame->xwindow, + ShapeBounding, 0, 0, window_xregion, ShapeSet); + } + +@@ -1089,12 +1092,15 @@ show_tip_now (MetaFrames *frames) + Window root, child; + guint mask; + MetaFrameControl control; ++ Display *display; + + frame = frames->last_motion_frame; + if (frame == NULL) + return; + +- XQueryPointer (gdk_display, ++ display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); ++ ++ XQueryPointer (display, + frame->xwindow, + &root, &child, + &root_x, &root_y, +@@ -1184,7 +1190,7 @@ show_tip_now (MetaFrames *frames) + + screen_number = gdk_screen_get_number (gtk_widget_get_screen (GTK_WIDGET (frames))); + +- meta_fixed_tip_show (gdk_display, ++ meta_fixed_tip_show (display, + screen_number, + rect->x + dx, + rect->y + rect->height + 2 + dy, +@@ -1248,23 +1254,26 @@ meta_frame_titlebar_event (MetaUIFrame *frame, + int action) + { + MetaFrameFlags flags; ++ Display *display; ++ ++ display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + + switch (action) + { + case META_ACTION_TITLEBAR_TOGGLE_SHADE: + { +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (display, frame->xwindow, + META_CORE_GET_FRAME_FLAGS, &flags, + META_CORE_GET_END); + + if (flags & META_FRAME_ALLOWS_SHADE) + { + if (flags & META_FRAME_SHADED) +- meta_core_unshade (gdk_display, ++ meta_core_unshade (display, + frame->xwindow, + event->time); + else +- meta_core_shade (gdk_display, ++ meta_core_shade (display, + frame->xwindow, + event->time); + } +@@ -1273,52 +1282,52 @@ meta_frame_titlebar_event (MetaUIFrame *frame, + + case META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE: + { +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (display, frame->xwindow, + META_CORE_GET_FRAME_FLAGS, &flags, + META_CORE_GET_END); + + if (flags & META_FRAME_ALLOWS_MAXIMIZE) + { +- meta_core_toggle_maximize (gdk_display, frame->xwindow); ++ meta_core_toggle_maximize (display, frame->xwindow); + } + } + break; + + case META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_HORIZONTALLY: + { +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (display, frame->xwindow, + META_CORE_GET_FRAME_FLAGS, &flags, + META_CORE_GET_END); + + if (flags & META_FRAME_ALLOWS_MAXIMIZE) + { +- meta_core_toggle_maximize_horizontally (gdk_display, frame->xwindow); ++ meta_core_toggle_maximize_horizontally (display, frame->xwindow); + } + } + break; + + case META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_VERTICALLY: + { +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (display, frame->xwindow, + META_CORE_GET_FRAME_FLAGS, &flags, + META_CORE_GET_END); + + if (flags & META_FRAME_ALLOWS_MAXIMIZE) + { +- meta_core_toggle_maximize_vertically (gdk_display, frame->xwindow); ++ meta_core_toggle_maximize_vertically (display, frame->xwindow); + } + } + break; + + case META_ACTION_TITLEBAR_MINIMIZE: + { +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (display, frame->xwindow, + META_CORE_GET_FRAME_FLAGS, &flags, + META_CORE_GET_END); + + if (flags & META_FRAME_ALLOWS_MINIMIZE) + { +- meta_core_minimize (gdk_display, frame->xwindow); ++ meta_core_minimize (display, frame->xwindow); + } + } + break; +@@ -1328,13 +1337,13 @@ meta_frame_titlebar_event (MetaUIFrame *frame, + break; + + case META_ACTION_TITLEBAR_LOWER: +- meta_core_user_lower_and_unfocus (gdk_display, ++ meta_core_user_lower_and_unfocus (display, + frame->xwindow, + event->time); + break; + + case META_ACTION_TITLEBAR_MENU: +- meta_core_show_window_menu (gdk_display, ++ meta_core_show_window_menu (display, + frame->xwindow, + event->x_root, + event->y_root, +@@ -1383,8 +1392,10 @@ meta_frames_button_press_event (GtkWidget *widget, + MetaUIFrame *frame; + MetaFrames *frames; + MetaFrameControl control; ++ Display *display; + + frames = META_FRAMES (widget); ++ display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + + /* Remember that the display may have already done something with this event. + * If so there's probably a GrabOp in effect. +@@ -1407,7 +1418,7 @@ meta_frames_button_press_event (GtkWidget *widget, + meta_topic (META_DEBUG_FOCUS, + "Focusing window with frame 0x%lx due to button 1 press\n", + frame->xwindow); +- meta_core_user_focus (gdk_display, ++ meta_core_user_focus (display, + frame->xwindow, + event->time); + } +@@ -1423,11 +1434,11 @@ meta_frames_button_press_event (GtkWidget *widget, + event->button == 1 && + event->type == GDK_2BUTTON_PRESS) + { +- meta_core_end_grab_op (gdk_display, event->time); ++ meta_core_end_grab_op (display, event->time); + return meta_frame_double_click_event (frame, event); + } + +- if (meta_core_get_grab_op (gdk_display) != ++ if (meta_core_get_grab_op (display) != + META_GRAB_OP_NONE) + return FALSE; /* already up to something */ + +@@ -1486,7 +1497,7 @@ meta_frames_button_press_event (GtkWidget *widget, + break; + } + +- meta_core_begin_grab_op (gdk_display, ++ meta_core_begin_grab_op (display, + frame->xwindow, + op, + TRUE, +@@ -1518,7 +1529,7 @@ meta_frames_button_press_event (GtkWidget *widget, + if (meta_ui_get_direction() == META_UI_DIRECTION_RTL) + dx += rect->width; + +- meta_core_show_window_menu (gdk_display, ++ meta_core_show_window_menu (display, + frame->xwindow, + rect->x + dx, + rect->y + rect->height + dy, +@@ -1572,19 +1583,19 @@ meta_frames_button_press_event (GtkWidget *widget, + break; + } + +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (display, frame->xwindow, + META_CORE_IS_TITLEBAR_ONSCREEN, &titlebar_is_onscreen, + META_CORE_GET_END); + + if (!titlebar_is_onscreen) +- meta_core_show_window_menu (gdk_display, ++ meta_core_show_window_menu (display, + frame->xwindow, + event->x_root, + event->y_root, + event->button, + event->time); + else +- meta_core_begin_grab_op (gdk_display, ++ meta_core_begin_grab_op (display, + frame->xwindow, + op, + TRUE, +@@ -1600,13 +1611,13 @@ meta_frames_button_press_event (GtkWidget *widget, + { + MetaFrameFlags flags; + +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (display, frame->xwindow, + META_CORE_GET_FRAME_FLAGS, &flags, + META_CORE_GET_END); + + if (flags & META_FRAME_ALLOWS_MOVE) + { +- meta_core_begin_grab_op (gdk_display, ++ meta_core_begin_grab_op (display, + frame->xwindow, + META_GRAB_OP_MOVING, + TRUE, +@@ -1633,12 +1644,13 @@ meta_frames_button_press_event (GtkWidget *widget, + void + meta_frames_notify_menu_hide (MetaFrames *frames) + { +- if (meta_core_get_grab_op (gdk_display) == ++ Display *display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); ++ if (meta_core_get_grab_op (display) == + META_GRAB_OP_CLICKING_MENU) + { + Window grab_frame; + +- grab_frame = meta_core_get_grab_frame (gdk_display); ++ grab_frame = meta_core_get_grab_frame (display); + + if (grab_frame != None) + { +@@ -1650,7 +1662,7 @@ meta_frames_notify_menu_hide (MetaFrames *frames) + { + redraw_control (frames, frame, + META_FRAME_CONTROL_MENU); +- meta_core_end_grab_op (gdk_display, CurrentTime); ++ meta_core_end_grab_op (display, CurrentTime); + } + } + } +@@ -1663,8 +1675,10 @@ meta_frames_button_release_event (GtkWidget *widget, + MetaUIFrame *frame; + MetaFrames *frames; + MetaGrabOp op; ++ Display *display; + + frames = META_FRAMES (widget); ++ display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + + frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window)); + if (frame == NULL) +@@ -1672,7 +1686,7 @@ meta_frames_button_release_event (GtkWidget *widget, + + clear_tip (frames); + +- op = meta_core_get_grab_op (gdk_display); ++ op = meta_core_get_grab_op (display); + + if (op == META_GRAB_OP_NONE) + return FALSE; +@@ -1681,8 +1695,8 @@ meta_frames_button_release_event (GtkWidget *widget, + * involving frame controls). Window ops that don't require a + * frame are handled in the Xlib part of the code, display.c/window.c + */ +- if (frame->xwindow == meta_core_get_grab_frame (gdk_display) && +- ((int) event->button) == meta_core_get_grab_button (gdk_display)) ++ if (frame->xwindow == meta_core_get_grab_frame (display) && ++ ((int) event->button) == meta_core_get_grab_button (display)) + { + MetaFrameControl control; + +@@ -1692,81 +1706,81 @@ meta_frames_button_release_event (GtkWidget *widget, + { + case META_GRAB_OP_CLICKING_MINIMIZE: + if (control == META_FRAME_CONTROL_MINIMIZE) +- meta_core_minimize (gdk_display, frame->xwindow); ++ meta_core_minimize (display, frame->xwindow); + +- meta_core_end_grab_op (gdk_display, event->time); ++ meta_core_end_grab_op (display, event->time); + break; + + case META_GRAB_OP_CLICKING_MAXIMIZE: + if (control == META_FRAME_CONTROL_MAXIMIZE) + { + /* Focus the window on the maximize */ +- meta_core_user_focus (gdk_display, ++ meta_core_user_focus (display, + frame->xwindow, + event->time); +- meta_core_maximize (gdk_display, frame->xwindow); ++ meta_core_maximize (display, frame->xwindow); + } +- meta_core_end_grab_op (gdk_display, event->time); ++ meta_core_end_grab_op (display, event->time); + break; + + case META_GRAB_OP_CLICKING_UNMAXIMIZE: + if (control == META_FRAME_CONTROL_UNMAXIMIZE) +- meta_core_unmaximize (gdk_display, frame->xwindow); ++ meta_core_unmaximize (display, frame->xwindow); + +- meta_core_end_grab_op (gdk_display, event->time); ++ meta_core_end_grab_op (display, event->time); + break; + + case META_GRAB_OP_CLICKING_DELETE: + if (control == META_FRAME_CONTROL_DELETE) +- meta_core_delete (gdk_display, frame->xwindow, event->time); ++ meta_core_delete (display, frame->xwindow, event->time); + +- meta_core_end_grab_op (gdk_display, event->time); ++ meta_core_end_grab_op (display, event->time); + break; + + case META_GRAB_OP_CLICKING_MENU: +- meta_core_end_grab_op (gdk_display, event->time); ++ meta_core_end_grab_op (display, event->time); + break; + + case META_GRAB_OP_CLICKING_SHADE: + if (control == META_FRAME_CONTROL_SHADE) +- meta_core_shade (gdk_display, frame->xwindow, event->time); ++ meta_core_shade (display, frame->xwindow, event->time); + +- meta_core_end_grab_op (gdk_display, event->time); ++ meta_core_end_grab_op (display, event->time); + break; + + case META_GRAB_OP_CLICKING_UNSHADE: + if (control == META_FRAME_CONTROL_UNSHADE) +- meta_core_unshade (gdk_display, frame->xwindow, event->time); ++ meta_core_unshade (display, frame->xwindow, event->time); + +- meta_core_end_grab_op (gdk_display, event->time); ++ meta_core_end_grab_op (display, event->time); + break; + + case META_GRAB_OP_CLICKING_ABOVE: + if (control == META_FRAME_CONTROL_ABOVE) +- meta_core_make_above (gdk_display, frame->xwindow); ++ meta_core_make_above (display, frame->xwindow); + +- meta_core_end_grab_op (gdk_display, event->time); ++ meta_core_end_grab_op (display, event->time); + break; + + case META_GRAB_OP_CLICKING_UNABOVE: + if (control == META_FRAME_CONTROL_UNABOVE) +- meta_core_unmake_above (gdk_display, frame->xwindow); ++ meta_core_unmake_above (display, frame->xwindow); + +- meta_core_end_grab_op (gdk_display, event->time); ++ meta_core_end_grab_op (display, event->time); + break; + + case META_GRAB_OP_CLICKING_STICK: + if (control == META_FRAME_CONTROL_STICK) +- meta_core_stick (gdk_display, frame->xwindow); ++ meta_core_stick (display, frame->xwindow); + +- meta_core_end_grab_op (gdk_display, event->time); ++ meta_core_end_grab_op (display, event->time); + break; + + case META_GRAB_OP_CLICKING_UNSTICK: + if (control == META_FRAME_CONTROL_UNSTICK) +- meta_core_unstick (gdk_display, frame->xwindow); ++ meta_core_unstick (display, frame->xwindow); + +- meta_core_end_grab_op (gdk_display, event->time); ++ meta_core_end_grab_op (display, event->time); + break; + + default: +@@ -1855,7 +1869,7 @@ meta_frames_update_prelit_control (MetaFrames *frames, + } + + /* set/unset the prelight cursor */ +- meta_core_set_screen_cursor (gdk_display, ++ meta_core_set_screen_cursor (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), + frame->xwindow, + cursor); + +@@ -1899,8 +1913,10 @@ meta_frames_motion_notify_event (GtkWidget *widget, + MetaUIFrame *frame; + MetaFrames *frames; + MetaGrabOp grab_op; ++ Display *display; + + frames = META_FRAMES (widget); ++ display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + + frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window)); + if (frame == NULL) +@@ -1910,7 +1926,7 @@ meta_frames_motion_notify_event (GtkWidget *widget, + + frames->last_motion_frame = frame; + +- grab_op = meta_core_get_grab_op (gdk_display); ++ grab_op = meta_core_get_grab_op (display); + + switch (grab_op) + { +@@ -2136,7 +2152,8 @@ populate_cache (MetaFrames *frames, + MetaFrameFlags frame_flags; + int i; + +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), ++ frame->xwindow, + META_CORE_GET_FRAME_WIDTH, &frame_width, + META_CORE_GET_FRAME_HEIGHT, &frame_height, + META_CORE_GET_SCREEN_WIDTH, &screen_width, +@@ -2212,7 +2229,8 @@ clip_to_screen (MetaRegion *region, MetaUIFrame *frame) + * is crucial to handle huge client windows, + * like "xterm -geometry 1000x1000" + */ +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), ++ frame->xwindow, + META_CORE_GET_FRAME_X, &frame_area.x, + META_CORE_GET_FRAME_Y, &frame_area.y, + META_CORE_GET_FRAME_WIDTH, &frame_area.width, +@@ -2336,14 +2354,16 @@ meta_frames_paint_to_drawable (MetaFrames *frames, + int i; + MetaButtonLayout button_layout; + MetaGrabOp grab_op; ++ Display *display; + + widget = GTK_WIDGET (frames); ++ display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + + for (i = 0; i < META_BUTTON_TYPE_LAST; i++) + button_states[i] = META_BUTTON_STATE_NORMAL; + +- grab_frame = meta_core_get_grab_frame (gdk_display); +- grab_op = meta_core_get_grab_op (gdk_display); ++ grab_frame = meta_core_get_grab_frame (display); ++ grab_op = meta_core_get_grab_op (display); + if (grab_frame != frame->xwindow) + grab_op = META_GRAB_OP_NONE; + +@@ -2434,7 +2454,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames, + button_states[META_BUTTON_TYPE_RIGHT_RIGHT_BACKGROUND] = + button_states[META_BUTTON_TYPE_CLOSE]; + +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (display, frame->xwindow, + META_CORE_GET_FRAME_FLAGS, &flags, + META_CORE_GET_FRAME_TYPE, &type, + META_CORE_GET_MINI_ICON, &mini_icon, +@@ -2463,7 +2483,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames, + type, frame->text_height, flags, + &top, &bottom, &left, &right); + +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (display, frame->xwindow, + META_CORE_GET_SCREEN_WIDTH, &screen_width, + META_CORE_GET_SCREEN_HEIGHT, &screen_height, + META_CORE_GET_END); +@@ -2559,7 +2579,7 @@ meta_frames_set_window_background (MetaFrames *frames, + MetaFrameStyle *style = NULL; + gboolean frame_exists; + +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), frame->xwindow, + META_CORE_WINDOW_HAS_FRAME, &frame_exists, + META_CORE_GET_FRAME_FLAGS, &flags, + META_CORE_GET_FRAME_TYPE, &type, +@@ -2737,7 +2757,8 @@ get_control (MetaFrames *frames, + if (POINT_IN_RECT (x, y, fgeom.menu_rect.clickable)) + return META_FRAME_CONTROL_MENU; + +- meta_core_get (gdk_display, frame->xwindow, ++ meta_core_get (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), ++ frame->xwindow, + META_CORE_GET_FRAME_FLAGS, &flags, + META_CORE_GET_END); + +@@ -2870,7 +2891,7 @@ meta_frames_push_delay_exposes (MetaFrames *frames) + { + /* Make sure we've repainted things */ + gdk_window_process_all_updates (); +- XFlush (gdk_display); ++ XFlush (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ())); + } + + frames->expose_delay_count += 1; +diff --git a/src/ui/menu.c b/src/ui/menu.c +index 838bca8..ae58736 100644 +--- a/src/ui/menu.c ++++ b/src/ui/menu.c +@@ -139,7 +139,8 @@ menu_closed (GtkMenu *widget, + menu = data; + + meta_frames_notify_menu_hide (menu->frames); +- (* menu->func) (menu, gdk_display, ++ (* menu->func) (menu, ++ GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), + menu->client_xwindow, + gtk_get_current_event_time (), + 0, 0, +@@ -158,7 +159,8 @@ activate_cb (GtkWidget *menuitem, gpointer data) + md = data; + + meta_frames_notify_menu_hide (md->menu->frames); +- (* md->menu->func) (md->menu, gdk_display, ++ (* md->menu->func) (md->menu, ++ GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), + md->menu->client_xwindow, + gtk_get_current_event_time (), + md->op, +diff --git a/src/ui/tabpopup.c b/src/ui/tabpopup.c +index 7dc4232..a7c1ee5 100644 +--- a/src/ui/tabpopup.c ++++ b/src/ui/tabpopup.c +@@ -455,7 +455,8 @@ meta_ui_tab_popup_set_showing (MetaTabPopup *popup, + { + meta_verbose ("Hiding tab popup window\n"); + gtk_widget_hide (popup->window); +- meta_core_increment_event_serial (gdk_display); ++ meta_core_increment_event_serial ( ++ GDK_DISPLAY_XDISPLAY (gdk_display_get_default ())); + } + } + } +@@ -491,7 +492,8 @@ display_entry (MetaTabPopup *popup, + + /* Do stuff behind gtk's back */ + gdk_window_hide (window); +- meta_core_increment_event_serial (gdk_display); ++ meta_core_increment_event_serial ( ++ GDK_DISPLAY_XDISPLAY (gdk_display_get_default ())); + + rect = te->rect; + rect.x = 0; +diff --git a/src/ui/ui.c b/src/ui/ui.c +index 5ddafb2..82df3e9 100644 +--- a/src/ui/ui.c ++++ b/src/ui/ui.c +@@ -62,7 +62,7 @@ meta_ui_init (int *argc, char ***argv) + Display* + meta_ui_get_display (void) + { +- return gdk_display; ++ return GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + } + + typedef struct _EventFunc EventFunc; +@@ -126,7 +126,7 @@ meta_ui_new (Display *xdisplay, + ui->xdisplay = xdisplay; + ui->xscreen = screen; + +- g_assert (xdisplay == gdk_display); ++ g_assert (xdisplay == GDK_DISPLAY_XDISPLAY (gdk_display_get_default ())); + ui->frames = meta_frames_new (XScreenNumberOfScreen (screen)); + gtk_widget_realize (GTK_WIDGET (ui->frames)); + +@@ -408,7 +408,8 @@ meta_image_window_set_showing (MetaImageWindow *iw, + else + { + gtk_widget_hide (iw->window); +- meta_core_increment_event_serial (gdk_display); ++ meta_core_increment_event_serial ( ++ GDK_DISPLAY_XDISPLAY (gdk_display_get_default ())); + } + } + +-- +cgit v0.8.3.1 diff --git a/mutter.changes b/mutter.changes index f76a5ae..b8bcc34 100644 --- a/mutter.changes +++ b/mutter.changes @@ -1,38 +1,3 @@ -------------------------------------------------------------------- -Thu Oct 14 16:31:48 CEST 2010 - vuntz@opensuse.org - -- Remove explicit Requires for clutter-devel and gtk2-devel in - devel package: they will automatically be added the pkgconfig() - way. - -------------------------------------------------------------------- -Tue Oct 5 09:58:40 CEST 2010 - vuntz@opensuse.org - -- Update to version 2.91.0: - + Enable side-by-side tiling via a gesture of dragging to the - left or right edge of the screen. (enabled with an - off-by-default GConf key) - + Allow breaking out of maximization/tiling using a - alt-middle-button window resize - + Add the ability to have modal dialogs attached to their parent - window (enabled with an off-by-default GConf key) - + Draw with Cairo rather than GDK - + Add compatibility for changes in GTK+ 3 - - libmutter-private is now only installed for GTK+ 3 builds - - Theme parts of libmutter-private API are changed to take - cairo_t rather than GdkDrawable - + Update introspection build and annotations for new behavior of - g-ir-scanner - + Fix bug that caused window menu options not to work - + Fix misbehavior of Wine windows - + Fix crashes from missing error traps - + Build fixes - + Misc bug fixes - + Cleanups - + Updated translations. -- Drop mutter-gdk-cairo.patch, mutter-no-gdk_display.patch, - mutter-gdk-keys.patch: fixed upstream. - ------------------------------------------------------------------- Sat Sep 18 13:21:57 CEST 2010 - vuntz@opensuse.org diff --git a/mutter.spec b/mutter.spec index 420aa2c..a0ea08d 100644 --- a/mutter.spec +++ b/mutter.spec @@ -1,5 +1,5 @@ # -# spec file for package mutter (Version 2.91.0) +# spec file for package mutter (Version 2.31.5) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -32,10 +32,16 @@ BuildRequires: update-desktop-files BuildRequires: zenity License: GPLv2+ Group: System/GUI/GNOME -Version: 2.91.0 -Release: 1 +Version: 2.31.5 +Release: 2 Summary: Window and compositing manager based on Clutter Source: %{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM mutter-gdk-cairo.patch dimstar@opensuse.org -- Replace GDK drawing API with cairo, upstream git commit 08cfdcd & 0839c1 +Patch0: mutter-gdk-cairo.patch +# PATCH-FIX-UPSTREAM mutter-no-gdk_display.patch vuntz@opensuse.org -- Stop using gdk_display, taken from git +Patch1: mutter-no-gdk_display.patch +# PATCH-FIX-UPSTREAM mutter-gdk-keys.patch vuntz@opensuse.org -- Update for GDK 3 API changes, taken from git +Patch2: mutter-gdk-keys.patch Url: http://www.gnome.org BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: zenity @@ -52,6 +58,8 @@ License: GPLv2+ Summary: Include Files and Libraries mandatory for Development Group: Development/Libraries/GNOME Requires: %{name} = %{version} +Requires: clutter-devel +Requires: gtk2-devel %description devel This package contains all necessary include files and libraries needed @@ -61,6 +69,9 @@ to develop applications that require these. %lang_package %prep %setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build %configure \