forked from pool/gnome-desktop
37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
libgnome-desktop/gnome-bg.c | 10 +++++++---
|
|
1 files changed, 7 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/libgnome-desktop/gnome-bg.c b/libgnome-desktop/gnome-bg.c
|
|
index d9d6709..c1932da 100644
|
|
--- a/libgnome-desktop/gnome-bg.c
|
|
+++ b/libgnome-desktop/gnome-bg.c
|
|
@@ -880,6 +880,7 @@ make_root_pixmap (GdkScreen *screen, gint width, gint height)
|
|
Pixmap result;
|
|
GdkPixmap *gdk_pixmap;
|
|
int screen_num;
|
|
+ int depth;
|
|
|
|
screen_num = gdk_screen_get_number (screen);
|
|
|
|
@@ -902,14 +903,17 @@ make_root_pixmap (GdkScreen *screen, gint width, gint height)
|
|
|
|
XSetCloseDownMode (display, RetainPermanent);
|
|
|
|
+ depth = DefaultDepth (display, screen_num);
|
|
+
|
|
result = XCreatePixmap (display,
|
|
RootWindow (display, screen_num),
|
|
- width, height,
|
|
- DefaultDepth (display, screen_num));
|
|
+ width, height, depth);
|
|
|
|
XCloseDisplay (display);
|
|
|
|
- gdk_pixmap = gdk_pixmap_foreign_new (result);
|
|
+ gdk_pixmap = gdk_pixmap_foreign_new_for_screen (screen, result,
|
|
+ width, height, depth);
|
|
+
|
|
gdk_drawable_set_colormap (
|
|
GDK_DRAWABLE (gdk_pixmap),
|
|
gdk_drawable_get_colormap (gdk_screen_get_root_window (screen)));
|