summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiscomfitor <michael.blumenkrantz@gmail.com>2013-10-20 17:30:17 +0100
committerdiscomfitor <michael.blumenkrantz@gmail.com>2013-10-20 17:30:35 +0100
commite312dba313f3dc7c96fc8bd5ddeb926a5ab56d1c (patch)
tree27d8c21029bc886438b634368d0b8a18cfae281f
parent06504b04d65dc01d8249a578468cadb2403aff3c (diff)
make BLINK more blink-like
-rw-r--r--src/desksanity.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/src/desksanity.c b/src/desksanity.c
index 0bebfb5..0e03dbb 100644
--- a/src/desksanity.c
+++ b/src/desksanity.c
@@ -67,6 +67,17 @@ dm_add(E_Desk *desk)
67} 67}
68 68
69static void 69static void
70_ds_blink2(void *data EINA_UNUSED, Efx_Map_Data *emd EINA_UNUSED, Evas_Object *obj)
71{
72 E_FREE_FUNC(dm_hide, evas_object_del);
73 evas_object_show(dm_show);
74 efx_resize(obj, EFX_EFFECT_SPEED_DECELERATE,
75 EFX_POINT(desk_show->zone->x, desk_show->zone->y),
76 desk_show->zone->w, desk_show->zone->h,
77 0.45, _ds_end, NULL);
78}
79
80static void
70_ds_show(E_Desk *desk, int dx, int dy) 81_ds_show(E_Desk *desk, int dx, int dy)
71{ 82{
72 E_Client *ec; 83 E_Client *ec;
@@ -334,18 +345,29 @@ _ds_show(E_Desk *desk, int dx, int dy)
334 break; 345 break;
335 case DS_BLINK: 346 case DS_BLINK:
336 { 347 {
337 Evas_Object *clip; 348 Evas_Object *clip, *bg;
349
350 dm_show = dm_add(desk);
351 evas_object_geometry_set(dm_show, desk->zone->x, desk->zone->y, desk->zone->w, desk->zone->h);
352 evas_object_hide(dm_show);
338 353
354 bg = evas_object_rectangle_add(e_comp_get(desk)->evas);
355 e_comp_object_util_del_list_append(dm_show, bg);
356 evas_object_color_set(bg, 0, 0, 0, 255);
357 evas_object_layer_set(bg, E_LAYER_MENU + 99);
358 evas_object_geometry_set(bg, desk->zone->x, desk->zone->y, desk->zone->w, desk->zone->h);
359 evas_object_show(bg);
339 clip = evas_object_rectangle_add(e_comp_get(desk)->evas); 360 clip = evas_object_rectangle_add(e_comp_get(desk)->evas);
361 e_comp_object_util_del_list_append(dm_show, clip);
340 /* fit clipper to zone */ 362 /* fit clipper to zone */
341 evas_object_geometry_set(clip, desk->zone->x, desk->zone->y, desk->zone->w, desk->zone->h); 363 evas_object_geometry_set(clip, desk->zone->x, desk->zone->y, desk->zone->w, desk->zone->h);
342 evas_object_clip_set(dm_hide, clip); 364 evas_object_clip_set(dm_hide, clip);
343 e_comp_object_util_del_list_append(dm_hide, clip); 365 evas_object_clip_set(dm_show, clip);
344 evas_object_show(clip); 366 evas_object_show(clip);
345 /* resize clip to 1px high while moving towards center */ 367 /* resize clip to 1px high while moving towards center */
346 efx_resize(clip, EFX_EFFECT_SPEED_DECELERATE, 368 efx_resize(clip, EFX_EFFECT_SPEED_ACCELERATE,
347 EFX_POINT(desk->zone->x, desk->zone->y + (desk->zone->h / 2)), 369 EFX_POINT(desk->zone->x, desk->zone->y + (desk->zone->h / 2)),
348 desk->zone->w, 1, 0.45, _ds_end, NULL); 370 desk->zone->w, 1, 0.45, _ds_blink2, NULL);
349 } 371 }
350 break; 372 break;
351 case DS_VIEWPORT: 373 case DS_VIEWPORT: