discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=23c4d42e4cebb8d1c46d9e139b2df45a38ad6ac3
commit 23c4d42e4cebb8d1c46d9e139b2df45a38ad6ac3 Author: Mike Blumenkrantz <zm...@osg.samsung.com> Date: Wed Feb 18 18:34:29 2015 -0500 rename extremely frustratingly-named E_Screen_Limits enum and members this came in a patch that I take full responsibility for not adequately reviewing at the time. the names are confusing and counterintuitive, and it does not properly include the client namespace. --- src/bin/e_client.c | 10 +++++----- src/bin/e_client.h | 10 +++++----- src/bin/e_comp_x.c | 8 ++++---- src/bin/e_int_menus.c | 2 +- .../conf_window_manipulation/e_int_config_window_display.c | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index d4577af..016cc3e 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -961,7 +961,7 @@ _e_client_resize_handle(E_Client *ec) w = new_w; h = new_h; - if (e_config->screen_limits == E_SCREEN_LIMITS_WITHIN) + if (e_config->screen_limits == E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE) { w = MIN(w, ec->zone->w); h = MIN(h, ec->zone->h); @@ -1064,7 +1064,7 @@ _e_client_resize_key_down(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev else if ((strncmp(ev->key, "Control", sizeof("Control") - 1) != 0) && (strncmp(ev->key, "Alt", sizeof("Alt") - 1) != 0)) goto stop; - if (e_config->screen_limits == E_SCREEN_LIMITS_WITHIN) + if (e_config->screen_limits == E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE) { w = MIN(w, action_client->zone->w); h = MIN(h, action_client->zone->h); @@ -1692,7 +1692,7 @@ _e_client_eval(E_Client *ec) e_zone_useful_geometry_get(ec->zone, &zx, &zy, &zw, &zh); /* enforce wm size hints for initial sizing */ - if (e_config->screen_limits == E_SCREEN_LIMITS_WITHIN) + if (e_config->screen_limits == E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE) { ec->w = MIN(ec->w, ec->zone->w); ec->h = MIN(ec->h, ec->zone->h); @@ -2316,7 +2316,7 @@ e_client_idler_before(void) (!E_INSIDE(ec->x, ec->y, 0 - ec->w + 5, 0 - ec->h + 5, ec->comp->man->w - 5, ec->comp->man->h - 5)) ) { - if (e_config->screen_limits != E_SCREEN_LIMITS_COMPLETELY) + if (e_config->screen_limits != E_CLIENT_OFFSCREEN_LIMIT_ALLOW_FULL) _e_client_move_lost_window_to_center(ec); } } @@ -2873,7 +2873,7 @@ e_client_mouse_move(E_Client *ec, Evas_Point *output) &new_x, &new_y, &new_w, &new_h); eina_list_free(skiplist); - if (e_config->screen_limits == E_SCREEN_LIMITS_WITHIN) + if (e_config->screen_limits == E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE) _e_client_stay_within_canvas(ec, x, y, &new_x, &new_y); ec->shelf_fix.x = 0; diff --git a/src/bin/e_client.h b/src/bin/e_client.h index a918cc6..40d7585 100644 --- a/src/bin/e_client.h +++ b/src/bin/e_client.h @@ -1,10 +1,10 @@ #ifdef E_TYPEDEFS -typedef enum _E_Screen_Limits +typedef enum _E_Client_Screen_Limit { - E_SCREEN_LIMITS_PARTLY = 0, - E_SCREEN_LIMITS_COMPLETELY = 1, - E_SCREEN_LIMITS_WITHIN = 2 -} E_Screen_Limits; + E_CLIENT_OFFSCREEN_LIMIT_ALLOW_PARTIAL = 0, + E_CLIENT_OFFSCREEN_LIMIT_ALLOW_FULL = 1, + E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE = 2 +} E_Client_Screen_Limit; typedef enum _E_Icon_Preference { diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c index aec754f..454c64f 100644 --- a/src/bin/e_comp_x.c +++ b/src/bin/e_comp_x.c @@ -1437,7 +1437,7 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore if (ev->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_X) { ec->comp_data->initial_attributes.x = ev->x; - if (e_config->screen_limits == E_SCREEN_LIMITS_WITHIN) + if (e_config->screen_limits == E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE) x = E_CLAMP(ev->x, zx, zx + zw - ec->w); else x = ev->x; @@ -1445,7 +1445,7 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore if (ev->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_Y) { ec->comp_data->initial_attributes.y = ev->y; - if (e_config->screen_limits == E_SCREEN_LIMITS_WITHIN) + if (e_config->screen_limits == E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE) y = E_CLAMP(ev->y, zy, zy + zh - ec->h); else y = ev->y; @@ -1486,13 +1486,13 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore { /* client is completely outside the screen, policy does not allow */ if (((!E_INTERSECTS(x, y, ec->w, ec->h, ec->comp->man->x, ec->comp->man->y, ec->comp->man->w - 5, ec->comp->man->h - 5)) && - (e_config->screen_limits != E_SCREEN_LIMITS_COMPLETELY)) || + (e_config->screen_limits != E_CLIENT_OFFSCREEN_LIMIT_ALLOW_FULL)) || /* client is partly outside the zone, policy does not allow */ (((!E_INSIDE(x, y, ec->comp->man->x, ec->comp->man->y, ec->comp->man->w - 5, ec->comp->man->h - 5)) && (!E_INSIDE(x + ec->w, y, ec->comp->man->x, ec->comp->man->y, ec->comp->man->w - 5, ec->comp->man->h - 5)) && (!E_INSIDE(x, y + ec->h, ec->comp->man->x, ec->comp->man->y, ec->comp->man->w - 5, ec->comp->man->h - 5)) && (!E_INSIDE(x + ec->w, y + ec->h, ec->comp->man->x, ec->comp->man->y, ec->comp->man->w - 5, ec->comp->man->h - 5))) && - (e_config->screen_limits == E_SCREEN_LIMITS_WITHIN)) + (e_config->screen_limits == E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE)) ) e_comp_object_util_center(ec->frame); else diff --git a/src/bin/e_int_menus.c b/src/bin/e_int_menus.c index 717b8c1..18c0eba 100644 --- a/src/bin/e_int_menus.c +++ b/src/bin/e_int_menus.c @@ -1476,7 +1476,7 @@ _e_int_menus_clients_pre_cb(void *data __UNUSED__, E_Menu *m) e_util_menu_item_theme_icon_set(mi, "preferences-system-windows"); e_menu_item_callback_set(mi, _e_int_menus_clients_cleanup_cb, zone); - if ((dat) && (e_config->screen_limits == E_SCREEN_LIMITS_COMPLETELY)) + if ((dat) && (e_config->screen_limits == E_CLIENT_OFFSCREEN_LIMIT_ALLOW_FULL)) { mi = e_menu_item_new(m); e_menu_item_separator_set(mi, 1); diff --git a/src/modules/conf_window_manipulation/e_int_config_window_display.c b/src/modules/conf_window_manipulation/e_int_config_window_display.c index 3110087..0e3e52d 100644 --- a/src/modules/conf_window_manipulation/e_int_config_window_display.c +++ b/src/modules/conf_window_manipulation/e_int_config_window_display.c @@ -243,13 +243,13 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data rg = e_widget_radio_group_new(&(cfdata->screen_limits)); - ow = e_widget_radio_add(evas, _("Keep windows within the visual screen limits"), E_SCREEN_LIMITS_WITHIN, rg); + ow = e_widget_radio_add(evas, _("Keep windows within the visual screen limits"), E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE, rg); e_widget_list_object_append(ol, ow, 1, 1, 0.5); - ow = e_widget_radio_add(evas, _("Allow windows partly out of the visual screen limits"), E_SCREEN_LIMITS_PARTLY, rg); + ow = e_widget_radio_add(evas, _("Allow windows partly out of the visual screen limits"), E_CLIENT_OFFSCREEN_LIMIT_ALLOW_PARTIAL, rg); e_widget_list_object_append(ol, ow, 1, 1, 0.5); - ow = e_widget_radio_add(evas, _("Allow windows completely out of visual screen limits"), E_SCREEN_LIMITS_COMPLETELY, rg); + ow = e_widget_radio_add(evas, _("Allow windows completely out of visual screen limits"), E_CLIENT_OFFSCREEN_LIMIT_ALLOW_FULL, rg); e_widget_list_object_append(ol, ow, 1, 1, 0.5); e_widget_toolbook_page_append(otb, NULL, _("Screen Limits"), ol, --