diff --git a/src/modules/winlist/e_winlist.c b/src/modules/winlist/e_winlist.c index 2660bdb7f..7e38ca06d 100644 --- a/src/modules/winlist/e_winlist.c +++ b/src/modules/winlist/e_winlist.c @@ -37,33 +37,33 @@ static void _e_winlist_cb_item_mouse_in(void *data, Evas *evas, #endif /* local subsystem globals */ -static E_Popup *winlist = NULL; -static Evas_Object *bg_object = NULL; -static Evas_Object *list_object = NULL; -static Evas_Object *icon_object = NULL; -static Eina_List *wins = NULL; -static Eina_List *win_selected = NULL; -static E_Desk *last_desk = NULL; -static int last_pointer_x = 0; -static int last_pointer_y = 0; -static E_Border *last_border = NULL; -static int hold_count = 0; -static int hold_mod = 0; -static Eina_List *handlers = NULL; -static Ecore_X_Window input_window = 0; -static int warp_to = 0; -static int warp_to_x = 0; -static int warp_to_y = 0; -static int warp_x = 0; -static int warp_y = 0; -static int scroll_to = 0; -static double scroll_align_to = 0.0; -static double scroll_align = 0.0; -static Ecore_Timer *warp_timer = NULL; -static Ecore_Timer *scroll_timer = NULL; -static Ecore_Animator *animator = NULL; -static const Ecore_X_Window *win = NULL; -static E_Border *bd_next = NULL; +static E_Popup *_winlist = NULL; +static Evas_Object *_bg_object = NULL; +static Evas_Object *_list_object = NULL; +static Evas_Object *_icon_object = NULL; +static Eina_List *_wins = NULL; +static Eina_List *_win_selected = NULL; +static E_Desk *_last_desk = NULL; +static int _last_pointer_x = 0; +static int _last_pointer_y = 0; +static E_Border *_last_border = NULL; +static int _hold_count = 0; +static int _hold_mod = 0; +static Eina_List *_handlers = NULL; +static Ecore_X_Window _input_window = 0; +static int _warp_to = 0; +static int _warp_to_x = 0; +static int _warp_to_y = 0; +static int _warp_x = 0; +static int _warp_y = 0; +static int _scroll_to = 0; +static double _scroll_align_to = 0.0; +static double _scroll_align = 0.0; +static Ecore_Timer *_warp_timer = NULL; +static Ecore_Timer *_scroll_timer = NULL; +static Ecore_Animator *_animator = NULL; +static const Ecore_X_Window *_win = NULL; +static E_Border *_bd_next = NULL; /* externally accessible functions */ int @@ -90,14 +90,14 @@ e_winlist_show(E_Zone *zone, Eina_Bool same_class) E_OBJECT_CHECK_RETURN(zone, 0); E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, 0); - if (winlist) return 0; + if (_winlist) return 0; - input_window = ecore_x_window_input_new(zone->container->win, 0, 0, 1, 1); - ecore_x_window_show(input_window); - if (!e_grabinput_get(input_window, 0, input_window)) + _input_window = ecore_x_window_input_new(zone->container->win, 0, 0, 1, 1); + ecore_x_window_show(_input_window); + if (!e_grabinput_get(_input_window, 0, _input_window)) { - ecore_x_window_free(input_window); - input_window = 0; + ecore_x_window_free(_input_window); + _input_window = 0; return 0; } @@ -113,56 +113,56 @@ e_winlist_show(E_Zone *zone, Eina_Bool same_class) if (h > zone->h) h = zone->h; y = (double)(zone->h - h) * e_config->winlist_pos_align_y; - winlist = e_popup_new(zone, x, y, w, h); - if (!winlist) + _winlist = e_popup_new(zone, x, y, w, h); + if (!_winlist) { - ecore_x_window_free(input_window); - e_grabinput_release(input_window, input_window); - input_window = 0; + ecore_x_window_free(_input_window); + e_grabinput_release(_input_window, _input_window); + _input_window = 0; return 0; } e_border_focus_track_freeze(); - evas_event_feed_mouse_in(winlist->evas, ecore_x_current_time_get(), NULL); - evas_event_feed_mouse_move(winlist->evas, -1000000, -1000000, ecore_x_current_time_get(), NULL); + evas_event_feed_mouse_in(_winlist->evas, ecore_x_current_time_get(), NULL); + evas_event_feed_mouse_move(_winlist->evas, -1000000, -1000000, ecore_x_current_time_get(), NULL); - e_popup_layer_set(winlist, 255); - evas_event_freeze(winlist->evas); - o = edje_object_add(winlist->evas); - bg_object = o; + e_popup_layer_set(_winlist, 255); + evas_event_freeze(_winlist->evas); + o = edje_object_add(_winlist->evas); + _bg_object = o; e_theme_edje_object_set(o, "base/theme/winlist", "e/widgets/winlist/main"); evas_object_move(o, 0, 0); evas_object_resize(o, w, h); evas_object_show(o); - e_popup_edje_bg_object_set(winlist, o); + e_popup_edje_bg_object_set(_winlist, o); - o = e_box_add(winlist->evas); - list_object = o; + o = e_box_add(_winlist->evas); + _list_object = o; e_box_align_set(o, 0.5, 0.0); e_box_orientation_set(o, 0); e_box_homogenous_set(o, 1); - edje_object_part_swallow(bg_object, "e.swallow.list", o); - edje_object_part_text_set(bg_object, "e.text.title", _("Select a window")); + edje_object_part_swallow(_bg_object, "e.swallow.list", o); + edje_object_part_text_set(_bg_object, "e.text.title", _("Select a window")); evas_object_show(o); - last_border = e_border_focused_get(); + _last_border = e_border_focused_get(); - desk = e_desk_current_get(winlist->zone); - e_box_freeze(list_object); + desk = e_desk_current_get(_winlist->zone); + e_box_freeze(_list_object); for (l = e_border_focus_stack_get(); l; l = l->next) { E_Border *bd; bd = l->data; if ((!same_class) || - (!strcmp((const char*) last_border->client.icccm.class, + (!strcmp((const char*) _last_border->client.icccm.class, (const char*) bd->client.icccm.class))) - _e_winlist_border_add(bd, winlist->zone, desk); + _e_winlist_border_add(bd, _winlist->zone, desk); } - e_box_thaw(list_object); + e_box_thaw(_list_object); - if (!wins) + if (!_wins) { e_winlist_hide(); return 1; @@ -170,47 +170,47 @@ e_winlist_show(E_Zone *zone, Eina_Bool same_class) if (e_config->winlist_list_show_other_desk_windows || e_config->winlist_list_show_other_screen_windows) - last_desk = e_desk_current_get(winlist->zone); + _last_desk = e_desk_current_get(_winlist->zone); if (e_config->winlist_warp_while_selecting) - ecore_x_pointer_xy_get(winlist->zone->container->win, - &last_pointer_x, &last_pointer_y); - if (last_border) + ecore_x_pointer_xy_get(_winlist->zone->container->win, + &_last_pointer_x, &_last_pointer_y); + if (_last_border) { - if (!last_border->lock_focus_out) - e_border_focus_set(last_border, 0, 0); + if (!_last_border->lock_focus_out) + e_border_focus_set(_last_border, 0, 0); else - last_border = NULL; + _last_border = NULL; } _e_winlist_activate_nth(1); - evas_event_thaw(winlist->evas); + evas_event_thaw(_winlist->evas); _e_winlist_size_adjust(); - handlers = eina_list_append - (handlers, ecore_event_handler_add + _handlers = eina_list_append + (_handlers, ecore_event_handler_add (E_EVENT_BORDER_ADD, _e_winlist_cb_event_border_add, NULL)); - handlers = eina_list_append - (handlers, ecore_event_handler_add + _handlers = eina_list_append + (_handlers, ecore_event_handler_add (E_EVENT_BORDER_REMOVE, _e_winlist_cb_event_border_remove, NULL)); - handlers = eina_list_append - (handlers, ecore_event_handler_add + _handlers = eina_list_append + (_handlers, ecore_event_handler_add (ECORE_EVENT_KEY_DOWN, _e_winlist_cb_key_down, NULL)); - handlers = eina_list_append - (handlers, ecore_event_handler_add + _handlers = eina_list_append + (_handlers, ecore_event_handler_add (ECORE_EVENT_KEY_UP, _e_winlist_cb_key_up, NULL)); - handlers = eina_list_append - (handlers, ecore_event_handler_add + _handlers = eina_list_append + (_handlers, ecore_event_handler_add (ECORE_EVENT_MOUSE_BUTTON_DOWN, _e_winlist_cb_mouse_down, NULL)); - handlers = eina_list_append - (handlers, ecore_event_handler_add + _handlers = eina_list_append + (_handlers, ecore_event_handler_add (ECORE_EVENT_MOUSE_BUTTON_UP, _e_winlist_cb_mouse_up, NULL)); - handlers = eina_list_append - (handlers, ecore_event_handler_add + _handlers = eina_list_append + (_handlers, ecore_event_handler_add (ECORE_EVENT_MOUSE_WHEEL, _e_winlist_cb_mouse_wheel, NULL)); - handlers = eina_list_append - (handlers, ecore_event_handler_add + _handlers = eina_list_append + (_handlers, ecore_event_handler_add (ECORE_EVENT_MOUSE_MOVE, _e_winlist_cb_mouse_move, NULL)); - e_popup_show(winlist); + e_popup_show(_winlist); return 1; } @@ -221,60 +221,60 @@ e_winlist_hide(void) E_Winlist_Win *ww; Ecore_Event_Handler *handler; - if (!winlist) return; - if (win_selected) + if (!_winlist) return; + if (_win_selected) { - ww = win_selected->data; + ww = _win_selected->data; bd = ww->border; } - evas_event_freeze(winlist->evas); - e_popup_hide(winlist); - e_box_freeze(list_object); - while (wins) + evas_event_freeze(_winlist->evas); + e_popup_hide(_winlist); + e_box_freeze(_list_object); + while (_wins) { - ww = wins->data; + ww = _wins->data; evas_object_del(ww->bg_object); if (ww->icon_object) evas_object_del(ww->icon_object); - wins = eina_list_remove_list(wins, wins); + _wins = eina_list_remove_list(_wins, _wins); if ((!bd) || (ww->border != bd)) e_object_unref(E_OBJECT(ww->border)); free(ww); } - e_box_thaw(list_object); - win_selected = NULL; - if (icon_object) + e_box_thaw(_list_object); + _win_selected = NULL; + if (_icon_object) { - evas_object_del(icon_object); - icon_object = NULL; + evas_object_del(_icon_object); + _icon_object = NULL; } - evas_object_del(list_object); - list_object = NULL; - evas_object_del(bg_object); - bg_object = NULL; - evas_event_thaw(winlist->evas); - e_object_del(E_OBJECT(winlist)); + evas_object_del(_list_object); + _list_object = NULL; + evas_object_del(_bg_object); + _bg_object = NULL; + evas_event_thaw(_winlist->evas); + e_object_del(E_OBJECT(_winlist)); e_border_focus_track_thaw(); - winlist = NULL; - hold_count = 0; - hold_mod = 0; + _winlist = NULL; + _hold_count = 0; + _hold_mod = 0; - EINA_LIST_FREE(handlers, handler) + EINA_LIST_FREE(_handlers, handler) ecore_event_handler_del(handler); - if (warp_timer) + if (_warp_timer) { - ecore_timer_del(warp_timer); - warp_timer = NULL; + ecore_timer_del(_warp_timer); + _warp_timer = NULL; } - if (scroll_timer) + if (_scroll_timer) { - ecore_timer_del(scroll_timer); - scroll_timer = NULL; + ecore_timer_del(_scroll_timer); + _scroll_timer = NULL; } - if (animator) + if (_animator) { - ecore_animator_del(animator); - animator = NULL; + ecore_animator_del(_animator); + _animator = NULL; } if (bd) { @@ -303,36 +303,36 @@ e_winlist_hide(void) if ((e_config->focus_policy != E_FOCUS_CLICK) || (e_config->winlist_warp_at_end) || (e_config->winlist_warp_while_selecting)) - ecore_x_pointer_warp(bd->zone->container->win, warp_to_x, warp_to_y); + ecore_x_pointer_warp(bd->zone->container->win, _warp_to_x, _warp_to_y); e_object_unref(E_OBJECT(bd)); } - ecore_x_window_free(input_window); - e_grabinput_release(input_window, input_window); - input_window = 0; + ecore_x_window_free(_input_window); + e_grabinput_release(_input_window, _input_window); + _input_window = 0; } void e_winlist_next(void) { - if (!winlist) return; - if (eina_list_count(wins) == 1) + if (!_winlist) return; + if (eina_list_count(_wins) == 1) { - if (!win_selected) + if (!_win_selected) { - win_selected = wins; + _win_selected = _wins; _e_winlist_show_active(); _e_winlist_activate(); } return; } _e_winlist_deactivate(); - if (!win_selected) - win_selected = wins; + if (!_win_selected) + _win_selected = _wins; else - win_selected = win_selected->next; - if (!win_selected) win_selected = wins; + _win_selected = _win_selected->next; + if (!_win_selected) _win_selected = _wins; _e_winlist_show_active(); _e_winlist_activate(); } @@ -340,23 +340,23 @@ e_winlist_next(void) void e_winlist_prev(void) { - if (!winlist) return; - if (eina_list_count(wins) == 1) + if (!_winlist) return; + if (eina_list_count(_wins) == 1) { - if (!win_selected) + if (!_win_selected) { - win_selected = wins; + _win_selected = _wins; _e_winlist_show_active(); _e_winlist_activate(); } return; } _e_winlist_deactivate(); - if (!win_selected) - win_selected = wins; + if (!_win_selected) + _win_selected = _wins; else - win_selected = win_selected->prev; - if (!win_selected) win_selected = eina_list_last(wins); + _win_selected = _win_selected->prev; + if (!_win_selected) _win_selected = eina_list_last(_wins); _e_winlist_show_active(); _e_winlist_activate(); } @@ -371,7 +371,8 @@ e_winlist_left(E_Zone *zone) int delta = 9999999; int center; - bd_next = NULL; + EINA_LOG_ERR("WINLIST LEFT"); + _bd_next = NULL; E_OBJECT_CHECK_RETURN(zone, 0); E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, 0); @@ -434,13 +435,13 @@ e_winlist_left(E_Zone *zone) if (delta_next < 0) delta = center - center_next; if (delta_next >= 0 && delta_next < delta) { - bd_next = bd; + _bd_next = bd; delta = delta_next; } } e_border_focus_track_thaw(); - if (bd_next) + if (_bd_next) { if (!bd_orig->lock_focus_out) e_border_focus_set(bd_orig, 0, 0); @@ -449,32 +450,32 @@ e_winlist_left(E_Zone *zone) (e_config->winlist_warp_at_end) || (e_config->winlist_warp_while_selecting)) { - warp_to_x = bd_next->x + (bd_next->w / 2); - if (warp_to_x < (bd_next->zone->x + 1)) - warp_to_x = bd_next->zone->x + ((bd_next->x + bd_next->w - bd_next->zone->x) / 2); - else if (warp_to_x >= (bd_next->zone->x + bd_next->zone->w - 1)) - warp_to_x = (bd_next->zone->x + bd_next->zone->w + bd_next->x) / 2; + _warp_to_x = _bd_next->x + (_bd_next->w / 2); + if (_warp_to_x < (_bd_next->zone->x + 1)) + _warp_to_x = _bd_next->zone->x + ((_bd_next->x + _bd_next->w - _bd_next->zone->x) / 2); + else if (_warp_to_x >= (_bd_next->zone->x + _bd_next->zone->w - 1)) + _warp_to_x = (_bd_next->zone->x + _bd_next->zone->w + _bd_next->x) / 2; - warp_to_y = bd_next->y + (bd_next->h / 2); - if (warp_to_y < (bd_next->zone->y + 1)) - warp_to_y = bd_next->zone->y + ((bd_next->y + bd_next->h - bd_next->zone->y) / 2); - else if (warp_to_y >= (bd_next->zone->y + bd_next->zone->h - 1)) - warp_to_y = (bd_next->zone->y + bd_next->zone->h + bd_next->y) / 2; + _warp_to_y = _bd_next->y + (_bd_next->h / 2); + if (_warp_to_y < (_bd_next->zone->y + 1)) + _warp_to_y = _bd_next->zone->y + ((_bd_next->y + _bd_next->h - _bd_next->zone->y) / 2); + else if (_warp_to_y >= (_bd_next->zone->y + _bd_next->zone->h - 1)) + _warp_to_y = (_bd_next->zone->y + _bd_next->zone->h + _bd_next->y) / 2; } - ecore_x_pointer_xy_get(zone->container->win, &warp_x, &warp_y); - win = &zone->container->win; - e_border_focus_latest_set(bd_next); - warp_to = 1; - if (!warp_timer) - warp_timer = ecore_timer_add(0.01, _e_winlist_warp_timer, NULL); - if (!animator) - animator = ecore_animator_add(_e_winlist_animator, NULL); + ecore_x_pointer_xy_get(zone->container->win, &_warp_x, &_warp_y); + _win = &zone->container->win; + e_border_focus_latest_set(_bd_next); + _warp_to = 1; + if (!_warp_timer) + _warp_timer = ecore_timer_add(0.01, _e_winlist_warp_timer, NULL); + if (!_animator) + _animator = ecore_animator_add(_e_winlist_animator, NULL); - if ((!bd_next->lock_user_stacking) && (e_config->winlist_list_raise_while_selecting)) - e_border_raise(bd_next); - if ((!bd_next->lock_focus_out) && (e_config->winlist_list_focus_while_selecting)) - e_border_focus_set(bd_next, 1, 1); + if ((!_bd_next->lock_user_stacking) && (e_config->winlist_list_raise_while_selecting)) + e_border_raise(_bd_next); + if ((!_bd_next->lock_focus_out) && (e_config->winlist_list_focus_while_selecting)) + e_border_focus_set(_bd_next, 1, 1); } } @@ -488,7 +489,7 @@ e_winlist_down(E_Zone *zone) int delta = 9999999; int center; - bd_next = NULL; + _bd_next = NULL; E_OBJECT_CHECK_RETURN(zone, 0); E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, 0); @@ -551,13 +552,13 @@ e_winlist_down(E_Zone *zone) if (delta_next < 0) delta = center - center_next; if (delta_next >= 0 && delta_next < delta) { - bd_next = bd; + _bd_next = bd; delta = delta_next; } } e_border_focus_track_thaw(); - if (bd_next) + if (_bd_next) { if (!bd_orig->lock_focus_out) e_border_focus_set(bd_orig, 0, 0); @@ -566,32 +567,32 @@ e_winlist_down(E_Zone *zone) (e_config->winlist_warp_at_end) || (e_config->winlist_warp_while_selecting)) { - warp_to_x = bd_next->x + (bd_next->w / 2); - if (warp_to_x < (bd_next->zone->x + 1)) - warp_to_x = bd_next->zone->x + ((bd_next->x + bd_next->w - bd_next->zone->x) / 2); - else if (warp_to_x >= (bd_next->zone->x + bd_next->zone->w - 1)) - warp_to_x = (bd_next->zone->x + bd_next->zone->w + bd_next->x) / 2; + _warp_to_x = _bd_next->x + (_bd_next->w / 2); + if (_warp_to_x < (_bd_next->zone->x + 1)) + _warp_to_x = _bd_next->zone->x + ((_bd_next->x + _bd_next->w - _bd_next->zone->x) / 2); + else if (_warp_to_x >= (_bd_next->zone->x + _bd_next->zone->w - 1)) + _warp_to_x = (_bd_next->zone->x + _bd_next->zone->w + _bd_next->x) / 2; - warp_to_y = bd_next->y + (bd_next->h / 2); - if (warp_to_y < (bd_next->zone->y + 1)) - warp_to_y = bd_next->zone->y + ((bd_next->y + bd_next->h - bd_next->zone->y) / 2); - else if (warp_to_y >= (bd_next->zone->y + bd_next->zone->h - 1)) - warp_to_y = (bd_next->zone->y + bd_next->zone->h + bd_next->y) / 2; + _warp_to_y = _bd_next->y + (_bd_next->h / 2); + if (_warp_to_y < (_bd_next->zone->y + 1)) + _warp_to_y = _bd_next->zone->y + ((_bd_next->y + _bd_next->h - _bd_next->zone->y) / 2); + else if (_warp_to_y >= (_bd_next->zone->y + _bd_next->zone->h - 1)) + _warp_to_y = (_bd_next->zone->y + _bd_next->zone->h + _bd_next->y) / 2; } - ecore_x_pointer_xy_get(zone->container->win, &warp_x, &warp_y); - win = &zone->container->win; - e_border_focus_latest_set(bd_next); - warp_to = 1; - if (!warp_timer) - warp_timer = ecore_timer_add(0.01, _e_winlist_warp_timer, NULL); - if (!animator) - animator = ecore_animator_add(_e_winlist_animator, NULL); + ecore_x_pointer_xy_get(zone->container->win, &_warp_x, &_warp_y); + _win = &zone->container->win; + e_border_focus_latest_set(_bd_next); + _warp_to = 1; + if (!_warp_timer) + _warp_timer = ecore_timer_add(0.01, _e_winlist_warp_timer, NULL); + if (!_animator) + _animator = ecore_animator_add(_e_winlist_animator, NULL); - if ((!bd_next->lock_user_stacking) && (e_config->winlist_list_raise_while_selecting)) - e_border_raise(bd_next); - if ((!bd_next->lock_focus_out) && (e_config->winlist_list_focus_while_selecting)) - e_border_focus_set(bd_next, 1, 1); + if ((!_bd_next->lock_user_stacking) && (e_config->winlist_list_raise_while_selecting)) + e_border_raise(_bd_next); + if ((!_bd_next->lock_focus_out) && (e_config->winlist_list_focus_while_selecting)) + e_border_focus_set(_bd_next, 1, 1); } } @@ -605,7 +606,7 @@ e_winlist_up(E_Zone *zone) int delta = 9999999; int center; - bd_next = NULL; + _bd_next = NULL; E_OBJECT_CHECK_RETURN(zone, 0); E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, 0); @@ -668,13 +669,13 @@ e_winlist_up(E_Zone *zone) if (delta_next < 0) delta = center - center_next; if (delta_next >= 0 && delta_next < delta) { - bd_next = bd; + _bd_next = bd; delta = delta_next; } } e_border_focus_track_thaw(); - if (bd_next) + if (_bd_next) { if (!bd_orig->lock_focus_out) e_border_focus_set(bd_orig, 0, 0); @@ -683,32 +684,32 @@ e_winlist_up(E_Zone *zone) (e_config->winlist_warp_at_end) || (e_config->winlist_warp_while_selecting)) { - warp_to_x = bd_next->x + (bd_next->w / 2); - if (warp_to_x < (bd_next->zone->x + 1)) - warp_to_x = bd_next->zone->x + ((bd_next->x + bd_next->w - bd_next->zone->x) / 2); - else if (warp_to_x >= (bd_next->zone->x + bd_next->zone->w - 1)) - warp_to_x = (bd_next->zone->x + bd_next->zone->w + bd_next->x) / 2; + _warp_to_x = _bd_next->x + (_bd_next->w / 2); + if (_warp_to_x < (_bd_next->zone->x + 1)) + _warp_to_x = _bd_next->zone->x + ((_bd_next->x + _bd_next->w - _bd_next->zone->x) / 2); + else if (_warp_to_x >= (_bd_next->zone->x + _bd_next->zone->w - 1)) + _warp_to_x = (_bd_next->zone->x + _bd_next->zone->w + _bd_next->x) / 2; - warp_to_y = bd_next->y + (bd_next->h / 2); - if (warp_to_y < (bd_next->zone->y + 1)) - warp_to_y = bd_next->zone->y + ((bd_next->y + bd_next->h - bd_next->zone->y) / 2); - else if (warp_to_y >= (bd_next->zone->y + bd_next->zone->h - 1)) - warp_to_y = (bd_next->zone->y + bd_next->zone->h + bd_next->y) / 2; + _warp_to_y = _bd_next->y + (_bd_next->h / 2); + if (_warp_to_y < (_bd_next->zone->y + 1)) + _warp_to_y = _bd_next->zone->y + ((_bd_next->y + _bd_next->h - _bd_next->zone->y) / 2); + else if (_warp_to_y >= (_bd_next->zone->y + _bd_next->zone->h - 1)) + _warp_to_y = (_bd_next->zone->y + _bd_next->zone->h + _bd_next->y) / 2; } - ecore_x_pointer_xy_get(zone->container->win, &warp_x, &warp_y); - win = &zone->container->win; - e_border_focus_latest_set(bd_next); - warp_to = 1; - if (!warp_timer) - warp_timer = ecore_timer_add(0.01, _e_winlist_warp_timer, NULL); - if (!animator) - animator = ecore_animator_add(_e_winlist_animator, NULL); + ecore_x_pointer_xy_get(zone->container->win, &_warp_x, &_warp_y); + _win = &zone->container->win; + e_border_focus_latest_set(_bd_next); + _warp_to = 1; + if (!_warp_timer) + _warp_timer = ecore_timer_add(0.01, _e_winlist_warp_timer, NULL); + if (!_animator) + _animator = ecore_animator_add(_e_winlist_animator, NULL); - if ((!bd_next->lock_user_stacking) && (e_config->winlist_list_raise_while_selecting)) - e_border_raise(bd_next); - if ((!bd_next->lock_focus_out) && (e_config->winlist_list_focus_while_selecting)) - e_border_focus_set(bd_next, 1, 1); + if ((!_bd_next->lock_user_stacking) && (e_config->winlist_list_raise_while_selecting)) + e_border_raise(_bd_next); + if ((!_bd_next->lock_focus_out) && (e_config->winlist_list_focus_while_selecting)) + e_border_focus_set(_bd_next, 1, 1); } } @@ -722,7 +723,7 @@ e_winlist_right(E_Zone *zone) int delta = 9999999; int center; - bd_next = NULL; + _bd_next = NULL; E_OBJECT_CHECK_RETURN(zone, 0); E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, 0); @@ -785,13 +786,13 @@ e_winlist_right(E_Zone *zone) if (delta_next < 0) delta = center_next - center; if (delta_next >= 0 && delta_next < delta) { - bd_next = bd; + _bd_next = bd; delta = delta_next; } } e_border_focus_track_thaw(); - if (bd_next) + if (_bd_next) { if (!bd_orig->lock_focus_out) e_border_focus_set(bd_orig, 0, 0); @@ -800,45 +801,45 @@ e_winlist_right(E_Zone *zone) (e_config->winlist_warp_at_end) || (e_config->winlist_warp_while_selecting)) { - warp_to_x = bd_next->x + (bd_next->w / 2); - if (warp_to_x < (bd_next->zone->x + 1)) - warp_to_x = bd_next->zone->x + ((bd_next->x + bd_next->w - bd_next->zone->x) / 2); - else if (warp_to_x >= (bd_next->zone->x + bd_next->zone->w - 1)) - warp_to_x = (bd_next->zone->x + bd_next->zone->w + bd_next->x) / 2; + _warp_to_x = _bd_next->x + (_bd_next->w / 2); + if (_warp_to_x < (_bd_next->zone->x + 1)) + _warp_to_x = _bd_next->zone->x + ((_bd_next->x + _bd_next->w - _bd_next->zone->x) / 2); + else if (_warp_to_x >= (_bd_next->zone->x + _bd_next->zone->w - 1)) + _warp_to_x = (_bd_next->zone->x + _bd_next->zone->w + _bd_next->x) / 2; - warp_to_y = bd_next->y + (bd_next->h / 2); - if (warp_to_y < (bd_next->zone->y + 1)) - warp_to_y = bd_next->zone->y + ((bd_next->y + bd_next->h - bd_next->zone->y) / 2); - else if (warp_to_y >= (bd_next->zone->y + bd_next->zone->h - 1)) - warp_to_y = (bd_next->zone->y + bd_next->zone->h + bd_next->y) / 2; + _warp_to_y = _bd_next->y + (_bd_next->h / 2); + if (_warp_to_y < (_bd_next->zone->y + 1)) + _warp_to_y = _bd_next->zone->y + ((_bd_next->y + _bd_next->h - _bd_next->zone->y) / 2); + else if (_warp_to_y >= (_bd_next->zone->y + _bd_next->zone->h - 1)) + _warp_to_y = (_bd_next->zone->y + _bd_next->zone->h + _bd_next->y) / 2; } - ecore_x_pointer_xy_get(zone->container->win, &warp_x, &warp_y); - win = &zone->container->win; - e_border_focus_latest_set(bd_next); - warp_to = 1; - if (!warp_timer) - warp_timer = ecore_timer_add(0.01, _e_winlist_warp_timer, NULL); - if (!animator) - animator = ecore_animator_add(_e_winlist_animator, NULL); + ecore_x_pointer_xy_get(zone->container->win, &_warp_x, &_warp_y); + _win = &zone->container->win; + e_border_focus_latest_set(_bd_next); + _warp_to = 1; + if (!_warp_timer) + _warp_timer = ecore_timer_add(0.01, _e_winlist_warp_timer, NULL); + if (!_animator) + _animator = ecore_animator_add(_e_winlist_animator, NULL); - if ((!bd_next->lock_user_stacking) && (e_config->winlist_list_raise_while_selecting)) - e_border_raise(bd_next); - if ((!bd_next->lock_focus_out) && (e_config->winlist_list_focus_while_selecting)) - e_border_focus_set(bd_next, 1, 1); + if ((!_bd_next->lock_user_stacking) && (e_config->winlist_list_raise_while_selecting)) + e_border_raise(_bd_next); + if ((!_bd_next->lock_focus_out) && (e_config->winlist_list_focus_while_selecting)) + e_border_focus_set(_bd_next, 1, 1); } } void e_winlist_modifiers_set(int mod) { - if (!winlist) return; - hold_mod = mod; - hold_count = 0; - if (hold_mod & ECORE_EVENT_MODIFIER_SHIFT) hold_count++; - if (hold_mod & ECORE_EVENT_MODIFIER_CTRL) hold_count++; - if (hold_mod & ECORE_EVENT_MODIFIER_ALT) hold_count++; - if (hold_mod & ECORE_EVENT_MODIFIER_WIN) hold_count++; + if (!_winlist) return; + _hold_mod = mod; + _hold_count = 0; + if (_hold_mod & ECORE_EVENT_MODIFIER_SHIFT) _hold_count++; + if (_hold_mod & ECORE_EVENT_MODIFIER_CTRL) _hold_count++; + if (_hold_mod & ECORE_EVENT_MODIFIER_ALT) _hold_count++; + if (_hold_mod & ECORE_EVENT_MODIFIER_WIN) _hold_count++; } /* local subsystem functions */ @@ -849,16 +850,16 @@ _e_winlist_size_adjust(void) E_Zone *zone; int x, y, w, h; - e_box_freeze(list_object); - e_box_size_min_get(list_object, &mw, &mh); - edje_extern_object_min_size_set(list_object, mw, mh); - edje_object_part_swallow(bg_object, "e.swallow.list", list_object); - edje_object_size_min_calc(bg_object, &mw, &mh); - edje_extern_object_min_size_set(list_object, -1, -1); - edje_object_part_swallow(bg_object, "e.swallow.list", list_object); - e_box_thaw(list_object); + e_box_freeze(_list_object); + e_box_size_min_get(_list_object, &mw, &mh); + edje_extern_object_min_size_set(_list_object, mw, mh); + edje_object_part_swallow(_bg_object, "e.swallow.list", _list_object); + edje_object_size_min_calc(_bg_object, &mw, &mh); + edje_extern_object_min_size_set(_list_object, -1, -1); + edje_object_part_swallow(_bg_object, "e.swallow.list", _list_object); + e_box_thaw(_list_object); - zone = winlist->zone; + zone = _winlist->zone; w = (double)zone->w * e_config->winlist_pos_size_w; if (w < mw) w = mw; if (w > e_config->winlist_pos_max_w) w = e_config->winlist_pos_max_w; @@ -872,8 +873,8 @@ _e_winlist_size_adjust(void) if (h > zone->h) h = zone->h; y = (double)(zone->h - h) * e_config->winlist_pos_align_y; - evas_object_resize(bg_object, w, h); - e_popup_move_resize(winlist, x, y, w, h); + evas_object_resize(_bg_object, w, h); + e_popup_move_resize(_winlist, x, y, w, h); } static void @@ -920,8 +921,8 @@ _e_winlist_border_add(E_Border *bd, E_Zone *zone, E_Desk *desk) ww = E_NEW(E_Winlist_Win, 1); if (!ww) return; ww->border = bd; - wins = eina_list_append(wins, ww); - o = edje_object_add(winlist->evas); + _wins = eina_list_append(_wins, ww); + o = edje_object_add(_winlist->evas); ww->bg_object = o; e_theme_edje_object_set(o, "base/theme/winlist", "e/widgets/winlist/item"); @@ -929,7 +930,7 @@ _e_winlist_border_add(E_Border *bd, E_Zone *zone, E_Desk *desk) evas_object_show(o); if (edje_object_part_exists(ww->bg_object, "e.swallow.icon")) { - o = e_border_icon_add(bd, winlist->evas); + o = e_border_icon_add(bd, _winlist->evas); ww->icon_object = o; edje_object_part_swallow(ww->bg_object, "e.swallow.icon", o); evas_object_show(o); @@ -945,7 +946,7 @@ _e_winlist_border_add(E_Border *bd, E_Zone *zone, E_Desk *desk) } edje_object_size_min_calc(ww->bg_object, &mw, &mh); - e_box_pack_end(list_object, ww->bg_object); + e_box_pack_end(_list_object, ww->bg_object); e_box_pack_options_set(ww->bg_object, 1, 1, /* fill */ 1, 0, /* expand */ @@ -961,8 +962,8 @@ _e_winlist_border_del(E_Border *bd) { Eina_List *l; - if (bd == last_border) last_border = NULL; - for (l = wins; l; l = l->next) + if (bd == _last_border) _last_border = NULL; + for (l = _wins; l; l = l->next) { E_Winlist_Win *ww; @@ -970,17 +971,17 @@ _e_winlist_border_del(E_Border *bd) if (ww->border == bd) { e_object_unref(E_OBJECT(ww->border)); - if (l == win_selected) + if (l == _win_selected) { - win_selected = l->next; - if (!win_selected) win_selected = l->prev; + _win_selected = l->next; + if (!_win_selected) _win_selected = l->prev; _e_winlist_show_active(); _e_winlist_activate(); } evas_object_del(ww->bg_object); if (ww->icon_object) evas_object_del(ww->icon_object); E_FREE(ww); - wins = eina_list_remove_list(wins, l); + _wins = eina_list_remove_list(_wins, l); return; } } @@ -993,12 +994,12 @@ _e_winlist_activate_nth(int n) int cnt; _e_winlist_deactivate(); - cnt = eina_list_count(wins); + cnt = eina_list_count(_wins); if (n >= cnt) n = cnt - 1; - l = eina_list_nth_list(wins, n); + l = eina_list_nth_list(_wins, n); if (l) { - win_selected = l; + _win_selected = l; _e_winlist_show_active(); _e_winlist_activate(); } @@ -1011,8 +1012,8 @@ _e_winlist_activate(void) Evas_Object *o; int ok = 0; - if (!win_selected) return; - ww = win_selected->data; + if (!_win_selected) return; + ww = _win_selected->data; edje_object_signal_emit(ww->bg_object, "e,state,selected", "e"); if (ww->icon_object) edje_object_signal_emit(ww->icon_object, "e,state,selected", "e"); @@ -1025,7 +1026,7 @@ _e_winlist_activate(void) ok = 1; } if ((!ww->border->sticky) && - (ww->border->desk != e_desk_current_get(winlist->zone)) && + (ww->border->desk != e_desk_current_get(_winlist->zone)) && (e_config->winlist_list_jump_desk_while_selecting)) { if (ww->border->desk) e_desk_show(ww->border->desk); @@ -1035,7 +1036,7 @@ _e_winlist_activate(void) ((ww->border->changes.shaded) && (ww->border->shade.val != ww->border->shaded) && (ww->border->shade.val))) && - (ww->border->desk == e_desk_current_get(winlist->zone)) && + (ww->border->desk == e_desk_current_get(_winlist->zone)) && (e_config->winlist_list_uncover_while_selecting)) { if (!ww->border->lock_user_shade) @@ -1044,7 +1045,7 @@ _e_winlist_activate(void) ok = 1; } if ((!ww->border->iconic) && - ((ww->border->desk == e_desk_current_get(winlist->zone)) || + ((ww->border->desk == e_desk_current_get(_winlist->zone)) || (ww->border->sticky))) ok = 1; if (ok) @@ -1053,41 +1054,41 @@ _e_winlist_activate(void) (e_config->winlist_warp_at_end) || (e_config->winlist_warp_while_selecting)) { - warp_to_x = ww->border->x + (ww->border->w / 2); - if (warp_to_x < (ww->border->zone->x + 1)) - warp_to_x = ww->border->zone->x + ((ww->border->x + ww->border->w - ww->border->zone->x) / 2); - else if (warp_to_x >= (ww->border->zone->x + ww->border->zone->w - 1)) - warp_to_x = (ww->border->zone->x + ww->border->zone->w + ww->border->x) / 2; + _warp_to_x = ww->border->x + (ww->border->w / 2); + if (_warp_to_x < (ww->border->zone->x + 1)) + _warp_to_x = ww->border->zone->x + ((ww->border->x + ww->border->w - ww->border->zone->x) / 2); + else if (_warp_to_x >= (ww->border->zone->x + ww->border->zone->w - 1)) + _warp_to_x = (ww->border->zone->x + ww->border->zone->w + ww->border->x) / 2; - warp_to_y = ww->border->y + (ww->border->h / 2); - if (warp_to_y < (ww->border->zone->y + 1)) - warp_to_y = ww->border->zone->y + ((ww->border->y + ww->border->h - ww->border->zone->y) / 2); - else if (warp_to_y >= (ww->border->zone->y + ww->border->zone->h - 1)) - warp_to_y = (ww->border->zone->y + ww->border->zone->h + ww->border->y) / 2; + _warp_to_y = ww->border->y + (ww->border->h / 2); + if (_warp_to_y < (ww->border->zone->y + 1)) + _warp_to_y = ww->border->zone->y + ((ww->border->y + ww->border->h - ww->border->zone->y) / 2); + else if (_warp_to_y >= (ww->border->zone->y + ww->border->zone->h - 1)) + _warp_to_y = (ww->border->zone->y + ww->border->zone->h + ww->border->y) / 2; } if (e_config->winlist_warp_while_selecting) { - ecore_x_pointer_xy_get(winlist->zone->container->win, &warp_x, &warp_y); - win = &winlist->zone->container->win; + ecore_x_pointer_xy_get(_winlist->zone->container->win, &_warp_x, &_warp_y); + _win = &_winlist->zone->container->win; e_border_focus_latest_set(ww->border); - warp_to = 1; - if (!warp_timer) - warp_timer = ecore_timer_add(0.01, _e_winlist_warp_timer, NULL); - if (!animator) - animator = ecore_animator_add(_e_winlist_animator, NULL); + _warp_to = 1; + if (!_warp_timer) + _warp_timer = ecore_timer_add(0.01, _e_winlist_warp_timer, NULL); + if (!_animator) + _animator = ecore_animator_add(_e_winlist_animator, NULL); } - else + else { - warp_to = 0; - if (warp_timer) + _warp_to = 0; + if (_warp_timer) { - ecore_timer_del(warp_timer); - warp_timer = NULL; + ecore_timer_del(_warp_timer); + _warp_timer = NULL; } - if (animator) + if (_animator) { - ecore_animator_del(animator); - animator = NULL; + ecore_animator_del(_animator); + _animator = NULL; } } @@ -1096,21 +1097,21 @@ _e_winlist_activate(void) if ((!ww->border->lock_focus_out) && (e_config->winlist_list_focus_while_selecting)) e_border_focus_set(ww->border, 1, 1); } - edje_object_part_text_set(bg_object, "e.text.label", e_border_name_get(ww->border)); - if (icon_object) + edje_object_part_text_set(_bg_object, "e.text.label", e_border_name_get(ww->border)); + if (_icon_object) { - evas_object_del(icon_object); - icon_object = NULL; + evas_object_del(_icon_object); + _icon_object = NULL; } - if (edje_object_part_exists(bg_object, "e.swallow.icon")) + if (edje_object_part_exists(_bg_object, "e.swallow.icon")) { - o = e_border_icon_add(ww->border, winlist->evas); - icon_object = o; - edje_object_part_swallow(bg_object, "e.swallow.icon", o); + o = e_border_icon_add(ww->border, _winlist->evas); + _icon_object = o; + edje_object_part_swallow(_bg_object, "e.swallow.icon", o); evas_object_show(o); } - edje_object_signal_emit(bg_object, "e,state,selected", "e"); + edje_object_signal_emit(_bg_object, "e,state,selected", "e"); } static void @@ -1118,8 +1119,8 @@ _e_winlist_deactivate(void) { E_Winlist_Win *ww; - if (!win_selected) return; - ww = win_selected->data; + if (!_win_selected) return; + ww = _win_selected->data; if (ww->was_shaded) { if (!ww->border->lock_user_shade) @@ -1132,12 +1133,12 @@ _e_winlist_deactivate(void) } ww->was_shaded = 0; ww->was_iconified = 0; - if (icon_object) + if (_icon_object) { - evas_object_del(icon_object); - icon_object = NULL; + evas_object_del(_icon_object); + _icon_object = NULL; } - edje_object_part_text_set(bg_object, "e.text.label", ""); + edje_object_part_text_set(_bg_object, "e.text.label", ""); edje_object_signal_emit(ww->bg_object, "e,state,unselected", "e"); if (ww->icon_object) edje_object_signal_emit(ww->icon_object, "e,state,unselected", "e"); if (!ww->border->lock_focus_in) @@ -1150,46 +1151,46 @@ _e_winlist_show_active(void) Eina_List *l; int i, n; - if (!wins) return; + if (!_wins) return; - for (i = 0, l = wins; l; l = l->next, i++) - if (l == win_selected) break; + for (i = 0, l = _wins; l; l = l->next, i++) + if (l == _win_selected) break; - n = eina_list_count(wins); + n = eina_list_count(_wins); if (n <= 1) return; - scroll_align_to = (double)i / (double)(n - 1); + _scroll_align_to = (double)i / (double)(n - 1); if (e_config->winlist_scroll_animate) { - scroll_to = 1; - if (!scroll_timer) - scroll_timer = ecore_timer_add(0.01, _e_winlist_scroll_timer, NULL); - if (!animator) - animator = ecore_animator_add(_e_winlist_animator, NULL); + _scroll_to = 1; + if (!_scroll_timer) + _scroll_timer = ecore_timer_add(0.01, _e_winlist_scroll_timer, NULL); + if (!_animator) + _animator = ecore_animator_add(_e_winlist_animator, NULL); } else { - scroll_align = scroll_align_to; - e_box_align_set(list_object, 0.5, scroll_align); + _scroll_align = _scroll_align_to; + e_box_align_set(_list_object, 0.5, _scroll_align); } } static void _e_winlist_restore_desktop(void) { - if (last_desk && + if (_last_desk && (e_config->winlist_list_show_other_desk_windows || e_config->winlist_list_show_other_screen_windows)) - e_desk_show(last_desk); + e_desk_show(_last_desk); if (e_config->winlist_warp_while_selecting) - ecore_x_pointer_warp(winlist->zone->container->win, - last_pointer_x, last_pointer_y); + ecore_x_pointer_warp(_winlist->zone->container->win, + _last_pointer_x, _last_pointer_y); _e_winlist_deactivate(); - win_selected = NULL; + _win_selected = NULL; e_winlist_hide(); - if (last_border) + if (_last_border) { - e_border_focus_set(last_border, 1, 1); - last_border = NULL; + e_border_focus_set(_last_border, 1, 1); + _last_border = NULL; } } @@ -1199,8 +1200,8 @@ _e_winlist_cb_event_border_add(__UNUSED__ void *data, __UNUSED__ int type, void E_Event_Border_Add *ev; ev = event; - _e_winlist_border_add(ev->border, winlist->zone, - e_desk_current_get(winlist->zone)); + _e_winlist_border_add(ev->border, _winlist->zone, + e_desk_current_get(_winlist->zone)); _e_winlist_size_adjust(); return ECORE_CALLBACK_PASS_ON; } @@ -1222,7 +1223,7 @@ _e_winlist_cb_key_down(__UNUSED__ void *data, __UNUSED__ int type, void *event) Ecore_Event_Key *ev; ev = event; - if (ev->window != input_window) return ECORE_CALLBACK_PASS_ON; + if (ev->window != _input_window) return ECORE_CALLBACK_PASS_ON; if (!strcmp(ev->key, "Up")) e_winlist_prev(); else if (!strcmp(ev->key, "Down")) @@ -1272,23 +1273,23 @@ _e_winlist_cb_key_down(__UNUSED__ void *data, __UNUSED__ int type, void *event) mod = 0; - if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) + if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; - if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) + if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; - if (ev->modifiers & ECORE_EVENT_MODIFIER_ALT) + if (ev->modifiers & ECORE_EVENT_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; - if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) + if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; if (bind->key && (!strcmp(bind->key, ev->keyname)) && - ((bind->modifiers == mod) || (bind->any_mod))) + ((bind->modifiers == mod) || (bind->any_mod))) { if (!(act = e_action_find(bind->action))) continue; if (act->func.go_key) - act->func.go_key(E_OBJECT(winlist->zone), bind->params, ev); + act->func.go_key(E_OBJECT(_winlist->zone), bind->params, ev); else if (act->func.go) - act->func.go(E_OBJECT(winlist->zone), bind->params); + act->func.go(E_OBJECT(_winlist->zone), bind->params); } } } @@ -1305,40 +1306,40 @@ _e_winlist_cb_key_up(__UNUSED__ void *data, __UNUSED__ int type, void *event) E_Binding_Modifier mod; ev = event; - if (!winlist) return ECORE_CALLBACK_PASS_ON; - if (hold_mod) + if (!_winlist) return ECORE_CALLBACK_PASS_ON; + if (_hold_mod) { - if ((hold_mod & ECORE_EVENT_MODIFIER_SHIFT) && (!strcmp(ev->key, "Shift_L"))) - hold_count--; - else if ((hold_mod & ECORE_EVENT_MODIFIER_SHIFT) && (!strcmp(ev->key, "Shift_R"))) - hold_count--; - else if ((hold_mod & ECORE_EVENT_MODIFIER_CTRL) && (!strcmp(ev->key, "Control_L"))) - hold_count--; - else if ((hold_mod & ECORE_EVENT_MODIFIER_CTRL) && (!strcmp(ev->key, "Control_R"))) - hold_count--; - else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Alt_L"))) - hold_count--; - else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Alt_R"))) - hold_count--; - else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Meta_L"))) - hold_count--; - else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Meta_R"))) - hold_count--; - else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Super_L"))) - hold_count--; - else if ((hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Super_R"))) - hold_count--; - else if ((hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Super_L"))) - hold_count--; - else if ((hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Super_R"))) - hold_count--; - else if ((hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Mode_switch"))) - hold_count--; - else if ((hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Meta_L"))) - hold_count--; - else if ((hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Meta_R"))) - hold_count--; - if (hold_count <= 0) + if ((_hold_mod & ECORE_EVENT_MODIFIER_SHIFT) && (!strcmp(ev->key, "Shift_L"))) + _hold_count--; + else if ((_hold_mod & ECORE_EVENT_MODIFIER_SHIFT) && (!strcmp(ev->key, "Shift_R"))) + _hold_count--; + else if ((_hold_mod & ECORE_EVENT_MODIFIER_CTRL) && (!strcmp(ev->key, "Control_L"))) + _hold_count--; + else if ((_hold_mod & ECORE_EVENT_MODIFIER_CTRL) && (!strcmp(ev->key, "Control_R"))) + _hold_count--; + else if ((_hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Alt_L"))) + _hold_count--; + else if ((_hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Alt_R"))) + _hold_count--; + else if ((_hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Meta_L"))) + _hold_count--; + else if ((_hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Meta_R"))) + _hold_count--; + else if ((_hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Super_L"))) + _hold_count--; + else if ((_hold_mod & ECORE_EVENT_MODIFIER_ALT) && (!strcmp(ev->key, "Super_R"))) + _hold_count--; + else if ((_hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Super_L"))) + _hold_count--; + else if ((_hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Super_R"))) + _hold_count--; + else if ((_hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Mode_switch"))) + _hold_count--; + else if ((_hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Meta_L"))) + _hold_count--; + else if ((_hold_mod & ECORE_EVENT_MODIFIER_WIN) && (!strcmp(ev->key, "Meta_R"))) + _hold_count--; + if (_hold_count <= 0) { e_winlist_hide(); return 1; @@ -1351,23 +1352,23 @@ _e_winlist_cb_key_up(__UNUSED__ void *data, __UNUSED__ int type, void *event) if (bind->action && strcmp(bind->action,"winlist")) continue; mod = 0; - if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) + if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) mod |= E_BINDING_MODIFIER_SHIFT; - if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) + if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) mod |= E_BINDING_MODIFIER_CTRL; - if (ev->modifiers & ECORE_EVENT_MODIFIER_ALT) + if (ev->modifiers & ECORE_EVENT_MODIFIER_ALT) mod |= E_BINDING_MODIFIER_ALT; - if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) + if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) mod |= E_BINDING_MODIFIER_WIN; if (bind->key && (!strcmp(bind->key, ev->keyname)) && - ((bind->modifiers == mod) || (bind->any_mod))) - { + ((bind->modifiers == mod) || (bind->any_mod))) + { if (!(act = e_action_find(bind->action))) continue; if (act->func.end_key) - act->func.end_key(E_OBJECT(winlist->zone), bind->params, ev); + act->func.end_key(E_OBJECT(_winlist->zone), bind->params, ev); else if (act->func.end) - act->func.end(E_OBJECT(winlist->zone), bind->params); + act->func.end(E_OBJECT(_winlist->zone), bind->params); } } @@ -1380,9 +1381,9 @@ _e_winlist_cb_mouse_down(__UNUSED__ void *data, __UNUSED__ int type, void *event Ecore_Event_Mouse_Button *ev; ev = event; - if (ev->window != input_window) return ECORE_CALLBACK_PASS_ON; + if (ev->window != _input_window) return ECORE_CALLBACK_PASS_ON; e_bindings_mouse_down_event_handle(E_BINDING_CONTEXT_WINLIST, - E_OBJECT(winlist->zone), ev); + E_OBJECT(_winlist->zone), ev); return ECORE_CALLBACK_PASS_ON; } @@ -1392,9 +1393,9 @@ _e_winlist_cb_mouse_up(__UNUSED__ void *data, __UNUSED__ int type, void *event) Ecore_Event_Mouse_Button *ev; ev = event; - if (ev->window != input_window) return ECORE_CALLBACK_PASS_ON; + if (ev->window != _input_window) return ECORE_CALLBACK_PASS_ON; e_bindings_mouse_up_event_handle(E_BINDING_CONTEXT_WINLIST, - E_OBJECT(winlist->zone), ev); + E_OBJECT(_winlist->zone), ev); return ECORE_CALLBACK_PASS_ON; } @@ -1405,17 +1406,17 @@ _e_winlist_cb_mouse_wheel(__UNUSED__ void *data, __UNUSED__ int type, void *even int i; ev = event; - if (ev->window != input_window) return ECORE_CALLBACK_PASS_ON; + if (ev->window != _input_window) return ECORE_CALLBACK_PASS_ON; e_bindings_wheel_event_handle(E_BINDING_CONTEXT_WINLIST, - E_OBJECT(winlist->zone), ev); + E_OBJECT(_winlist->zone), ev); if (ev->z < 0) /* up */ { - for (i = ev->z; i < 0; i++) + for (i = ev->z; i < 0; i++) e_winlist_prev(); } else if (ev->z > 0) /* down */ { - for (i = ev->z; i > 0; i--) + for (i = ev->z; i > 0; i--) e_winlist_next(); } return ECORE_CALLBACK_PASS_ON; @@ -1427,10 +1428,10 @@ _e_winlist_cb_mouse_move(__UNUSED__ void *data, __UNUSED__ int type, void *event Ecore_Event_Mouse_Move *ev; ev = event; - if (ev->window != input_window) return ECORE_CALLBACK_PASS_ON; + if (ev->window != _input_window) return ECORE_CALLBACK_PASS_ON; - evas_event_feed_mouse_move(winlist->evas, ev->x - winlist->x + - winlist->zone->x, ev->y - winlist->y + winlist->zone->y, ev->timestamp, NULL); + evas_event_feed_mouse_move(_winlist->evas, ev->x - _winlist->x + + _winlist->zone->x, ev->y - _winlist->y + _winlist->zone->y, ev->timestamp, NULL); return ECORE_CALLBACK_PASS_ON; } @@ -1438,107 +1439,107 @@ _e_winlist_cb_mouse_move(__UNUSED__ void *data, __UNUSED__ int type, void *event static Eina_Bool _e_winlist_scroll_timer(__UNUSED__ void *data) { - if (scroll_to) + if (_scroll_to) { double spd; spd = e_config->winlist_scroll_speed; - scroll_align = (scroll_align * (1.0 - spd)) + (scroll_align_to * spd); + _scroll_align = (_scroll_align * (1.0 - spd)) + (_scroll_align_to * spd); return 1; } - scroll_timer = NULL; + _scroll_timer = NULL; return ECORE_CALLBACK_CANCEL; } static Eina_Bool _e_winlist_warp_timer(__UNUSED__ void *data) { - if (warp_to) + if (_warp_to) { int x, y; double spd; spd = e_config->winlist_warp_speed; - x = warp_x; - y = warp_y; - warp_x = (x * (1.0 - spd)) + (warp_to_x * spd); - warp_y = (y * (1.0 - spd)) + (warp_to_y * spd); + x = _warp_x; + y = _warp_y; + _warp_x = (x * (1.0 - spd)) + (_warp_to_x * spd); + _warp_y = (y * (1.0 - spd)) + (_warp_to_y * spd); return 1; } - warp_timer = NULL; + _warp_timer = NULL; return ECORE_CALLBACK_CANCEL; } static Eina_Bool _e_winlist_animator(__UNUSED__ void *data) { - if (warp_to) + if (_warp_to) { int dx, dy; - dx = warp_x - warp_to_x; - dy = warp_y - warp_to_y; + dx = _warp_x - _warp_to_x; + dy = _warp_y - _warp_to_y; dx = dx * dx; dy = dy * dy; if ((dx <= 1) && (dy <= 1)) { - warp_x = warp_to_x; - warp_y = warp_to_y; - warp_to = 0; + _warp_x = _warp_to_x; + _warp_y = _warp_to_y; + _warp_to = 0; } - if (win) ecore_x_pointer_warp(*win, warp_x, warp_y); + if (_win) ecore_x_pointer_warp(*_win, _warp_x, _warp_y); } - if (scroll_to) + if (_scroll_to) { double da; - da = scroll_align - scroll_align_to; + da = _scroll_align - _scroll_align_to; if (da < 0.0) da = -da; if (da < 0.01) { - scroll_align = scroll_align_to; - scroll_to = 0; + _scroll_align = _scroll_align_to; + _scroll_to = 0; } - e_box_align_set(list_object, 0.5, 1.0 - scroll_align); + e_box_align_set(_list_object, 0.5, 1.0 - _scroll_align); } - if ((warp_to) || (scroll_to)) return ECORE_CALLBACK_RENEW; - animator = NULL; - if (bd_next) + if ((_warp_to) || (_scroll_to)) return ECORE_CALLBACK_RENEW; + _animator = NULL; + if (_bd_next) { - if (bd_next->iconic) + if (_bd_next->iconic) { - if (!bd_next->lock_user_iconify) - e_border_uniconify(bd_next); + if (!_bd_next->lock_user_iconify) + e_border_uniconify(_bd_next); } - if (bd_next->shaded) + if (_bd_next->shaded) { - if (!bd_next->lock_user_shade) - e_border_unshade(bd_next, bd_next->shade.dir); + if (!_bd_next->lock_user_shade) + e_border_unshade(_bd_next, _bd_next->shade.dir); } - else if (bd_next->desk) + else if (_bd_next->desk) { - if (!bd_next->sticky) e_desk_show(bd_next->desk); + if (!_bd_next->sticky) e_desk_show(_bd_next->desk); } - if (!bd_next->lock_user_stacking) - e_border_raise(bd_next); + if (!_bd_next->lock_user_stacking) + e_border_raise(_bd_next); - if (!bd_next->lock_focus_out) + if (!_bd_next->lock_focus_out) { - e_border_focus_set(bd_next, 1, 1); - e_border_focus_latest_set(bd_next); + e_border_focus_set(_bd_next, 1, 1); + e_border_focus_latest_set(_bd_next); } if ((e_config->focus_policy != E_FOCUS_CLICK) || (e_config->winlist_warp_at_end) || (e_config->winlist_warp_while_selecting)) - ecore_x_pointer_warp(bd_next->zone->container->win, warp_to_x, warp_to_y); - bd_next = NULL; - if (warp_timer) + ecore_x_pointer_warp(_bd_next->zone->container->win, _warp_to_x, _warp_to_y); + _bd_next = NULL; + if (_warp_timer) { - ecore_timer_del(warp_timer); - warp_timer = NULL; + ecore_timer_del(_warp_timer); + _warp_timer = NULL; } } - win = NULL; + _win = NULL; return ECORE_CALLBACK_CANCEL; } @@ -1550,11 +1551,11 @@ _e_winlist_cb_item_mouse_in(void *data, Evas *evas, Evas_Object *obj, void *even Eina_List *l; if (!(ww = data)) return; - if (!wins) return; - for (l = wins; l; l = l->next) + if (!_wins) return; + for (l = _wins; l; l = l->next) if (l->data == ww) break; _e_winlist_deactivate(); - win_selected = l; + _win_selected = l; _e_winlist_show_active(); _e_winlist_activate(); }