summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-02-03 18:29:43 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-02-03 18:35:33 -0500
commit02d437cd710d8d3957ea701df613f5151487afa4 (patch)
treea6a0876120401b94f243f4b74603d1f3501813c6
parent23e24c568f5c3b2394f1cc34890bedd8328f083c (diff)
fix multiscreen zoom and current desks zoom
-rw-r--r--src/zoom.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/zoom.c b/src/zoom.c
index bb3ba40..003a8da 100644
--- a/src/zoom.c
+++ b/src/zoom.c
@@ -487,7 +487,7 @@ zoom(Eina_List *clients, E_Zone *zone)
487 edje_object_signal_callback_add(zoom_obj, "e,state,hiding", "e", _hiding, NULL); 487 edje_object_signal_callback_add(zoom_obj, "e,state,hiding", "e", _hiding, NULL);
488 edje_object_signal_callback_add(zoom_obj, "e,action,dismiss", "e", _dismiss, NULL); 488 edje_object_signal_callback_add(zoom_obj, "e,action,dismiss", "e", _dismiss, NULL);
489 edje_object_signal_callback_add(zoom_obj, "e,action,done", "e", _hid, NULL); 489 edje_object_signal_callback_add(zoom_obj, "e,action,done", "e", _hid, NULL);
490 evas_object_resize(zoom_obj, zone->w, zone->h); 490 evas_object_geometry_set(zoom_obj, zone->x, zone->y, zone->w, zone->h);
491 evas_object_layer_set(zoom_obj, E_LAYER_POPUP); 491 evas_object_layer_set(zoom_obj, E_LAYER_POPUP);
492 e_theme_edje_object_set(zoom_obj, NULL, "e/modules/desksanity/zoom/base"); 492 e_theme_edje_object_set(zoom_obj, NULL, "e/modules/desksanity/zoom/base");
493 493
@@ -559,13 +559,6 @@ _zoom_begin(Zoom_Filter_Cb cb, E_Zone *zone)
559 Evas_Object *m; 559 Evas_Object *m;
560 E_Client *ec; 560 E_Client *ec;
561 561
562
563 if (zoom_objs)
564 {
565 _zoom_hide();
566 return;
567 }
568
569 EINA_LIST_FOREACH(e_client_focus_stack_get(), l, ec) 562 EINA_LIST_FOREACH(e_client_focus_stack_get(), l, ec)
570 { 563 {
571 if (e_client_util_ignored_get(ec)) continue; 564 if (e_client_util_ignored_get(ec)) continue;
@@ -579,9 +572,17 @@ _zoom_begin(Zoom_Filter_Cb cb, E_Zone *zone)
579 zoom(clients, zone); 572 zoom(clients, zone);
580} 573}
581 574
575#define ZOOM_CHECK \
576 if (zoom_objs) \
577 { \
578 _zoom_hide(); \
579 return; \
580 }
581
582static void 582static void
583_zoom_desk_cb(E_Object *obj EINA_UNUSED, const char *params EINA_UNUSED) 583_zoom_desk_cb(E_Object *obj EINA_UNUSED, const char *params EINA_UNUSED)
584{ 584{
585 ZOOM_CHECK;
585 cur_act = act_zoom_desk; 586 cur_act = act_zoom_desk;
586 _zoom_begin(_filter_desk, e_zone_current_get(e_comp_get(NULL))); 587 _zoom_begin(_filter_desk, e_zone_current_get(e_comp_get(NULL)));
587} 588}
@@ -593,6 +594,7 @@ _zoom_desk_all_cb(E_Object *obj EINA_UNUSED, const char *params EINA_UNUSED)
593 E_Zone *zone; 594 E_Zone *zone;
594 Eina_List *l; 595 Eina_List *l;
595 596
597 ZOOM_CHECK;
596 cur_act = act_zoom_desk_all; 598 cur_act = act_zoom_desk_all;
597 EINA_LIST_FOREACH(comp->zones, l, zone) 599 EINA_LIST_FOREACH(comp->zones, l, zone)
598 _zoom_begin(_filter_desk_all, zone); 600 _zoom_begin(_filter_desk_all, zone);
@@ -601,6 +603,7 @@ _zoom_desk_all_cb(E_Object *obj EINA_UNUSED, const char *params EINA_UNUSED)
601static void 603static void
602_zoom_zone_cb(E_Object *obj EINA_UNUSED, const char *params EINA_UNUSED) 604_zoom_zone_cb(E_Object *obj EINA_UNUSED, const char *params EINA_UNUSED)
603{ 605{
606 ZOOM_CHECK;
604 cur_act = act_zoom_zone; 607 cur_act = act_zoom_zone;
605 _zoom_begin(_filter_zone, e_zone_current_get(e_comp_get(NULL))); 608 _zoom_begin(_filter_zone, e_zone_current_get(e_comp_get(NULL)));
606} 609}
@@ -612,6 +615,7 @@ _zoom_zone_all_cb(E_Object *obj EINA_UNUSED, const char *params EINA_UNUSED)
612 E_Zone *zone; 615 E_Zone *zone;
613 Eina_List *l; 616 Eina_List *l;
614 617
618 ZOOM_CHECK;
615 cur_act = act_zoom_zone_all; 619 cur_act = act_zoom_zone_all;
616 EINA_LIST_FOREACH(comp->zones, l, zone) 620 EINA_LIST_FOREACH(comp->zones, l, zone)
617 _zoom_begin(_filter_zone, zone); 621 _zoom_begin(_filter_zone, zone);
@@ -630,7 +634,7 @@ zoom_init(void)
630 act_zoom_desk_all = e_action_add("zoom_desk_all"); 634 act_zoom_desk_all = e_action_add("zoom_desk_all");
631 if (act_zoom_desk_all) 635 if (act_zoom_desk_all)
632 { 636 {
633 act_zoom_desk->func.go = _zoom_desk_all_cb; 637 act_zoom_desk_all->func.go = _zoom_desk_all_cb;
634 e_action_predef_name_set(D_("Compositor"), D_("Toggle zoom current desks"), 638 e_action_predef_name_set(D_("Compositor"), D_("Toggle zoom current desks"),
635 "zoom_desk_all", NULL, NULL, 0); 639 "zoom_desk_all", NULL, NULL, 0);
636 } 640 }