aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Frydrych <tf@linux.intel.com>2008-03-02 20:46:26 +0000
committerTomas Frydrych <tf@linux.intel.com>2008-03-02 20:46:26 +0000
commit9e9b65b7c950f131f17cc297dd292022334e5574 (patch)
tree554eea6b0ef63fe94faf1631c81fcd52917c9b4f
parent68034aab4dc085164a280dd41fb22a9932a29916 (diff)
downloadlibmatchboxwm2-9e9b65b7c950f131f17cc297dd292022334e5574.tar.gz
libmatchboxwm2-9e9b65b7c950f131f17cc297dd292022334e5574.tar.bz2
libmatchboxwm2-9e9b65b7c950f131f17cc297dd292022334e5574.zip
2008-03-02 Tomas Frydrych <tf@o-hand.com>
* matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c: (mb_wm_comp_mgr_clutter_map_notify_real): Only create shadows for select group of client types. * matchbox/theme-engines/mb-wm-theme-simple.h: Fixed broken include.
-rw-r--r--ChangeLog9
-rw-r--r--matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c102
-rw-r--r--matchbox/theme-engines/mb-wm-theme-simple.h2
3 files changed, 68 insertions, 45 deletions
diff --git a/ChangeLog b/ChangeLog
index 92bb0b9..d79ec15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-03-02 Tomas Frydrych <tf@o-hand.com>
+
+ * matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c:
+ (mb_wm_comp_mgr_clutter_map_notify_real):
+ Only create shadows for select group of client types.
+
+ * matchbox/theme-engines/mb-wm-theme-simple.h:
+ Fixed broken include.
+
2008-02-29 Tomas Frydrych <tf@o-hand.com>
* matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c:
diff --git a/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c b/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
index 8044d10..399713c 100644
--- a/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
+++ b/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
@@ -1061,6 +1061,7 @@ mb_wm_comp_mgr_clutter_map_notify_real (MBWMCompMgr *mgr,
unsigned int shadow_clr[4];
ClutterColor shadow_cclr;
MBWMCompMgrShadowType shadow_type;
+ MBWMClientType ctype = MB_WM_CLIENT_CLIENT_TYPE (c);
/*
* We get called for windows as well as their children, so once we are
@@ -1083,63 +1084,76 @@ mb_wm_comp_mgr_clutter_map_notify_real (MBWMCompMgr *mgr,
texture = clutter_x11_texture_pixmap_new ();
clutter_actor_show (texture);
- shadow_type = mb_wm_theme_get_shadow_type (wm->theme);
-
- if (shadow_type == MBWM_COMP_MGR_SHADOW_NONE)
- {
- clutter_container_add (CLUTTER_CONTAINER (actor), texture, NULL);
- }
- else
+ if (ctype == MBWMClientTypeDialog ||
+ ctype == MBWMClientTypeMenu ||
+ ctype == MBWMClientTypeNote ||
+ ctype == MBWMClientTypeOverride)
{
- if (shadow_type == MBWM_COMP_MGR_SHADOW_SIMPLE)
+ shadow_type = mb_wm_theme_get_shadow_type (wm->theme);
+
+ if (shadow_type == MBWM_COMP_MGR_SHADOW_NONE)
{
- mb_wm_theme_get_shadow_color (wm->theme,
- &shadow_clr[0],
- &shadow_clr[1],
- &shadow_clr[2],
- &shadow_clr[3]);
-
- shadow_cclr.red = 0xff * shadow_clr[0] / 0xffff;
- shadow_cclr.green = 0xff * shadow_clr[1] / 0xffff;
- shadow_cclr.blue = 0xff * shadow_clr[2] / 0xffff;
- shadow_cclr.alpha = 0xff * shadow_clr[3] / 0xffff;
-
- rect = clutter_rectangle_new_with_color (&shadow_cclr);
- clutter_actor_set_position (rect, 4, 4);
+ clutter_container_add (CLUTTER_CONTAINER (actor), texture, NULL);
}
else
{
- ClutterActor * txt = cmgr->priv->shadow;
- if (!txt)
+ if (shadow_type == MBWM_COMP_MGR_SHADOW_SIMPLE)
+ {
+ mb_wm_theme_get_shadow_color (wm->theme,
+ &shadow_clr[0],
+ &shadow_clr[1],
+ &shadow_clr[2],
+ &shadow_clr[3]);
+
+ shadow_cclr.red = 0xff * shadow_clr[0] / 0xffff;
+ shadow_cclr.green = 0xff * shadow_clr[1] / 0xffff;
+ shadow_cclr.blue = 0xff * shadow_clr[2] / 0xffff;
+ shadow_cclr.alpha = 0xff * shadow_clr[3] / 0xffff;
+
+ rect = clutter_rectangle_new_with_color (&shadow_cclr);
+ clutter_actor_set_position (rect, 4, 4);
+ }
+ else
{
- unsigned char * data;
+ ClutterActor * txt = cmgr->priv->shadow;
+ if (!txt)
+ {
+ unsigned char * data;
- data = mb_wm_comp_mgr_clutter_shadow_gaussian_make_tile ();
+ data = mb_wm_comp_mgr_clutter_shadow_gaussian_make_tile ();
- txt = g_object_new (CLUTTER_TYPE_TEXTURE, "tiled", FALSE, NULL);
+ txt = g_object_new (CLUTTER_TYPE_TEXTURE, "tiled",
+ FALSE, NULL);
- clutter_texture_set_from_rgb_data (CLUTTER_TEXTURE (txt),
- data,
- TRUE,
- WIDTH,
- HEIGHT,
- WIDTH*4,
- 4,
- 0,
- NULL);
- free (data);
+ clutter_texture_set_from_rgb_data (CLUTTER_TEXTURE (txt),
+ data,
+ TRUE,
+ WIDTH,
+ HEIGHT,
+ WIDTH*4,
+ 4,
+ 0,
+ NULL);
+ free (data);
- cmgr->priv->shadow = txt;
- }
+ cmgr->priv->shadow = txt;
+ }
- rect = clutter_clone_texture_new (CLUTTER_TEXTURE (txt));
+ rect = clutter_clone_texture_new (CLUTTER_TEXTURE (txt));
- clutter_actor_set_position (rect, 2*SHADOW_RADIUS, 2*SHADOW_RADIUS);
- }
+ clutter_actor_set_position (rect,
+ 2*SHADOW_RADIUS, 2*SHADOW_RADIUS);
+ }
- clutter_actor_set_size (rect, geom.width, geom.height);
- clutter_actor_show (rect);
- clutter_container_add (CLUTTER_CONTAINER (actor), rect, texture, NULL);
+ clutter_actor_set_size (rect, geom.width, geom.height);
+ clutter_actor_show (rect);
+ clutter_container_add (CLUTTER_CONTAINER (actor),
+ rect, texture, NULL);
+ }
+ }
+ else
+ {
+ clutter_container_add (CLUTTER_CONTAINER (actor), texture, NULL);
}
diff --git a/matchbox/theme-engines/mb-wm-theme-simple.h b/matchbox/theme-engines/mb-wm-theme-simple.h
index bcd2af2..973d18e 100644
--- a/matchbox/theme-engines/mb-wm-theme-simple.h
+++ b/matchbox/theme-engines/mb-wm-theme-simple.h
@@ -22,7 +22,7 @@
#define _HAVE_MB_WM_THEME_SIMPLE_H
#include <matchbox/mb-wm-config.h>
-#include <matchbox/mb-wm-theme.h>
+#include <matchbox/theme-engines/mb-wm-theme.h>
struct MBWMThemeSimpleClass
{