[mate-desktop/f16] fix deps wrt -libs subpkg
Wolfgang Ulbrich
raveit65 at fedoraproject.org
Sun Aug 12 18:48:01 UTC 2012
commit c2e90589f7767112b7fe133032bd5d37d9faf475
Author: raveit65 <chat-to-me at raveit.de>
Date: Sun Aug 12 20:47:56 2012 +0200
fix deps wrt -libs subpkg
.gitignore | 1 +
...e-double-free-when-destroying-private-win.patch | 38 ++
...-Don-t-read-past-the-end-of-a-string-mate.patch | 11 +
mate-desktop.spec | 149 ++++++
mate-desktop_remove_mate-bg-crossfade.patch | 472 ++++++++++++++++++++
sources | 1 +
6 files changed, 672 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..ac56adf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/mate-desktop-1.4.1.tar.xz
diff --git a/0001-Fix-possible-double-free-when-destroying-private-win.patch b/0001-Fix-possible-double-free-when-destroying-private-win.patch
new file mode 100644
index 0000000..6d119ed
--- /dev/null
+++ b/0001-Fix-possible-double-free-when-destroying-private-win.patch
@@ -0,0 +1,38 @@
+From 7e967de7dff160d7302b1ab66db3f9054b8373b3 Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess at hadess.net>
+Date: Thu, 11 Nov 2010 13:21:21 +0000
+Subject: [PATCH] Fix possible double-free when destroying private windows
+
+This could cause free'ing random data when the members of ->windows
+were destroyed, but ->windows itself wasn't. As it was != NULL, we'd
+be free memory that wouldn't belong to us anymore.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=634534
+---
+ libmate-desktop/mate-rr-labeler.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/libmate-desktop/mate-rr-labeler.c b/libmate-desktop/mate-rr-labeler.c
+index 1de4569..ebf9905 100644
+--- a/libmate-desktop/mate-rr-labeler.c
++++ b/libmate-desktop/mate-rr-labeler.c
+@@ -411,11 +411,16 @@ mate_rr_labeler_hide (GnomeRRLabeler *labeler)
+
+ g_return_if_fail (MATE_IS_RR_LABELER (labeler));
+
++ if (labeler->windows == NULL)
++ return;
++
+ for (i = 0; i < labeler->num_outputs; i++)
+ if (labeler->windows[i] != NULL) {
+ gtk_widget_destroy (labeler->windows[i]);
+ labeler->windows[i] = NULL;
+ }
++ g_free (labeler->windows);
++ labeler->windows = NULL;
+ }
+
+ void
+--
+1.7.3.2
+
diff --git a/0001-bgo-629168-Don-t-read-past-the-end-of-a-string-mate.patch b/0001-bgo-629168-Don-t-read-past-the-end-of-a-string-mate.patch
new file mode 100644
index 0000000..78b6d99
--- /dev/null
+++ b/0001-bgo-629168-Don-t-read-past-the-end-of-a-string-mate.patch
@@ -0,0 +1,11 @@
+--- mate-desktop-1.1.0/libmate-desktop/display-name.c.orig 2011-12-09 17:02:56.000000000 +0100
++++ mate-desktop-1.1.0/libmate-desktop/display-name.c 2012-02-18 16:19:05.527986564 +0100
+@@ -209,7 +209,7 @@ static void read_pnp_ids(void)
+ {
+ line = lines[i];
+
+- if (line[3] == '\t')
++ if (line[0] && line[1] && line[2] && line[3] == '\t' && line[4])
+ {
+ code = line;
+ line[3] = '\0';
diff --git a/mate-desktop.spec b/mate-desktop.spec
new file mode 100644
index 0000000..60f7bcc
--- /dev/null
+++ b/mate-desktop.spec
@@ -0,0 +1,149 @@
+%global po_package mate-desktop-2.0
+
+Summary: Shared code among gnome-panel, gnome-session, nautilus, etc
+Name: mate-desktop
+Version: 1.4.1
+Release: 10%{?dist}
+URL: http://mate-desktop.org
+Source0: http://pub.mate-desktop.org/releases/1.4/%{name}-%{version}.tar.xz
+
+License: GPLv2+ and LGPLv2+ and MIT
+Group: System Environment/Libraries
+
+BuildRequires: mate-common
+BuildRequires: mate-conf-devel
+BuildRequires: startup-notification-devel
+BuildRequires: mate-doc-utils
+BuildRequires: unique-devel
+BuildRequires: desktop-file-utils
+
+Requires: %{name}-libs%{?_isa} = %{version}-%{release}
+Requires: redhat-menus
+Requires: pygtk2
+
+# Upstream fixes was send to gnome git, but not in mate
+Patch0: 0001-bgo-629168-Don-t-read-past-the-end-of-a-string-mate.patch
+Patch1: 0001-Fix-possible-double-free-when-destroying-private-win.patch
+
+# https://github.com/mate-desktop/mate-desktop/issues/16
+Patch2: mate-desktop_remove_mate-bg-crossfade.patch
+
+%description
+The mate-desktop package contains an internal library
+(libmatedesktop) used to implement some portions of the MATE
+desktop, and also some data files and other shared components of the
+MATE user environment.
+
+%package libs
+Summary: Shared libraries for libmate-desktop
+License: LGPLv2+
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description libs
+Shared libraries for libmate-desktop
+
+%package devel
+Summary: Libraries and headers for libmate-desktop
+License: LGPLv2+
+Group: Development/Libraries
+Requires: %{name}-libs%{?_isa} = %{version}-%{release}
+
+%description devel
+Libraries and header files for the MATE-internal private library
+libmatedesktop.
+
+%prep
+%setup -q
+%patch0 -p1 -b .pnp
+%patch1 -p1 -b .double-free
+%patch2 -p1 -b .mate-desktop_remove_mate-bg-crossfade
+NOCONFIGURE=1 ./autogen.sh
+
+%build
+
+%configure \
+ --disable-libtool-lock \
+ --disable-scrollkeeper \
+ --disable-static \
+ --with-pnp-ids-path="%{_datadir}/hwdata/pnp.ids" \
+ --enable-unique \
+ --enable-gtk-doc
+
+make %{?_smp_mflags}
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
+find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
+
+# stuff we don't want
+rm -rf $RPM_BUILD_ROOT/var/scrollkeeper
+
+# to avoid conflicts with gnome
+mkdir $RPM_BUILD_ROOT%{_datadir}/omf/mate
+mv -f $RPM_BUILD_ROOT%{_datadir}/omf/{fdl,gpl,lgpl} $RPM_BUILD_ROOT%{_datadir}/omf/mate
+
+desktop-file-install \
+ --remove-category="MATE" \
+ --add-category="X-Mate" \
+ --remove-only-show-in="MATE" \
+ --add-only-show-in="X-MATE" \
+ --delete-original \
+ --dir=$RPM_BUILD_ROOT%{_datadir}/applications \
+$RPM_BUILD_ROOT%{_datadir}/applications/mate-about.desktop
+
+%find_lang %{po_package} --all-name
+
+%post libs -p /sbin/ldconfig
+
+%postun libs -p /sbin/ldconfig
+
+%files -f %{po_package}.lang
+%doc AUTHORS COPYING COPYING.LIB NEWS README
+%{_datadir}/applications/mate-about.desktop
+%doc %{_mandir}/man1/mate-about.1*
+# GPL
+%{_bindir}/mate-about
+# LGPL
+%{_datadir}/mate/help/*/*/*.xml
+%{_datadir}/omf/mate
+%{_datadir}/mate-about
+
+%files libs
+# LGPL
+%{_libdir}/libmate-desktop-2.so.*
+
+
+%files devel
+%{_libdir}/libmate-desktop-2.so
+%{_libdir}/pkgconfig/*
+%{_includedir}/mate-desktop-2.0
+%doc %{_datadir}/gtk-doc/html/mate-desktop
+
+
+%changelog
+* Sun Aug 12 2012 Rex Dieter <rdieter at fedoraproject.org> 1.4.1-10
+- fix deps wrt -libs subpkg
+
+* Sat Aug 11 2012 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.4.1-9
+- add isa tag to -libs
+
+* Sat Aug 11 2012 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.4.1-8
+- change file section for own directories
+- change 'to avoid conflicts with gnome' part
+- add libs subpackage for shared libraries
+
+* Fri Aug 03 2012 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.4.1-7
+- add desktop file install for mate-about.desktop
+- add BuildRequires desktop-file-utils
+- remove BuildRequires intltool gtk-doc
+
+* Fri Aug 03 2012 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.4.1-6
+- start initial for fedora
+- remove unnecessary buildRequires
+- Drop pycairo from Requires
+- change --with-pnp-ids-path="/usr/share/hwdata/pnp.ids" to
+- --with-pnp-ids-path="%%{_datadir}/hwdata/pnp.ids"
+
+* Sun Dec 25 2011 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.1.0-1
+- mate-desktop.spec based on gnome-desktop-2.32.0-9.fc16 spec
diff --git a/mate-desktop_remove_mate-bg-crossfade.patch b/mate-desktop_remove_mate-bg-crossfade.patch
new file mode 100644
index 0000000..030e381
--- /dev/null
+++ b/mate-desktop_remove_mate-bg-crossfade.patch
@@ -0,0 +1,472 @@
+diff -upr mate-desktop-1.2.0-orig/libmate-desktop/libmateui/Makefile.am mate-desktop-1.2.0/libmate-desktop/libmateui/Makefile.am
+--- mate-desktop-1.2.0-orig/libmate-desktop/libmateui/Makefile.am 2012-02-23 12:42:36.000000000 +0100
++++ mate-desktop-1.2.0/libmate-desktop/libmateui/Makefile.am 2012-05-27 20:54:35.000000000 +0200
+@@ -1,7 +1,6 @@
+ libmateui_desktopdir = $(includedir)/mate-desktop-2.0/libmateui
+ libmateui_desktop_HEADERS = \
+ mate-bg.h \
+- mate-bg-crossfade.h \
+ mate-desktop-thumbnail.h \
+ mate-rr.h \
+ mate-rr-config.h \
+diff -upr mate-desktop-1.2.0-orig/libmate-desktop/libmateui/mate-bg.h mate-desktop-1.2.0/libmate-desktop/libmateui/mate-bg.h
+--- mate-desktop-1.2.0-orig/libmate-desktop/libmateui/mate-bg.h 2012-02-23 12:42:36.000000000 +0100
++++ mate-desktop-1.2.0/libmate-desktop/libmateui/mate-bg.h 2012-05-27 21:21:26.000000000 +0200
+@@ -32,7 +32,6 @@
+ #include <gdk/gdk.h>
+ #include <mateconf/mateconf-client.h>
+ #include <libmateui/mate-desktop-thumbnail.h>
+-#include <libmateui/mate-bg-crossfade.h>
+
+ #ifdef __cplusplus
+ extern "C" {
+@@ -94,11 +93,7 @@ void mate_bg_draw
+ GdkScreen *screen,
+ gboolean is_root);
+
+-#if GTK_CHECK_VERSION(3, 0, 0)
+- cairo_surface_t* mate_bg_create_pixmap(MateBG* bg, GdkWindow* window, int width, int height, gboolean root);
+-#else
+- GdkPixmap* mate_bg_create_pixmap(MateBG* bg, GdkWindow* window, int width, int height, gboolean root);
+-#endif
++GdkPixmap* mate_bg_create_pixmap(MateBG* bg, GdkWindow* window, int width, int height, gboolean root);
+
+ gboolean mate_bg_get_image_size (MateBG *bg,
+ MateDesktopThumbnailFactory *factory,
+@@ -128,15 +123,7 @@ GdkPixbuf * mate_bg_create_frame_th
+ * these object methods, drop mate_bg_create_pixmap, etc.
+ */
+
+-#if GTK_CHECK_VERSION(3, 0, 0)
+- void mate_bg_set_pixmap_as_root(GdkScreen* screen, cairo_surface_t* pixmap);
+- MateBGCrossfade* mate_bg_set_pixmap_as_root_with_crossfade(GdkScreen* screen, cairo_surface_t* pixmap);
+- cairo_surface_t* mate_bg_get_pixmap_from_root(GdkScreen* screen);
+-#else
+- void mate_bg_set_pixmap_as_root(GdkScreen* screen, GdkPixmap* pixmap);
+- MateBGCrossfade* mate_bg_set_pixmap_as_root_with_crossfade(GdkScreen* screen, GdkPixmap* pixmap);
+- GdkPixmap* mate_bg_get_pixmap_from_root(GdkScreen* screen);
+-#endif
++void mate_bg_set_pixmap_as_root(GdkScreen* screen, GdkPixmap* pixmap);
+
+ #ifdef __cplusplus
+ }
+diff -upr mate-desktop-1.2.0-orig/libmate-desktop/Makefile.am mate-desktop-1.2.0/libmate-desktop/Makefile.am
+--- mate-desktop-1.2.0-orig/libmate-desktop/Makefile.am 2012-02-23 12:42:36.000000000 +0100
++++ mate-desktop-1.2.0/libmate-desktop/Makefile.am 2012-05-27 20:54:17.000000000 +0200
+@@ -18,7 +18,6 @@ libmate_desktop_2_la_SOURCES = \
+ mate-desktop-thumbnail.c \
+ mate-thumbnail-pixbuf-utils.c \
+ mate-bg.c \
+- mate-bg-crossfade.c \
+ display-name.c \
+ mate-rr.c \
+ mate-rr-config.c \
+diff -upr mate-desktop-1.2.0-orig/libmate-desktop/mate-bg.c mate-desktop-1.2.0/libmate-desktop/mate-bg.c
+--- mate-desktop-1.2.0-orig/libmate-desktop/mate-bg.c 2012-02-23 12:42:36.000000000 +0100
++++ mate-desktop-1.2.0/libmate-desktop/mate-bg.c 2012-05-27 22:02:12.000000000 +0200
+@@ -39,13 +39,10 @@ Author: Soren Sandmann <sandmann at redhat.
+ #include <X11/Xlib.h>
+ #include <X11/Xatom.h>
+
+-#include <cairo.h>
+-
+ #include <mateconf/mateconf-client.h>
+
+ #define MATE_DESKTOP_USE_UNSTABLE_API
+ #include <libmateui/mate-bg.h>
+-#include <libmateui/mate-bg-crossfade.h>
+
+ #define BG_KEY_DRAW_BACKGROUND MATE_BG_KEY_DIR "/draw_background"
+ #define BG_KEY_PRIMARY_COLOR MATE_BG_KEY_DIR "/primary_color"
+@@ -129,11 +126,7 @@ static guint signals[N_SIGNALS] = {0};
+
+ G_DEFINE_TYPE(MateBG, mate_bg, G_TYPE_OBJECT)
+
+-#if GTK_CHECK_VERSION(3, 0, 0)
+- static cairo_surface_t* make_root_pixmap(GdkScreen* screen, gint width, gint height);
+-#else
+- static GdkPixmap* make_root_pixmap(GdkScreen* screen, gint width, gint height);
+-#endif
++static GdkPixmap* make_root_pixmap(GdkScreen* screen, gint width, gint height);
+
+ /* Pixbuf utils */
+ static guint32 pixbuf_average_value (GdkPixbuf *pixbuf);
+@@ -144,11 +137,7 @@ static GdkPixbuf *pixbuf_scale_to_min (
+ int min_width,
+ int min_height);
+
+-#if GTK_CHECK_VERSION(3, 0, 0)
+- static void pixbuf_draw_gradient(GdkPixbuf* pixbuf, gboolean horizontal, GdkColor* c1, GdkColor* c2, cairo_rectangle_int_t* rect);
+-#else
+- static void pixbuf_draw_gradient(GdkPixbuf* pixbuf, gboolean horizontal, GdkColor* c1, GdkColor* c2, GdkRectangle* rect);
+-#endif
++static void pixbuf_draw_gradient(GdkPixbuf* pixbuf, gboolean horizontal, GdkColor* c1, GdkColor* c2, GdkRectangle* rect);
+
+
+ static void pixbuf_tile (GdkPixbuf *src,
+@@ -643,19 +632,11 @@ mate_bg_set_filename (MateBG *bg,
+ }
+ }
+
+-#if GTK_CHECK_VERSION(3, 0, 0)
+- static void draw_color_area(MateBG* bg, GdkPixbuf* dest, cairo_rectangle_int_t* rect)
+-#else
+- static void draw_color_area(MateBG* bg, GdkPixbuf* dest, GdkRectangle* rect)
+-#endif
++static void draw_color_area(MateBG* bg, GdkPixbuf* dest, GdkRectangle* rect)
+ {
+ guint32 pixel;
+
+- #if GTK_CHECK_VERSION(3, 0, 0)
+- cairo_rectangle_int_t extent;
+- #else
+ GdkRectangle extent;
+- #endif
+
+
+ extent.x = 0;
+@@ -694,11 +675,7 @@ draw_color (MateBG *bg,
+ GdkPixbuf *dest,
+ GdkScreen *screen)
+ {
+- #if GTK_CHECK_VERSION(3, 0, 0)
+- cairo_rectangle_int_t rect;
+- #else
+ GdkRectangle rect;
+- #endif
+
+ rect.x = 0;
+ rect.y = 0;
+@@ -712,11 +689,7 @@ draw_color_each_monitor (MateBG *bg,
+ GdkPixbuf *dest,
+ GdkScreen *screen)
+ {
+- #if GTK_CHECK_VERSION(3, 0, 0)
+- cairo_rectangle_int_t rect;
+- #else
+ GdkRectangle rect;
+- #endif
+ gint num_monitors;
+ int monitor;
+
+@@ -808,11 +781,7 @@ get_scaled_pixbuf (MateBGPlacement place
+ }
+
+
+-#if GTK_CHECK_VERSION(3, 0, 0)
+- static void draw_image_area(MateBGPlacement placement, GdkPixbuf* pixbuf, GdkPixbuf* dest, cairo_rectangle_int_t* area)
+-#else
+ static void draw_image_area(MateBGPlacement placement, GdkPixbuf* pixbuf, GdkPixbuf* dest, GdkRectangle* area)
+-#endif
+ {
+ int dest_width = area->width;
+ int dest_height = area->height;
+@@ -850,11 +819,7 @@ draw_image (MateBGPlacement placement,
+ GdkPixbuf *pixbuf,
+ GdkPixbuf *dest)
+ {
+- #if GTK_CHECK_VERSION(3, 0, 0)
+- cairo_rectangle_int_t rect;
+- #else
+ GdkRectangle rect;
+- #endif
+
+ rect.x = 0;
+ rect.y = 0;
+@@ -869,11 +834,7 @@ draw_once (MateBG *bg,
+ GdkPixbuf *dest,
+ GdkScreen *screen)
+ {
+- #if GTK_CHECK_VERSION(3, 0, 0)
+- cairo_rectangle_int_t rect;
+- #else
+ GdkRectangle rect;
+- #endif
+
+ GdkPixbuf *pixbuf;
+
+@@ -897,11 +858,7 @@ draw_each_monitor (MateBG *bg,
+ GdkPixbuf *dest,
+ GdkScreen *screen)
+ {
+- #if GTK_CHECK_VERSION(3, 0, 0)
+- cairo_rectangle_int_t rect;
+- #else
+ GdkRectangle rect;
+- #endif
+ gint num_monitors;
+ int monitor;
+
+@@ -1003,19 +960,11 @@ mate_bg_get_pixmap_size (MateBG *bg,
+ *
+ * Since: 2.20
+ **/
+-#if GTK_CHECK_VERSION(3, 0, 0)
+- cairo_surface_t* mate_bg_create_pixmap(MateBG* bg, GdkWindow* window, int width, int height, gboolean is_root)
+-#else
+ GdkPixmap* mate_bg_create_pixmap(MateBG* bg, GdkWindow* window, int width, int height, gboolean is_root)
+-#endif
+ {
+ int pm_width, pm_height;
+
+- #if GTK_CHECK_VERSION(3, 0, 0)
+- cairo_surface_t* pixmap;
+- #else
+ GdkPixmap* pixmap;
+- #endif
+ cairo_t *cr;
+
+ g_return_val_if_fail (bg != NULL, NULL);
+@@ -1035,14 +984,10 @@ mate_bg_get_pixmap_size (MateBG *bg,
+ mate_bg_get_pixmap_size (bg, width, height, &pm_width, &pm_height);
+
+ if (is_root) {
++ pixmap = make_root_pixmap (gdk_drawable_get_screen (window),
++ pm_width, pm_height);
+
+- #if GTK_CHECK_VERSION(2, 24, 0)
+- pixmap = make_root_pixmap(gdk_window_get_screen(window), pm_width, pm_height);
+- #else // since 2.2
+- pixmap = make_root_pixmap(gdk_drawable_get_screen(GDK_DRAWABLE(window)), pm_width, pm_height);
+- #endif
+-
+- }
++ }
+ else {
+ pixmap = gdk_pixmap_new (window, pm_width, pm_height, -1);
+ }
+@@ -1056,12 +1001,7 @@ mate_bg_get_pixmap_size (MateBG *bg,
+
+ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);
+
+- #if GTK_CHECK_VERSION(2, 24, 0)
+- mate_bg_draw(bg, pixbuf, gdk_window_get_screen(window), is_root);
+- #else // since 2.2
+- mate_bg_draw(bg, pixbuf, gdk_drawable_get_screen(GDK_DRAWABLE(window)), is_root);
+- #endif
+-
++ mate_bg_draw (bg, pixbuf, gdk_drawable_get_screen (GDK_DRAWABLE (window)), is_root);
+ gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0);
+ g_object_unref (pixbuf);
+ }
+@@ -1121,21 +1061,13 @@ mate_bg_is_dark (MateBG *bg,
+ * and set the closedown mode on it to RetainPermanent.
+ */
+
+-#if GTK_CHECK_VERSION(3, 0, 0)
+- static cairo_surface_t* make_root_pixmap(GdkScreen* screen, gint width, gint height)
+-#else
+ static GdkPixmap* make_root_pixmap(GdkScreen* screen, gint width, gint height)
+-#endif
+ {
+ Display* display;
+ const char* display_name;
+ Pixmap result;
+
+- #if GTK_CHECK_VERSION(3, 0, 0)
+- cairo_surface_t* gdk_pixmap;
+- #else
+ GdkPixmap* gdk_pixmap;
+- #endif
+
+ int screen_num;
+ int depth;
+@@ -1283,110 +1215,7 @@ mate_bg_create_thumbnail (MateBG
+ return result;
+ }
+
+-/**
+- * mate_bg_get_pixmap_from_root:
+- * @screen: a #GdkScreen
+- *
+- * This function queries the _XROOTPMAP_ID property from
+- * the root window associated with @screen to determine
+- * the current root window background pixmap and returns
+- * a copy of it. If the _XROOTPMAP_ID is not set, then
+- * a black pixmap is returned.
+- *
+- * Return value: a #GdkPixmap if successful or %NULL
+- **/
+-#if GTK_CHECK_VERSION(3, 0, 0)
+- cairo_surface_t* mate_bg_get_pixmap_from_root(GdkScreen* screen)
+-#else
+- GdkPixmap* mate_bg_get_pixmap_from_root(GdkScreen* screen)
+-#endif
+-{
+- int result;
+- gint format;
+- gulong nitems;
+- gulong bytes_after;
+- guchar *data;
+- Atom type;
+- Display *display;
+- int screen_num;
+-
+- #if GTK_CHECK_VERSION(3, 0, 0)
+- cairo_surface_t* pixmap;
+- cairo_surface_t* source_pixmap;
+- #else
+- GdkPixmap* pixmap;
+- GdkPixmap* source_pixmap;
+- #endif
+- int width, height;
+- cairo_t *cr;
+- cairo_pattern_t *pattern;
+-
+- display = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen));
+- screen_num = gdk_screen_get_number (screen);
+-
+- result = XGetWindowProperty (display,
+- RootWindow (display, screen_num),
+- gdk_x11_get_xatom_by_name ("_XROOTPMAP_ID"),
+- 0L, 1L, False, XA_PIXMAP,
+- &type, &format, &nitems, &bytes_after,
+- &data);
+- pixmap = NULL;
+- source_pixmap = NULL;
+-
+- if (result != Success || type != XA_PIXMAP ||
+- format != 32 || nitems != 1) {
+- XFree (data);
+- data = NULL;
+- }
+-
+- if (data != NULL) {
+- gdk_error_trap_push ();
+- source_pixmap = gdk_pixmap_foreign_new (*(Pixmap *) data);
+- gdk_error_trap_pop ();
+-
+- if (source_pixmap != NULL) {
+- gdk_drawable_set_colormap (source_pixmap,
+- gdk_screen_get_default_colormap (screen));
+- }
+- }
+-
+- width = gdk_screen_get_width (screen);
+- height = gdk_screen_get_height (screen);
+-
+- pixmap = gdk_pixmap_new (source_pixmap != NULL? source_pixmap :
+- gdk_screen_get_root_window (screen),
+- width, height, -1);
+-
+- cr = gdk_cairo_create (pixmap);
+- if (source_pixmap != NULL) {
+- gdk_cairo_set_source_pixmap (cr, source_pixmap, 0, 0);
+- pattern = cairo_get_source (cr);
+- cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT);
+- } else {
+- cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
+- }
+- cairo_paint (cr);
+-
+- if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) {
+- g_object_unref (pixmap);
+- pixmap = NULL;
+- }
+- cairo_destroy (cr);
+-
+- if (source_pixmap != NULL)
+- g_object_unref (source_pixmap);
+-
+- if (data != NULL)
+- XFree (data);
+-
+- return pixmap;
+-}
+-
+-#if GTK_CHECK_VERSION(3, 0, 0)
+- static void mate_bg_set_root_pixmap_id(GdkScreen* screen, cairo_surface_t* pixmap)
+-#else
+ static void mate_bg_set_root_pixmap_id(GdkScreen* screen, GdkPixmap* pixmap)
+-#endif
+ {
+ int result;
+ gint format;
+@@ -1447,11 +1276,7 @@ mate_bg_create_thumbnail (MateBG
+ * same conventions we do). @pixmap should come from a call
+ * to mate_bg_create_pixmap().
+ **/
+-#if GTK_CHECK_VERSION(3, 0, 0)
+- void mate_bg_set_pixmap_as_root(GdkScreen* screen, cairo_surface_t* pixmap)
+-#else
+ void mate_bg_set_pixmap_as_root(GdkScreen* screen, GdkPixmap* pixmap)
+-#endif
+ {
+ Display *display;
+ int screen_num;
+@@ -1475,63 +1300,6 @@ mate_bg_create_thumbnail (MateBG
+ gdk_x11_display_ungrab (gdk_screen_get_display (screen));
+ }
+
+-/**
+- * mate_bg_set_pixmap_as_root_with_crossfade:
+- * @screen: the #GdkScreen to change root background on
+- * @pixmap: the #GdkPixmap to set root background from
+- * @context: a #GMainContext or %NULL
+- *
+- * Set the root pixmap, and properties pointing to it.
+- * This function differs from mate_bg_set_pixmap_as_root()
+- * in that it adds a subtle crossfade animation from the
+- * current root pixmap to the new one.
+- * same conventions we do).
+- *
+- * Return value: a #MateBGCrossfade object
+- **/
+-#if GTK_CHECK_VERSION(3, 0, 0)
+- MateBGCrossfade* mate_bg_set_pixmap_as_root_with_crossfade(GdkScreen* screen, cairo_surface_t* pixmap)
+-#else
+- MateBGCrossfade* mate_bg_set_pixmap_as_root_with_crossfade(GdkScreen* screen, GdkPixmap* pixmap)
+-#endif
+-{
+- GdkDisplay *display;
+- GdkWindow *root_window;
+-
+- #if GTK_CHECK_VERSION(3, 0, 0)
+- cairo_surface_t* old_pixmap;
+- #else
+- GdkPixmap* old_pixmap;
+- #endif
+-
+- int width, height;
+- MateBGCrossfade *fade;
+-
+- g_return_val_if_fail (screen != NULL, NULL);
+- g_return_val_if_fail (pixmap != NULL, NULL);
+-
+- root_window = gdk_screen_get_root_window (screen);
+-
+- width = gdk_screen_get_width (screen);
+- height = gdk_screen_get_height (screen);
+-
+- fade = mate_bg_crossfade_new (width, height);
+-
+- display = gdk_screen_get_display (screen);
+- gdk_x11_display_grab (display);
+- old_pixmap = mate_bg_get_pixmap_from_root (screen);
+- mate_bg_set_root_pixmap_id (screen, pixmap);
+- mate_bg_crossfade_set_start_pixmap (fade, old_pixmap);
+- g_object_unref (old_pixmap);
+- mate_bg_crossfade_set_end_pixmap (fade, pixmap);
+- gdk_display_flush (display);
+- gdk_x11_display_ungrab (display);
+-
+- mate_bg_crossfade_start (fade, root_window);
+-
+- return fade;
+-}
+-
+ /* Implementation of the pixbuf cache */
+ struct _SlideShow
+ {
+@@ -2389,11 +2157,7 @@ create_gradient (const GdkColor *primary
+ return result;
+ }
+
+-#if GTK_CHECK_VERSION(3, 0, 0)
+- static void pixbuf_draw_gradient(GdkPixbuf* pixbuf, gboolean horizontal, GdkColor* primary, GdkColor* secondary, cairo_rectangle_int_t* rect)
+-#else
+ static void pixbuf_draw_gradient(GdkPixbuf* pixbuf, gboolean horizontal, GdkColor* primary, GdkColor* secondary, GdkRectangle* rect)
+-#endif
+ {
+ int width;
+ int height;
diff --git a/sources b/sources
index e69de29..5064615 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+96aa6d58ae8ede299c65261bdc365409 mate-desktop-1.4.1.tar.xz
More information about the scm-commits
mailing list