r36494 - in /desktop/unstable/metacity/debian: changelog patches/10_leak.patch patches/11_remove_thumbnails.patch patches/12_icons_96px.patch patches/series
joss at users.alioth.debian.org
joss at users.alioth.debian.org
Wed Dec 19 23:21:46 UTC 2012
Author: joss
Date: Wed Dec 19 23:21:45 2012
New Revision: 36494
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=36494
Log:
* Cherry-pick some upstream patches.
+ 10_leak.patch: small memory leak.
+ 11_remove_thumbnails.patch: remove the code to make thumbnails of
active windows. It is too slow. Closes: #696323.
+ 12_icons_96px.patch: use 96x96 icons by default.
Added:
desktop/unstable/metacity/debian/patches/10_leak.patch
desktop/unstable/metacity/debian/patches/11_remove_thumbnails.patch
desktop/unstable/metacity/debian/patches/12_icons_96px.patch
Modified:
desktop/unstable/metacity/debian/changelog
desktop/unstable/metacity/debian/patches/series
Modified: desktop/unstable/metacity/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/metacity/debian/changelog?rev=36494&op=diff
==============================================================================
--- desktop/unstable/metacity/debian/changelog [utf-8] (original)
+++ desktop/unstable/metacity/debian/changelog [utf-8] Wed Dec 19 23:21:45 2012
@@ -1,3 +1,13 @@
+metacity (1:2.34.3-4) unstable; urgency=low
+
+ * Cherry-pick some upstream patches.
+ + 10_leak.patch: small memory leak.
+ + 11_remove_thumbnails.patch: remove the code to make thumbnails of
+ active windows. It is too slow. Closes: #696323.
+ + 12_icons_96px.patch: use 96x96 icons by default.
+
+ -- Josselin Mouette <joss at debian.org> Thu, 20 Dec 2012 00:21:46 +0100
+
metacity (1:2.34.3-3) unstable; urgency=low
[ Josselin Mouette ]
Added: desktop/unstable/metacity/debian/patches/10_leak.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/metacity/debian/patches/10_leak.patch?rev=36494&op=file
==============================================================================
--- desktop/unstable/metacity/debian/patches/10_leak.patch (added)
+++ desktop/unstable/metacity/debian/patches/10_leak.patch [utf-8] Wed Dec 19 23:21:45 2012
@@ -1,0 +1,38 @@
+From d2b82ba621df8693e560bf0e10c6c56d155cb107 Mon Sep 17 00:00:00 2001
+From: Pavel Vasin <rat4vier at gmail.com>
+Date: Fri, 23 Mar 2012 08:45:50 +0000
+Subject: meta_display_get_tab_list(): Fix leaked GSList
+
+https://bugzilla.gnome.org/show_bug.cgi?id=672640
+---
+diff --git a/src/core/display.c b/src/core/display.c
+index caae7ff..b70112d 100644
+--- a/src/core/display.c
++++ b/src/core/display.c
+@@ -4385,12 +4385,13 @@ meta_display_get_tab_list (MetaDisplay *display,
+ tab_list = g_list_reverse (tab_list);
+
+ {
+- GSList *tmp;
++ GSList *windows, *tmp;
+ MetaWindow *l_window;
+
+- tmp = meta_display_list_windows (display);
++ windows = meta_display_list_windows (display);
+
+ /* Go through all windows */
++ tmp = windows;
+ while (tmp != NULL)
+ {
+ l_window=tmp->data;
+@@ -4406,6 +4407,8 @@ meta_display_get_tab_list (MetaDisplay *display,
+
+ tmp = tmp->next;
+ } /* End while tmp!=NULL */
++
++ g_slist_free (windows);
+ }
+
+ return tab_list;
+--
+cgit v0.9.0.2
Added: desktop/unstable/metacity/debian/patches/11_remove_thumbnails.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/metacity/debian/patches/11_remove_thumbnails.patch?rev=36494&op=file
==============================================================================
--- desktop/unstable/metacity/debian/patches/11_remove_thumbnails.patch (added)
+++ desktop/unstable/metacity/debian/patches/11_remove_thumbnails.patch [utf-8] Wed Dec 19 23:21:45 2012
@@ -1,0 +1,126 @@
+From 04ad17378e0f366dd503cf0881e3a3f9ae603699 Mon Sep 17 00:00:00 2001
+From: Stéphane Démurget <stephane.demurget at free.fr>
+Date: Tue, 18 Dec 2012 12:44:53 +0000
+Subject: screen: Remove alt-tab thumbnails
+
+gdk_pixbuf_scale_simple generates very nice thumbnails at the expense of
+a very slow rendering. So slow that the alt-tab popup is not usable: it
+needs 3.6 seconds to downscale 30 windows of dimension 1600x900 on an
+fairly recent computer.
+
+We remove the thumbnailing to makes alt-tab blazing fast again in the
+composited mode.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=504729
+---
+diff --git a/src/core/screen.c b/src/core/screen.c
+index 34dcdc3..52e020a 100644
+--- a/src/core/screen.c
++++ b/src/core/screen.c
+@@ -1197,49 +1197,6 @@ meta_screen_update_cursor (MetaScreen *screen)
+ XFreeCursor (screen->display->xdisplay, xcursor);
+ }
+
+-#define MAX_PREVIEW_SIZE 150.0
+-
+-static GdkPixbuf *
+-get_window_pixbuf (MetaWindow *window,
+- int *width,
+- int *height)
+-{
+- Pixmap pmap;
+- GdkPixbuf *pixbuf, *scaled;
+- double ratio;
+-
+- pmap = meta_compositor_get_window_pixmap (window->display->compositor,
+- window);
+- if (pmap == None)
+- return NULL;
+-
+- pixbuf = meta_ui_get_pixbuf_from_pixmap (pmap);
+- if (pixbuf == NULL)
+- return NULL;
+-
+- *width = gdk_pixbuf_get_width (pixbuf);
+- *height = gdk_pixbuf_get_height (pixbuf);
+-
+- /* Scale pixbuf to max dimension MAX_PREVIEW_SIZE */
+- if (*width > *height)
+- {
+- ratio = ((double) *width) / MAX_PREVIEW_SIZE;
+- *width = (int) MAX_PREVIEW_SIZE;
+- *height = (int) (((double) *height) / ratio);
+- }
+- else
+- {
+- ratio = ((double) *height) / MAX_PREVIEW_SIZE;
+- *height = (int) MAX_PREVIEW_SIZE;
+- *width = (int) (((double) *width) / ratio);
+- }
+-
+- scaled = gdk_pixbuf_scale_simple (pixbuf, *width, *height,
+- GDK_INTERP_BILINEAR);
+- g_object_unref (pixbuf);
+- return scaled;
+-}
+-
+ void
+ meta_screen_ensure_tab_popup (MetaScreen *screen,
+ MetaTabList list_type,
+@@ -1272,41 +1229,23 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
+ {
+ MetaWindow *window;
+ MetaRectangle r;
+- GdkPixbuf *win_pixbuf;
+- int width, height;
+
+ window = tmp->data;
+-
++
++ /* Metacity used to generated a thumbnail of the window contents
++ * using gdk_pixbuf_simple_scale which is so slow with bilinear
++ * interpolation that it has been removed.
++ *
++ * The cairo downscale could have been an alternative, but the
++ * result is terrible ATM, so it is simply better to have the
++ * same user story as the non-composited case (no thumbnail).
++ *
++ * https://bugzilla.gnome.org/show_bug.cgi?id=504729
++ */
++
+ entries[i].key = (MetaTabEntryKey) window->xwindow;
+ entries[i].title = window->title;
+-
+- win_pixbuf = get_window_pixbuf (window, &width, &height);
+- if (win_pixbuf == NULL)
+- entries[i].icon = g_object_ref (window->icon);
+- else
+- {
+- int icon_width, icon_height, t_width, t_height;
+-#define ICON_OFFSET 6
+-
+- icon_width = gdk_pixbuf_get_width (window->icon);
+- icon_height = gdk_pixbuf_get_height (window->icon);
+-
+- t_width = width + ICON_OFFSET;
+- t_height = height + ICON_OFFSET;
+-
+- entries[i].icon = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8,
+- t_width, t_height);
+- gdk_pixbuf_fill (entries[i].icon, 0x00000000);
+- 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,
+- 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);
+- }
+-
++ entries[i].icon = g_object_ref (window->icon);
+ entries[i].blank = FALSE;
+ entries[i].hidden = !meta_window_showing_on_its_workspace (window);
+ entries[i].demands_attention = window->wm_state_demands_attention;
+--
+cgit v0.9.0.2
Added: desktop/unstable/metacity/debian/patches/12_icons_96px.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/metacity/debian/patches/12_icons_96px.patch?rev=36494&op=file
==============================================================================
--- desktop/unstable/metacity/debian/patches/12_icons_96px.patch (added)
+++ desktop/unstable/metacity/debian/patches/12_icons_96px.patch [utf-8] Wed Dec 19 23:21:45 2012
@@ -1,0 +1,65 @@
+From 861d49c2a11c1a7f0fa49d0fcdbc8dfd22342e0a Mon Sep 17 00:00:00 2001
+From: Jasper St. Pierre <jstpierre at mecheye.net>
+Date: Tue, 18 Dec 2012 13:02:29 +0000
+Subject: screen: Increase typical alt-tab icon size to 96
+
+Now we removed thumbnailing in the alt-tab switcher, the switcher is
+more difficult to use with its small icons.
+
+We switch to mutter-like higher resolution icons to be able to distinct
+them better (the new size is about the same order as the thumbnails),
+as more and more applications are providing high-res icons.
+
+This patch is ported from mutter, cf
+https://bugzilla.gnome.org/show_bug.cgi?id=689651
+
+https://bugzilla.gnome.org/show_bug.cgi?id=504729
+---
+diff --git a/src/core/screen.c b/src/core/screen.c
+index 52e020a..85d2165 100644
+--- a/src/core/screen.c
++++ b/src/core/screen.c
+@@ -119,14 +119,21 @@ set_wm_icon_size_hint (MetaScreen *screen)
+ #define N_VALS 6
+ gulong vals[N_VALS];
+
++ /* We've bumped the real icon size up to 96x96, but
++ * we really should not add these sorts of constraints
++ * on clients still using the legacy WM_HINTS interface.
++ */
++#define LEGACY_ICON_SIZE 32
++
+ /* min width, min height, max w, max h, width inc, height inc */
+- vals[0] = META_ICON_WIDTH;
+- vals[1] = META_ICON_HEIGHT;
+- vals[2] = META_ICON_WIDTH;
+- vals[3] = META_ICON_HEIGHT;
++ vals[0] = LEGACY_ICON_SIZE;
++ vals[1] = LEGACY_ICON_SIZE;
++ vals[2] = LEGACY_ICON_SIZE;
++ vals[3] = LEGACY_ICON_SIZE;
+ vals[4] = 0;
+ vals[5] = 0;
+-
++#undef LEGACY_ICON_SIZE
++
+ XChangeProperty (screen->display->xdisplay, screen->xroot,
+ screen->display->atom_WM_ICON_SIZE,
+ XA_CARDINAL,
+diff --git a/src/include/common.h b/src/include/common.h
+index 4ce800b..651fa07 100644
+--- a/src/include/common.h
++++ b/src/include/common.h
+@@ -258,8 +258,8 @@ struct _MetaButtonLayout
+ };
+
+ /* should investigate changing these to whatever most apps use */
+-#define META_ICON_WIDTH 32
+-#define META_ICON_HEIGHT 32
++#define META_ICON_WIDTH 96
++#define META_ICON_HEIGHT 96
+ #define META_MINI_ICON_WIDTH 16
+ #define META_MINI_ICON_HEIGHT 16
+
+--
+cgit v0.9.0.2
Modified: desktop/unstable/metacity/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/metacity/debian/patches/series?rev=36494&op=diff
==============================================================================
--- desktop/unstable/metacity/debian/patches/series [utf-8] (original)
+++ desktop/unstable/metacity/debian/patches/series [utf-8] Wed Dec 19 23:21:45 2012
@@ -1,2 +1,5 @@
01_focus_new_window.patch
03_gtop_error.patch
+10_leak.patch
+11_remove_thumbnails.patch
+12_icons_96px.patch
More information about the pkg-gnome-commits
mailing list