diff options
author | ZenWalker <[email protected]> | 2017-07-17 01:23:02 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-08-05 17:12:05 +0200 |
commit | 4cfcd65955e4ee3f22818bf5540196fb38c8bce5 (patch) | |
tree | 7090ced9e25f2c6bfba1785f4abe56fd03340059 /libmate-desktop/mate-bg.c | |
parent | 133c20a27945b1fb370f5a52dc273830aeaa19e8 (diff) | |
download | mate-desktop-4cfcd65955e4ee3f22818bf5540196fb38c8bce5.tar.bz2 mate-desktop-4cfcd65955e4ee3f22818bf5540196fb38c8bce5.tar.xz |
avoid deprecated gdk_screen_get_number
Diffstat (limited to 'libmate-desktop/mate-bg.c')
-rw-r--r-- | libmate-desktop/mate-bg.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c index eb77652..82e66ce 100644 --- a/libmate-desktop/mate-bg.c +++ b/libmate-desktop/mate-bg.c @@ -359,14 +359,14 @@ mate_bg_load_from_gsettings (MateBG *bg, /* Fallback to default BG if the filename set is non-existent */ if (filename != NULL && !g_file_test (filename, G_FILE_TEST_EXISTS)) { - + g_free (filename); - + g_settings_delay (settings); g_settings_reset (settings, MATE_BG_KEY_PICTURE_FILENAME); filename = g_settings_get_string (settings, MATE_BG_KEY_PICTURE_FILENAME); g_settings_revert (settings); - + //* Check if default background exists, also */ if (filename != NULL && !g_file_test (filename, G_FILE_TEST_EXISTS)) { g_free (filename); @@ -1255,7 +1255,7 @@ make_root_pixmap (GdkWindow *window, gint width, gint height) return NULL; } - depth = DefaultDepth (display, gdk_screen_get_number (screen)); + depth = DefaultDepth (display, gdk_x11_screen_get_screen_number (screen)); xpixmap = XCreatePixmap (display, GDK_WINDOW_XID (window), width, height, depth); XFlush (display); @@ -1409,7 +1409,7 @@ mate_bg_get_surface_from_root (GdkScreen *screen) cairo_t *cr; display = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen)); - screen_num = gdk_screen_get_number (screen); + screen_num = gdk_x11_screen_get_screen_number (screen); result = XGetWindowProperty (display, RootWindow (display, screen_num), @@ -1490,7 +1490,7 @@ mate_bg_set_root_pixmap_id (GdkScreen *screen, Display *display, Pixmap xpixmap) { - Window xroot = RootWindow (display, gdk_screen_get_number (screen)); + Window xroot = RootWindow (display, gdk_x11_screen_get_screen_number (screen)); char *atom_names[] = {"_XROOTPMAP_ID", "ESETROOT_PMAP_ID"}; Atom atoms[G_N_ELEMENTS(atom_names)] = {0}; @@ -1581,7 +1581,7 @@ mate_bg_set_surface_as_root (GdkScreen *screen, cairo_surface_t *surface) */ Display *display = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen)); Pixmap pixmap_id = cairo_xlib_surface_get_drawable (surface); - Window xroot = RootWindow (display, gdk_screen_get_number (screen)); + Window xroot = RootWindow (display, gdk_x11_screen_get_screen_number (screen)); XGrabServer (display); mate_bg_set_root_pixmap_id (screen, display, pixmap_id); |