[mutter] Remove some old compositor-related code that mutter doesn't need
- From: Dan Winship <danw src gnome org>
- To: svn-commits-list gnome org
- Subject: [mutter] Remove some old compositor-related code that mutter doesn't need
- Date: Mon, 4 May 2009 10:26:28 -0400 (EDT)
commit 7e369d63b398c4463d57e7a92074d3dde1d97676
Author: Dan Winship <danw gnome org>
Date: Tue Apr 28 09:47:28 2009 -0400
Remove some old compositor-related code that mutter doesn't need
http://bugzilla.gnome.org/show_bug.cgi?id=580917
---
src/core/screen.c | 72 +----------------------------------------------------
1 files changed, 1 insertions(+), 71 deletions(-)
diff --git a/src/core/screen.c b/src/core/screen.c
index d400775..e0a3374 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -1422,49 +1422,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,
@@ -1504,34 +1461,7 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]