forked from enlightenment/enlightenment
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. backported to avoid future backport conflicts
This commit is contained in:
parent
7ea12ff367
commit
2d4929e68e
|
@ -973,7 +973,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);
|
||||
|
@ -1076,7 +1076,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);
|
||||
|
@ -1709,7 +1709,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);
|
||||
|
@ -2340,7 +2340,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);
|
||||
}
|
||||
}
|
||||
|
@ -2908,7 +2908,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;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -2852,7 +2852,7 @@ _e_comp_wl_cb_hook_client_eval_fetch(void *data EINA_UNUSED, E_Client *ec)
|
|||
|
||||
e_zone_useful_geometry_get(ec->zone, &zx, &zy, &zw, &zh);
|
||||
|
||||
if (e_config->screen_limits == E_SCREEN_LIMITS_WITHIN)
|
||||
if (e_config->screen_limits == E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE)
|
||||
{
|
||||
x = E_CLAMP(ec->x, zx, zx + zw - ec->w);
|
||||
y = E_CLAMP(ec->y, zy, zy + zh - ec->h);
|
||||
|
@ -2883,13 +2883,13 @@ _e_comp_wl_cb_hook_client_eval_fetch(void *data EINA_UNUSED, E_Client *ec)
|
|||
{
|
||||
/* 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
|
||||
|
|
|
@ -1450,7 +1450,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;
|
||||
|
@ -1458,7 +1458,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;
|
||||
|
@ -1499,13 +1499,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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -242,13 +242,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,
|
||||
|
|
Loading…
Reference in New Issue