[Xfce4-commits] <xfdesktop:master> Release pixmap on screen changes

Eric Koegel noreply at xfce.org
Mon Feb 17 13:30:01 CET 2014


Updating branch refs/heads/master
         to 9b9bacb445ded5050ea073b9b1c784883a43456b (commit)
       from 11990471655a1ea7277497c8c93b716b1a3a2749 (commit)

commit 9b9bacb445ded5050ea073b9b1c784883a43456b
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Mon Feb 17 15:26:42 2014 +0300

    Release pixmap on screen changes
    
    Since the screen may have changed dimensions (i.e. change from
    lvds to hdmi display) we need to release the previous pixmap to
    reflect those changes.

 src/xfce-desktop.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/xfce-desktop.c b/src/xfce-desktop.c
index 04887cc..aff857e 100644
--- a/src/xfce-desktop.c
+++ b/src/xfce-desktop.c
@@ -534,6 +534,12 @@ screen_size_changed_cb(GdkScreen *gscreen, gpointer user_data)
     if(current_workspace < 0)
         return;
 
+    /* release the bg_pixmap since the dimensions may have changed */
+    if(desktop->priv->bg_pixmap) {
+        g_object_unref(desktop->priv->bg_pixmap);
+        desktop->priv->bg_pixmap = NULL;
+    }
+
     /* special case for 1 backdrop to handle xinerama stretching */
     if(xfce_workspace_get_xinerama_stretch(desktop->priv->workspaces[current_workspace])) {
        backdrop_changed_cb(xfce_workspace_get_backdrop(desktop->priv->workspaces[current_workspace], 0), desktop);


More information about the Xfce4-commits mailing list