summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2007-11-27 18:57:20 +0000
committerIain Holmes <iain@src.gnome.org>2007-11-27 18:57:20 +0000
commit1eb77288db72ba929c4e61a58e647379b8782859 (patch)
tree4fe79a98c72fb5091409ed2d81324facd9f1b455
parent418bea6d568ee6ae2f0b2f5fa5fbe5bc9aeff2b7 (diff)
downloadmetacity-1eb77288db72ba929c4e61a58e647379b8782859.tar.gz
Undo panel drop shadow
redo memory leak patch svn path=/branches/iains-blingtastic-bucket-o-bling/; revision=3444
-rw-r--r--src/compositor.c46
-rw-r--r--src/screen.c5
2 files changed, 9 insertions, 42 deletions
diff --git a/src/compositor.c b/src/compositor.c
index 4f8d4b80..82a916fb 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -47,14 +47,6 @@
#define USE_IDLE_REPAINT 1
-typedef enum _MetaCompWindowType
-{
- META_COMP_WINDOW_NORMAL,
- META_COMP_WINDOW_DND,
- META_COMP_WINDOW_DESKTOP,
- META_COMP_WINDOW_DOCK
-} MetaCompWindowType;
-
typedef enum _WindowDrawMode
{
WINDOW_SOLID,
@@ -129,10 +121,7 @@ typedef struct _MetaCompWindow
gboolean damaged;
gboolean shaped;
- gboolean viewable;
- gboolean skipped;
-
- MetaCompWindowType type;
+ gboolean dnd;
Damage damage;
Picture picture;
@@ -724,7 +713,7 @@ window_has_shadow (MetaCompWindow *cw)
}
/* Don't put shadow around DND icon windows */
- if (cw->type == META_COMP_WINDOW_DND)
+ if (cw->dnd)
return FALSE;
if (cw->mode != WINDOW_ARGB)
@@ -1535,10 +1524,9 @@ get_window_type (MetaDisplay *display,
{
MetaCompositor *compositor = display->compositor;
int n_atoms;
- Atom *atoms, type_atom;
+ Atom *atoms;
int i;
- type_atom = None;
n_atoms = 0;
atoms = NULL;
@@ -1548,31 +1536,11 @@ get_window_type (MetaDisplay *display,
for (i = 0; i < n_atoms; i++)
{
- if (atoms[i] == compositor->atom_net_wm_window_type_dnd ||
- atoms[i] == display->atom_net_wm_window_type_desktop ||
- atoms[i] == display->atom_net_wm_window_type_dock ||
- atoms[i] == display->atom_net_wm_window_type_toolbar ||
- atoms[i] == display->atom_net_wm_window_type_menu ||
- atoms[i] == display->atom_net_wm_window_type_dialog ||
- atoms[i] == display->atom_net_wm_window_type_normal ||
- atoms[i] == display->atom_net_wm_window_type_utility ||
- atoms[i] == display->atom_net_wm_window_type_splash)
- {
- type_atom = atoms[i];
- break;
- }
+ if (atoms[i] == compositor->atom_net_wm_window_type_dnd)
+ cw->dnd = TRUE;
+ else
+ cw->dnd = FALSE;
}
-
- meta_XFree (atoms);
-
- if (type_atom == compositor->atom_net_wm_window_type_dnd)
- cw->type = META_COMP_WINDOW_DND;
- else if (type_atom == display->atom_net_wm_window_type_desktop)
- cw->type = META_COMP_WINDOW_DESKTOP;
- else if (type_atom == display->atom_net_wm_window_type_dock)
- cw->type = META_COMP_WINDOW_DOCK;
- else
- cw->type = META_COMP_WINDOW_NORMAL;
}
/* Must be called with an error trap in place */
diff --git a/src/screen.c b/src/screen.c
index ccd78692..e6d30e76 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -1348,8 +1348,7 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
gdk_pixbuf_fill (entries[i].icon, 0x00000000);
gdk_pixbuf_copy_area (win_pixbuf, 0, 0, width, height,
entries[i].icon, 0, 0);
- gdk_pixbuf_unref (win_pixbuf);
-
+ 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,
@@ -1417,7 +1416,7 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
5, /* FIXME */
TRUE);
- for (i = 0; i < len; i++)
+ for (i = 0; i < len; i++)
g_object_unref (entries[i].icon);
g_free (entries);