summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2015-02-19 02:29:48 +0200
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2015-02-19 02:29:48 +0200
commitc33ce914769ffb079f5811b14a99c70d8bfac5e3 (patch)
tree71380b114b46e8886c740a30c3ccc85349343361
parentcdc5bf4621ec4ef5931a4c1e8522e6ad62da6a45 (diff)
downloadmetacity-c33ce914769ffb079f5811b14a99c70d8bfac5e3.tar.gz
screen: use old icon size with alt-tab thumbnail
-rw-r--r--src/core/screen.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/core/screen.c b/src/core/screen.c
index a3db88c7..b371fcff 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -1302,11 +1302,18 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
entries[i].icon = g_object_ref (window->icon);
else
{
+ GdkPixbuf *scaled;
int icon_width, icon_height, t_width, t_height;
+
+#define ICON_SIZE 32
#define ICON_OFFSET 6
- icon_width = gdk_pixbuf_get_width (window->icon);
- icon_height = gdk_pixbuf_get_height (window->icon);
+ scaled = gdk_pixbuf_scale_simple (window->icon,
+ ICON_SIZE, ICON_SIZE,
+ GDK_INTERP_BILINEAR);
+
+ icon_width = gdk_pixbuf_get_width (scaled);
+ icon_height = gdk_pixbuf_get_height (scaled);
t_width = width + ICON_OFFSET;
t_height = height + ICON_OFFSET;
@@ -1317,11 +1324,13 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
gdk_pixbuf_copy_area (win_pixbuf, 0, 0, width, height,
entries[i].icon, 0, 0);
g_object_unref (win_pixbuf);
- gdk_pixbuf_composite (window->icon, entries[i].icon,
+ gdk_pixbuf_composite (scaled, entries[i].icon,
t_width - icon_width, t_height - icon_height,
icon_width, icon_height,
t_width - icon_width, t_height - icon_height,
1.0, 1.0, GDK_INTERP_BILINEAR, 255);
+
+ g_object_unref (scaled);
}
entries[i].blank = FALSE;