[gnome-applets/wip/segeiger/windowpicker: 6/15] windowpicker: rename tmp to unscaled_pixbuf



commit 361f6cf4a8fe86064bde4110905786459a9f2f7e
Author: Sebastian Geiger <sbastig gmx net>
Date:   Sat Oct 12 15:14:48 2019 +0200

    windowpicker: rename tmp to unscaled_pixbuf

 windowpicker/src/task-item.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/windowpicker/src/task-item.c b/windowpicker/src/task-item.c
index f65b3efe7..45ad088a3 100644
--- a/windowpicker/src/task-item.c
+++ b/windowpicker/src/task-item.c
@@ -208,6 +208,7 @@ task_item_sized_pixbuf_for_window (TaskItem   *item,
                                    gint size)
 {
     GdkPixbuf *pixbuf;
+    GdkPixbuf *unscaled_pixbuf;
     gint width, height;
 
     pixbuf = NULL;
@@ -236,9 +237,9 @@ task_item_sized_pixbuf_for_window (TaskItem   *item,
 
     if (MAX (width, height) != size) {
         gdouble scale = (gdouble) size / (gdouble) MAX (width, height);
-        GdkPixbuf *tmp = pixbuf;
-        pixbuf = gdk_pixbuf_scale_simple (tmp, (gint) (width * scale), (gint) (height * scale), 
GDK_INTERP_HYPER);
-        g_object_unref (tmp);
+        unscaled_pixbuf = pixbuf;
+        pixbuf = gdk_pixbuf_scale_simple (unscaled_pixbuf, (gint) (width * scale), (gint) (height * scale), 
GDK_INTERP_HYPER);
+        g_object_unref (unscaled_pixbuf);
     }
 
     return pixbuf;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]