fix multiscreen zoom and current desks zoom

desksanity-1.0
Mike Blumenkrantz 8 years ago
parent 23e24c568f
commit 02d437cd71
  1. 22
      src/zoom.c

@ -487,7 +487,7 @@ zoom(Eina_List *clients, E_Zone *zone)
edje_object_signal_callback_add(zoom_obj, "e,state,hiding", "e", _hiding, NULL);
edje_object_signal_callback_add(zoom_obj, "e,action,dismiss", "e", _dismiss, NULL);
edje_object_signal_callback_add(zoom_obj, "e,action,done", "e", _hid, NULL);
evas_object_resize(zoom_obj, zone->w, zone->h);
evas_object_geometry_set(zoom_obj, zone->x, zone->y, zone->w, zone->h);
evas_object_layer_set(zoom_obj, E_LAYER_POPUP);
e_theme_edje_object_set(zoom_obj, NULL, "e/modules/desksanity/zoom/base");
@ -559,13 +559,6 @@ _zoom_begin(Zoom_Filter_Cb cb, E_Zone *zone)
Evas_Object *m;
E_Client *ec;
if (zoom_objs)
{
_zoom_hide();
return;
}
EINA_LIST_FOREACH(e_client_focus_stack_get(), l, ec)
{
if (e_client_util_ignored_get(ec)) continue;
@ -579,9 +572,17 @@ _zoom_begin(Zoom_Filter_Cb cb, E_Zone *zone)
zoom(clients, zone);
}
#define ZOOM_CHECK \
if (zoom_objs) \
{ \
_zoom_hide(); \
return; \
}
static void
_zoom_desk_cb(E_Object *obj EINA_UNUSED, const char *params EINA_UNUSED)
{
ZOOM_CHECK;
cur_act = act_zoom_desk;
_zoom_begin(_filter_desk, e_zone_current_get(e_comp_get(NULL)));
}
@ -593,6 +594,7 @@ _zoom_desk_all_cb(E_Object *obj EINA_UNUSED, const char *params EINA_UNUSED)
E_Zone *zone;
Eina_List *l;
ZOOM_CHECK;
cur_act = act_zoom_desk_all;
EINA_LIST_FOREACH(comp->zones, l, zone)
_zoom_begin(_filter_desk_all, zone);
@ -601,6 +603,7 @@ _zoom_desk_all_cb(E_Object *obj EINA_UNUSED, const char *params EINA_UNUSED)
static void
_zoom_zone_cb(E_Object *obj EINA_UNUSED, const char *params EINA_UNUSED)
{
ZOOM_CHECK;
cur_act = act_zoom_zone;
_zoom_begin(_filter_zone, e_zone_current_get(e_comp_get(NULL)));
}
@ -612,6 +615,7 @@ _zoom_zone_all_cb(E_Object *obj EINA_UNUSED, const char *params EINA_UNUSED)
E_Zone *zone;
Eina_List *l;
ZOOM_CHECK;
cur_act = act_zoom_zone_all;
EINA_LIST_FOREACH(comp->zones, l, zone)
_zoom_begin(_filter_zone, zone);
@ -630,7 +634,7 @@ zoom_init(void)
act_zoom_desk_all = e_action_add("zoom_desk_all");
if (act_zoom_desk_all)
{
act_zoom_desk->func.go = _zoom_desk_all_cb;
act_zoom_desk_all->func.go = _zoom_desk_all_cb;
e_action_predef_name_set(D_("Compositor"), D_("Toggle zoom current desks"),
"zoom_desk_all", NULL, NULL, 0);
}

Loading…
Cancel
Save