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.
This commit is contained in:
parent
1f21efd911
commit
23c4d42e4c
|
@ -961,7 +961,7 @@ _e_client_resize_handle(E_Client *ec)
|
||||||
|
|
||||||
w = new_w;
|
w = new_w;
|
||||||
h = new_h;
|
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);
|
w = MIN(w, ec->zone->w);
|
||||||
h = MIN(h, ec->zone->h);
|
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) &&
|
else if ((strncmp(ev->key, "Control", sizeof("Control") - 1) != 0) &&
|
||||||
(strncmp(ev->key, "Alt", sizeof("Alt") - 1) != 0))
|
(strncmp(ev->key, "Alt", sizeof("Alt") - 1) != 0))
|
||||||
goto stop;
|
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);
|
w = MIN(w, action_client->zone->w);
|
||||||
h = MIN(h, action_client->zone->h);
|
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);
|
e_zone_useful_geometry_get(ec->zone, &zx, &zy, &zw, &zh);
|
||||||
/* enforce wm size hints for initial sizing */
|
/* 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->w = MIN(ec->w, ec->zone->w);
|
||||||
ec->h = MIN(ec->h, ec->zone->h);
|
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))
|
(!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);
|
_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);
|
&new_x, &new_y, &new_w, &new_h);
|
||||||
eina_list_free(skiplist);
|
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);
|
_e_client_stay_within_canvas(ec, x, y, &new_x, &new_y);
|
||||||
|
|
||||||
ec->shelf_fix.x = 0;
|
ec->shelf_fix.x = 0;
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#ifdef E_TYPEDEFS
|
#ifdef E_TYPEDEFS
|
||||||
typedef enum _E_Screen_Limits
|
typedef enum _E_Client_Screen_Limit
|
||||||
{
|
{
|
||||||
E_SCREEN_LIMITS_PARTLY = 0,
|
E_CLIENT_OFFSCREEN_LIMIT_ALLOW_PARTIAL = 0,
|
||||||
E_SCREEN_LIMITS_COMPLETELY = 1,
|
E_CLIENT_OFFSCREEN_LIMIT_ALLOW_FULL = 1,
|
||||||
E_SCREEN_LIMITS_WITHIN = 2
|
E_CLIENT_OFFSCREEN_LIMIT_ALLOW_NONE = 2
|
||||||
} E_Screen_Limits;
|
} E_Client_Screen_Limit;
|
||||||
|
|
||||||
typedef enum _E_Icon_Preference
|
typedef enum _E_Icon_Preference
|
||||||
{
|
{
|
||||||
|
|
|
@ -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)
|
if (ev->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_X)
|
||||||
{
|
{
|
||||||
ec->comp_data->initial_attributes.x = ev->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);
|
x = E_CLAMP(ev->x, zx, zx + zw - ec->w);
|
||||||
else
|
else
|
||||||
x = ev->x;
|
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)
|
if (ev->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_Y)
|
||||||
{
|
{
|
||||||
ec->comp_data->initial_attributes.y = ev->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);
|
y = E_CLAMP(ev->y, zy, zy + zh - ec->h);
|
||||||
else
|
else
|
||||||
y = ev->y;
|
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 */
|
/* 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)) &&
|
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 */
|
/* 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, 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 + 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, 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_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);
|
e_comp_object_util_center(ec->frame);
|
||||||
else
|
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_util_menu_item_theme_icon_set(mi, "preferences-system-windows");
|
||||||
e_menu_item_callback_set(mi, _e_int_menus_clients_cleanup_cb, zone);
|
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);
|
mi = e_menu_item_new(m);
|
||||||
e_menu_item_separator_set(mi, 1);
|
e_menu_item_separator_set(mi, 1);
|
||||||
|
|
|
@ -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));
|
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);
|
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);
|
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_list_object_append(ol, ow, 1, 1, 0.5);
|
||||||
|
|
||||||
e_widget_toolbook_page_append(otb, NULL, _("Screen Limits"), ol,
|
e_widget_toolbook_page_append(otb, NULL, _("Screen Limits"), ol,
|
||||||
|
|
Loading…
Reference in New Issue