summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2007-12-18 23:10:25 +0000
committerIain Holmes <iain@src.gnome.org>2007-12-18 23:10:25 +0000
commit153e57cd0f113e273eee81c5a402ae2ae4eef5c4 (patch)
treed26c21430bdf0c1f32fda34f51412acdd04dbd1e
parent60b71b923b81d86e4f3eaf9da2fcbfe19df4abf3 (diff)
downloadmetacity-153e57cd0f113e273eee81c5a402ae2ae4eef5c4.tar.gz
Reverse the logic for NO_SHADOWS
Listen for window type changes so we can stop shadows on the first drag icon svn path=/branches/iains-blingtastic-bucket-o-bling/; revision=3481
-rw-r--r--src/compositor.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/compositor.c b/src/compositor.c
index 16b738bb..3608d2a2 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -752,7 +752,7 @@ window_has_shadow (MetaCompWindow *cw)
if (cw->window)
{
if (cw->window->frame) {
-/* g_print ("Window has shadow because it has a frame\n"); */
+ g_print ("Window has shadow because it has a frame\n");
return TRUE;
}
}
@@ -760,16 +760,16 @@ window_has_shadow (MetaCompWindow *cw)
/* Don't put shadow around DND icon windows */
if (cw->type == META_COMP_WINDOW_DND ||
cw->type == META_COMP_WINDOW_DESKTOP) {
-/* g_print ("Window has no shadow as it is DND or Desktop\n"); */
+ g_print ("Window has no shadow as it is DND or Desktop\n");
return FALSE;
}
if (cw->mode != WINDOW_ARGB) {
-/* g_print ("Window has shadow as it is not ARGB\n"); */
+ g_print ("Window has shadow as it is not ARGB\n");
return TRUE;
}
-/* g_print ("Window has no shadow as it fell through\n"); */
+ g_print ("Window has no shadow as it fell through\n");
return FALSE;
}
@@ -1996,10 +1996,8 @@ process_property_notify (MetaCompositor *compositor,
MetaCompWindow *cw = find_window_in_display (display, event->window);
gulong value;
- if (!cw) {
- g_print ("No window\n");
+ if (!cw)
return;
- }
if (meta_prop_get_cardinal (display, event->window,
compositor->atom_net_wm_window_opacity,
@@ -2024,7 +2022,20 @@ process_property_notify (MetaCompositor *compositor,
#ifdef USE_IDLE_REPAINT
add_repair (display);
#endif
+
+ return;
}
+
+ if (event->atom == display->atom_net_wm_window_type) {
+ MetaCompWindow *cw = find_window_in_display (display, event->window);
+
+ if (!cw)
+ return;
+
+ get_window_type (display, cw);
+ cw->needs_shadow = window_has_shadow (cw);
+ return;
+ }
}
static void
@@ -2312,7 +2323,7 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
info->overlays = 0;
info->clip_changed = TRUE;
- info->have_shadows = (g_getenv("META_DEBUG_NO_SHADOW") != NULL);
+ info->have_shadows = (g_getenv("META_DEBUG_NO_SHADOW") == NULL);
info->gaussian_map = make_gaussian_map (SHADOW_RADIUS);
presum_gaussian (info);