added two new configuration options for the geometry_manipulation conf plugin:
int geometry_auto_move; // GUI int geometry_auto_resize_limit; // GUI This does influence the configure_request algorithm in the way that the user could disable the window geometry move and resize feature that is useful for e.g. Gnome fileselector or gnome-terminal tabs. There was a use case on the list where this was not nice so I created an option to disable it. If one thinks a special e.src shouldn't activate this feature by default, please change it. SVN revision: 50083
This commit is contained in:
parent
18a8c0961c
commit
6e35928dea
|
@ -366,6 +366,8 @@ group "E_Config" struct {
|
||||||
value "desk_resist" int: 32;
|
value "desk_resist" int: 32;
|
||||||
value "window_resist" int: 12;
|
value "window_resist" int: 12;
|
||||||
value "gadget_resist" int: 32;
|
value "gadget_resist" int: 32;
|
||||||
|
value "geometry_auto_resize_limit" int: 1;
|
||||||
|
value "geometry_auto_move" int: 1;
|
||||||
value "winlist_warp_while_selecting" int: 0;
|
value "winlist_warp_while_selecting" int: 0;
|
||||||
value "winlist_warp_at_end" int: 1;
|
value "winlist_warp_at_end" int: 1;
|
||||||
value "winlist_warp_speed" double: 0.1000000014901161193847656;
|
value "winlist_warp_speed" double: 0.1000000014901161193847656;
|
||||||
|
|
|
@ -1293,6 +1293,8 @@ group "E_Config" struct {
|
||||||
value "desk_resist" int: 32;
|
value "desk_resist" int: 32;
|
||||||
value "window_resist" int: 12;
|
value "window_resist" int: 12;
|
||||||
value "gadget_resist" int: 32;
|
value "gadget_resist" int: 32;
|
||||||
|
value "geometry_auto_resize_limit" int: 1;
|
||||||
|
value "geometry_auto_move" int: 1;
|
||||||
value "winlist_warp_while_selecting" int: 1;
|
value "winlist_warp_while_selecting" int: 1;
|
||||||
value "winlist_warp_at_end" int: 1;
|
value "winlist_warp_at_end" int: 1;
|
||||||
value "winlist_warp_speed" double: 0.1000000000000000055511151;
|
value "winlist_warp_speed" double: 0.1000000000000000055511151;
|
||||||
|
|
|
@ -427,6 +427,8 @@ group "E_Config" struct {
|
||||||
value "desk_resist" int: 32;
|
value "desk_resist" int: 32;
|
||||||
value "window_resist" int: 12;
|
value "window_resist" int: 12;
|
||||||
value "gadget_resist" int: 32;
|
value "gadget_resist" int: 32;
|
||||||
|
value "geometry_auto_resize_limit" int: 1;
|
||||||
|
value "geometry_auto_move" int: 1;
|
||||||
value "winlist_warp_while_selecting" int: 1;
|
value "winlist_warp_while_selecting" int: 1;
|
||||||
value "winlist_warp_at_end" int: 1;
|
value "winlist_warp_at_end" int: 1;
|
||||||
value "winlist_warp_speed" double: 0.1000000000000000055511151;
|
value "winlist_warp_speed" double: 0.1000000000000000055511151;
|
||||||
|
|
|
@ -1397,6 +1397,8 @@ group "E_Config" struct {
|
||||||
value "desk_resist" int: 32;
|
value "desk_resist" int: 32;
|
||||||
value "window_resist" int: 12;
|
value "window_resist" int: 12;
|
||||||
value "gadget_resist" int: 32;
|
value "gadget_resist" int: 32;
|
||||||
|
value "geometry_auto_resize_limit" int: 1;
|
||||||
|
value "geometry_auto_move" int: 1;
|
||||||
value "winlist_warp_while_selecting" int: 1;
|
value "winlist_warp_while_selecting" int: 1;
|
||||||
value "winlist_warp_at_end" int: 1;
|
value "winlist_warp_at_end" int: 1;
|
||||||
value "winlist_warp_speed" double: 0.1000000000000000055511151;
|
value "winlist_warp_speed" double: 0.1000000000000000055511151;
|
||||||
|
|
|
@ -1461,6 +1461,8 @@ group "E_Config" struct {
|
||||||
value "desk_resist" int: 32;
|
value "desk_resist" int: 32;
|
||||||
value "window_resist" int: 12;
|
value "window_resist" int: 12;
|
||||||
value "gadget_resist" int: 32;
|
value "gadget_resist" int: 32;
|
||||||
|
value "geometry_auto_resize_limit" int: 1;
|
||||||
|
value "geometry_auto_move" int: 1;
|
||||||
value "winlist_warp_while_selecting" int: 1;
|
value "winlist_warp_while_selecting" int: 1;
|
||||||
value "winlist_warp_at_end" int: 1;
|
value "winlist_warp_at_end" int: 1;
|
||||||
value "winlist_warp_speed" double: 0.1000000000000000055511151;
|
value "winlist_warp_speed" double: 0.1000000000000000055511151;
|
||||||
|
|
|
@ -1484,6 +1484,8 @@ group "E_Config" struct {
|
||||||
value "desk_resist" int: 32;
|
value "desk_resist" int: 32;
|
||||||
value "window_resist" int: 12;
|
value "window_resist" int: 12;
|
||||||
value "gadget_resist" int: 32;
|
value "gadget_resist" int: 32;
|
||||||
|
value "geometry_auto_resize_limit" int: 1;
|
||||||
|
value "geometry_auto_move" int: 1;
|
||||||
value "winlist_warp_while_selecting" int: 1;
|
value "winlist_warp_while_selecting" int: 1;
|
||||||
value "winlist_warp_at_end" int: 1;
|
value "winlist_warp_at_end" int: 1;
|
||||||
value "winlist_warp_speed" double: 0.1000000000000000055511151;
|
value "winlist_warp_speed" double: 0.1000000000000000055511151;
|
||||||
|
|
|
@ -1594,6 +1594,8 @@ group "E_Config" struct {
|
||||||
value "desk_resist" int: 32;
|
value "desk_resist" int: 32;
|
||||||
value "window_resist" int: 12;
|
value "window_resist" int: 12;
|
||||||
value "gadget_resist" int: 32;
|
value "gadget_resist" int: 32;
|
||||||
|
value "geometry_auto_resize_limit" int: 1;
|
||||||
|
value "geometry_auto_move" int: 1;
|
||||||
value "winlist_warp_while_selecting" int: 1;
|
value "winlist_warp_while_selecting" int: 1;
|
||||||
value "winlist_warp_at_end" int: 1;
|
value "winlist_warp_at_end" int: 1;
|
||||||
value "winlist_warp_speed" double: 0.1000000000000000055511151;
|
value "winlist_warp_speed" double: 0.1000000000000000055511151;
|
||||||
|
|
|
@ -4297,28 +4297,35 @@ _e_border_cb_window_configure_request(__UNUSED__ void *data, __UNUSED__ int ev_t
|
||||||
* X configure request into an useful geometry.
|
* X configure request into an useful geometry.
|
||||||
* This is really useful for size jumping file dialogs.
|
* This is really useful for size jumping file dialogs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
if (bd->zone)
|
if (bd->zone)
|
||||||
e_zone_useful_geometry_get(bd->zone, &zx, &zy, &zw, &zh);
|
e_zone_useful_geometry_get(bd->zone, &zx, &zy, &zw, &zh);
|
||||||
|
|
||||||
if (w > zw)
|
if (e_config->geometry_auto_resize_limit == 1)
|
||||||
w = zw;
|
{
|
||||||
|
if (w > zw)
|
||||||
|
w = zw;
|
||||||
|
|
||||||
if (h > zh)
|
if (h > zh)
|
||||||
h = zh;
|
h = zh;
|
||||||
|
}
|
||||||
|
|
||||||
e_border_resize(bd, w, h);
|
e_border_resize(bd, w, h);
|
||||||
|
|
||||||
// move window horizontal if resize to not useful geometry
|
if (e_config->geometry_auto_move == 1)
|
||||||
if (bd->x + bd->w > zx + zw)
|
{
|
||||||
rx = zx + zw - bd->w;
|
// move window horizontal if resize to not useful geometry
|
||||||
|
if (bd->x + bd->w > zx + zw)
|
||||||
|
rx = zx + zw - bd->w;
|
||||||
|
|
||||||
// move window vertical if resize to not useful geometry
|
// move window vertical if resize to not useful geometry
|
||||||
if (bd->y + bd->h > zy + zh)
|
if (bd->y + bd->h > zy + zh)
|
||||||
ry = zy + zh - bd->h;
|
ry = zy + zh - bd->h;
|
||||||
|
|
||||||
e_border_move(bd, rx, ry);
|
e_border_move(bd, rx, ry);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -548,6 +548,8 @@ e_config_init(void)
|
||||||
E_CONFIG_VAL(D, T, desk_resist, INT); /**/
|
E_CONFIG_VAL(D, T, desk_resist, INT); /**/
|
||||||
E_CONFIG_VAL(D, T, window_resist, INT); /**/
|
E_CONFIG_VAL(D, T, window_resist, INT); /**/
|
||||||
E_CONFIG_VAL(D, T, gadget_resist, INT); /**/
|
E_CONFIG_VAL(D, T, gadget_resist, INT); /**/
|
||||||
|
E_CONFIG_VAL(D, T, geometry_auto_resize_limit, INT); /**/
|
||||||
|
E_CONFIG_VAL(D, T, geometry_auto_move, INT); /**/
|
||||||
E_CONFIG_VAL(D, T, winlist_warp_while_selecting, INT); /**/
|
E_CONFIG_VAL(D, T, winlist_warp_while_selecting, INT); /**/
|
||||||
E_CONFIG_VAL(D, T, winlist_warp_at_end, INT); /**/
|
E_CONFIG_VAL(D, T, winlist_warp_at_end, INT); /**/
|
||||||
E_CONFIG_VAL(D, T, winlist_warp_speed, DOUBLE); /**/
|
E_CONFIG_VAL(D, T, winlist_warp_speed, DOUBLE); /**/
|
||||||
|
@ -1040,6 +1042,8 @@ e_config_load(void)
|
||||||
E_CONFIG_LIMIT(e_config->desk_resist, 0, 100);
|
E_CONFIG_LIMIT(e_config->desk_resist, 0, 100);
|
||||||
E_CONFIG_LIMIT(e_config->window_resist, 0, 100);
|
E_CONFIG_LIMIT(e_config->window_resist, 0, 100);
|
||||||
E_CONFIG_LIMIT(e_config->gadget_resist, 0, 100);
|
E_CONFIG_LIMIT(e_config->gadget_resist, 0, 100);
|
||||||
|
E_CONFIG_LIMIT(e_config->geometry_auto_move, 0, 1);
|
||||||
|
E_CONFIG_LIMIT(e_config->geometry_auto_resize_limit, 0, 1);
|
||||||
E_CONFIG_LIMIT(e_config->winlist_warp_while_selecting, 0, 1);
|
E_CONFIG_LIMIT(e_config->winlist_warp_while_selecting, 0, 1);
|
||||||
E_CONFIG_LIMIT(e_config->winlist_warp_at_end, 0, 1);
|
E_CONFIG_LIMIT(e_config->winlist_warp_at_end, 0, 1);
|
||||||
E_CONFIG_LIMIT(e_config->winlist_warp_speed, 0.0, 1.0);
|
E_CONFIG_LIMIT(e_config->winlist_warp_speed, 0.0, 1.0);
|
||||||
|
|
|
@ -127,6 +127,8 @@ struct _E_Config
|
||||||
int desk_resist; // GUI
|
int desk_resist; // GUI
|
||||||
int window_resist; // GUI
|
int window_resist; // GUI
|
||||||
int gadget_resist; // GUI
|
int gadget_resist; // GUI
|
||||||
|
int geometry_auto_move; // GUI
|
||||||
|
int geometry_auto_resize_limit; // GUI
|
||||||
int winlist_warp_while_selecting; // GUI
|
int winlist_warp_while_selecting; // GUI
|
||||||
int winlist_warp_at_end; // GUI
|
int winlist_warp_at_end; // GUI
|
||||||
double winlist_warp_speed; // GUI
|
double winlist_warp_speed; // GUI
|
||||||
|
|
|
@ -18,6 +18,8 @@ struct _E_Config_Dialog_Data
|
||||||
int desk_resist;
|
int desk_resist;
|
||||||
int window_resist;
|
int window_resist;
|
||||||
int gadget_resist;
|
int gadget_resist;
|
||||||
|
int geometry_auto_resize_limit;
|
||||||
|
int geometry_auto_move;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
double timeout;
|
double timeout;
|
||||||
|
@ -66,6 +68,8 @@ _create_data(E_Config_Dialog *cfd __UNUSED__)
|
||||||
cfdata->desk_resist = e_config->desk_resist;
|
cfdata->desk_resist = e_config->desk_resist;
|
||||||
cfdata->window_resist = e_config->window_resist;
|
cfdata->window_resist = e_config->window_resist;
|
||||||
cfdata->gadget_resist = e_config->gadget_resist;
|
cfdata->gadget_resist = e_config->gadget_resist;
|
||||||
|
cfdata->geometry_auto_resize_limit = e_config->geometry_auto_resize_limit;
|
||||||
|
cfdata->geometry_auto_move = e_config->geometry_auto_move;
|
||||||
cfdata->border_keyboard.timeout = e_config->border_keyboard.timeout;
|
cfdata->border_keyboard.timeout = e_config->border_keyboard.timeout;
|
||||||
cfdata->border_keyboard.move.dx = e_config->border_keyboard.move.dx;
|
cfdata->border_keyboard.move.dx = e_config->border_keyboard.move.dx;
|
||||||
// cfdata->border_keyboard.move.dy = e_config->border_keyboard.move.dy;
|
// cfdata->border_keyboard.move.dy = e_config->border_keyboard.move.dy;
|
||||||
|
@ -88,6 +92,8 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
||||||
e_config->desk_resist = cfdata->desk_resist;
|
e_config->desk_resist = cfdata->desk_resist;
|
||||||
e_config->window_resist = cfdata->window_resist;
|
e_config->window_resist = cfdata->window_resist;
|
||||||
e_config->gadget_resist = cfdata->gadget_resist;
|
e_config->gadget_resist = cfdata->gadget_resist;
|
||||||
|
e_config->geometry_auto_resize_limit = cfdata->geometry_auto_resize_limit;
|
||||||
|
e_config->geometry_auto_move = cfdata->geometry_auto_move;
|
||||||
e_config->border_keyboard.timeout = cfdata->border_keyboard.timeout;
|
e_config->border_keyboard.timeout = cfdata->border_keyboard.timeout;
|
||||||
e_config->border_keyboard.move.dx = cfdata->border_keyboard.move.dx;
|
e_config->border_keyboard.move.dx = cfdata->border_keyboard.move.dx;
|
||||||
// e_config->border_keyboard.move.dy = cfdata->border_keyboard.move.dy;
|
// e_config->border_keyboard.move.dy = cfdata->border_keyboard.move.dy;
|
||||||
|
@ -106,6 +112,8 @@ _basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfda
|
||||||
(e_config->desk_resist != cfdata->desk_resist) ||
|
(e_config->desk_resist != cfdata->desk_resist) ||
|
||||||
(e_config->window_resist != cfdata->window_resist) ||
|
(e_config->window_resist != cfdata->window_resist) ||
|
||||||
(e_config->gadget_resist != cfdata->gadget_resist) ||
|
(e_config->gadget_resist != cfdata->gadget_resist) ||
|
||||||
|
(e_config->geometry_auto_resize_limit != cfdata->geometry_auto_resize_limit) ||
|
||||||
|
(e_config->geometry_auto_move != cfdata->geometry_auto_move) ||
|
||||||
(e_config->border_keyboard.timeout != cfdata->border_keyboard.timeout) ||
|
(e_config->border_keyboard.timeout != cfdata->border_keyboard.timeout) ||
|
||||||
(e_config->border_keyboard.move.dx != cfdata->border_keyboard.move.dx) ||
|
(e_config->border_keyboard.move.dx != cfdata->border_keyboard.move.dx) ||
|
||||||
(e_config->border_keyboard.move.dy != cfdata->border_keyboard.move.dx) ||
|
(e_config->border_keyboard.move.dy != cfdata->border_keyboard.move.dx) ||
|
||||||
|
@ -176,6 +184,15 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dial
|
||||||
e_widget_framelist_object_append(of, ob);
|
e_widget_framelist_object_append(of, ob);
|
||||||
e_widget_list_object_append(o, of, 1, 0, 0.5);
|
e_widget_list_object_append(o, of, 1, 0, 0.5);
|
||||||
|
|
||||||
|
of = e_widget_framelist_add(evas, _("Automatic move and resize"), 0);
|
||||||
|
ob = e_widget_check_add(evas, _("Limit resize on window configure request to useful geometry"),
|
||||||
|
&(cfdata->geometry_auto_resize_limit));
|
||||||
|
e_widget_framelist_object_append(of, ob);
|
||||||
|
ob = e_widget_check_add(evas, _("Move after resize on window configure request"),
|
||||||
|
&(cfdata->geometry_auto_move));
|
||||||
|
e_widget_framelist_object_append(of, ob);
|
||||||
|
e_widget_list_object_append(o, of, 1, 0, 0.5);
|
||||||
|
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue