Added more advanced edge flipping configurations. This will reset the edge flip

configuration so some people may need to reconfigure it int Desktop Settings.


SVN revision: 24522
This commit is contained in:
Stafford Mitchell Horne 2006-08-10 05:01:07 +00:00
parent 3704e4ee1b
commit 45cce921c8
7 changed files with 98 additions and 28 deletions

View File

@ -335,7 +335,8 @@ e_config_init(void)
E_CONFIG_VAL(D, T, zone_desks_x_count, INT); /**/
E_CONFIG_VAL(D, T, zone_desks_y_count, INT); /**/
E_CONFIG_VAL(D, T, use_virtual_roots, INT); /* should not make this a config option (for now) */
E_CONFIG_VAL(D, T, use_edge_flip, INT); /**/
E_CONFIG_VAL(D, T, edge_flip_dragging, INT); /**/
E_CONFIG_VAL(D, T, edge_flip_moving, INT); /**/
E_CONFIG_VAL(D, T, edge_flip_timeout, DOUBLE); /**/
E_CONFIG_VAL(D, T, evas_engine_default, INT); /**/
E_CONFIG_VAL(D, T, evas_engine_container, INT); /**/
@ -531,7 +532,8 @@ e_config_init(void)
e_config->zone_desks_x_count = 4;
e_config->zone_desks_y_count = 1;
e_config->use_virtual_roots = 0;
e_config->use_edge_flip = 1;
e_config->edge_flip_dragging = 1;
e_config->edge_flip_moving = 1;
e_config->edge_flip_timeout = 0.25;
e_config->evas_engine_default = E_EVAS_ENGINE_SOFTWARE_X11;
e_config->evas_engine_container = E_EVAS_ENGINE_DEFAULT;
@ -1181,7 +1183,8 @@ e_config_init(void)
E_CONFIG_LIMIT(e_config->cache_flush_interval, 0.0, 600.0);
E_CONFIG_LIMIT(e_config->zone_desks_x_count, 1, 64);
E_CONFIG_LIMIT(e_config->zone_desks_y_count, 1, 64);
E_CONFIG_LIMIT(e_config->use_edge_flip, 0, 1);
E_CONFIG_LIMIT(e_config->edge_flip_dragging, 0, 1);
E_CONFIG_LIMIT(e_config->edge_flip_moving, 0, 1);
E_CONFIG_LIMIT(e_config->edge_flip_timeout, 0.0, 2.0);
E_CONFIG_LIMIT(e_config->window_placement_policy, E_WINDOW_PLACEMENT_SMART, E_WINDOW_PLACEMENT_MANUAL);
E_CONFIG_LIMIT(e_config->focus_policy, 0, 2);

View File

@ -50,7 +50,7 @@ typedef Eet_Data_Descriptor E_Config_DD;
/* increment this whenever a new set of config values are added but the users
* config doesn't need top be wiped - simply new values need to be put in
*/
#define E_CONFIG_FILE_GENERATION 0x0094
#define E_CONFIG_FILE_GENERATION 0x0095
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
#define E_EVAS_ENGINE_DEFAULT 0
@ -95,7 +95,8 @@ struct _E_Config
int zone_desks_x_count; // GUI
int zone_desks_y_count; // GUI
int use_virtual_roots;
int use_edge_flip; // GUI
int edge_flip_dragging;
int edge_flip_moving; // GUI
double edge_flip_timeout; // GUI
int evas_engine_default;
int evas_engine_container;

View File

@ -462,7 +462,14 @@ _e_drag_hide(E_Drag *drag)
static void
_e_drag_move(E_Drag *drag, int x, int y)
{
E_Zone *zone;
if (((drag->x + drag->dx) == x) && ((drag->y + drag->dy) == y)) return;
//FIXME: I think the timer needs to be cleaned up by passing (-1, -1) someplace
zone = e_container_zone_at_point_get(drag->container, x, y);
if (zone) e_zone_flip_coords_handle(zone, x, y);
drag->x = x - drag->dx;
drag->y = y - drag->dy;
ecore_evas_move(drag->ecore_evas,

View File

@ -17,9 +17,11 @@ struct _E_Config_Dialog_Data
/*- BASIC -*/
int x;
int y;
// int flip;
int edge_flip_basic;
/*- ADVANCED -*/
int use_edge_flip;
int edge_flip_moving;
int edge_flip_dragging;
double edge_flip_timeout;
int flip_wrap;
};
@ -51,7 +53,9 @@ _fill_data(E_Config_Dialog_Data *cfdata)
{
cfdata->x = e_config->zone_desks_x_count;
cfdata->y = e_config->zone_desks_y_count;
cfdata->use_edge_flip = e_config->use_edge_flip;
cfdata->edge_flip_basic = e_config->edge_flip_moving || e_config->edge_flip_dragging;
cfdata->edge_flip_moving = e_config->edge_flip_moving;
cfdata->edge_flip_dragging = e_config->edge_flip_dragging;
cfdata->edge_flip_timeout = e_config->edge_flip_timeout;
cfdata->flip_wrap = e_config->desk_flip_wrap;
}
@ -101,7 +105,8 @@ _basic_apply_data(E_Config_Dialog *cdd, E_Config_Dialog_Data *cfdata)
}
}
e_config->use_edge_flip = cfdata->use_edge_flip;
e_config->edge_flip_dragging = cfdata->edge_flip_basic;
e_config->edge_flip_moving = cfdata->edge_flip_basic;
e_zone_update_flip_all();
e_config_save_queue();
@ -131,7 +136,8 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
}
}
e_config->use_edge_flip = cfdata->use_edge_flip;
e_config->edge_flip_moving = cfdata->edge_flip_moving;
e_config->edge_flip_dragging = cfdata->edge_flip_dragging;
e_config->edge_flip_timeout = cfdata->edge_flip_timeout;
e_config->desk_flip_wrap = cfdata->flip_wrap;
@ -145,8 +151,8 @@ static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cdd, Evas *evas, E_Config_Dialog_Data *cfdata)
{
/* generate the core widget layout for a basic dialog */
Evas_Object *o, *ob, *of, *ot;
Evas_Object *o, *ob, *of, *ot;
o = e_widget_list_add(evas, 0, 0);
of = e_widget_framelist_add(evas, _("Number of Desktops"), 0);
@ -158,10 +164,11 @@ _basic_create_widgets(E_Config_Dialog *cdd, Evas *evas, E_Config_Dialog_Data *cf
e_widget_table_object_append(ot, ob, 0, 1, 1, 1, 1, 0, 1, 0);
e_widget_framelist_object_append(of, ot);
e_widget_list_object_append(o, of, 1, 1, 0.5);
of = e_widget_framelist_add(evas, _("Desktop Mouse Flip"), 0);
ob = e_widget_check_add(evas, _("Flip desktops when mouse at screen edge"), &(cfdata->use_edge_flip));
ob = e_widget_check_add(evas, _("Flip desktops when mouse at screen edge"), &(cfdata->edge_flip_basic));
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
return o;
@ -172,6 +179,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
{
/* generate the core widget layout for an advanced dialog */
Evas_Object *o, *ob, *of, *ot;
E_Radio_Group *rg;
o = e_widget_list_add(evas, 0, 0);
@ -186,13 +194,19 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
e_widget_list_object_append(o, of, 1, 1, 0.5);
of = e_widget_framelist_add(evas, _("Desktop Mouse Flip"), 0);
ob = e_widget_check_add(evas, _("Flip desktops when mouse at screen edge"), &(cfdata->use_edge_flip));
ob = e_widget_check_add(evas, _("Flip when moving mouse to the screen edge"), &(cfdata->edge_flip_moving));
e_widget_framelist_object_append(of, ob);
ob = e_widget_check_add(evas, _("Flip when dragging objects to the screen edge"), &(cfdata->edge_flip_dragging));
e_widget_framelist_object_append(of, ob);
ob = e_widget_label_add(evas, _("Time the mouse is at the edge before flipping:"));
e_widget_framelist_object_append(of, ob);
ob = e_widget_slider_add(evas, 1, 0, _("%1.1f sec"), 0.0, 2.0, 0.05, 0, &(cfdata->edge_flip_timeout), NULL, 200);
e_widget_framelist_object_append(of, ob);
ob = e_widget_check_add(evas, _("Wrap desktops around when flipping"), &(cfdata->flip_wrap));
e_widget_framelist_object_append(of, ob);

View File

@ -1838,15 +1838,15 @@ break;
#undef HDL
/****************************************************************************/
#define HDL E_IPC_OP_USE_EDGE_FLIP_SET
#define HDL E_IPC_OP_EDGE_FLIP_MOVING_SET
#if (TYPE == E_REMOTE_OPTIONS)
OP("-edge-flip-set", 1, "Set the edge flip flag (0/1)", 0, HDL)
OP("-edge-flip-moving-set", 1, "Set the edge flip while moving policy flag (0/1)", 0, HDL)
#elif (TYPE == E_REMOTE_OUT)
REQ_INT(atoi(params[0]), HDL);
#elif (TYPE == E_WM_IN)
START_INT(value, HDL);
e_config->use_edge_flip = value;
E_CONFIG_LIMIT(e_config->use_edge_flip, 0, 1);
e_config->edge_flip_moving = value;
E_CONFIG_LIMIT(e_config->edge_flip_moving, 0, 1);
e_zone_update_flip_all();
SAVE;
END_INT;
@ -1855,19 +1855,60 @@ break;
#undef HDL
/****************************************************************************/
#define HDL E_IPC_OP_USE_EDGE_FLIP_GET
#define HDL E_IPC_OP_EDGE_FLIP_MOVING_GET
#if (TYPE == E_REMOTE_OPTIONS)
OP("-edge-flip-get", 0, "Get the edge flip flag", 1, HDL)
OP("-edge-flip-moving-get", 0, "Get the edge flip while moving policy flag", 1, HDL)
#elif (TYPE == E_REMOTE_OUT)
REQ_NULL(HDL)
#elif (TYPE == E_WM_IN)
SEND_INT(e_config->use_edge_flip, E_IPC_OP_USE_EDGE_FLIP_GET_REPLY, HDL);
SEND_INT(e_config->edge_flip_moving, E_IPC_OP_EDGE_FLIP_MOVING_GET_REPLY, HDL);
#elif (TYPE == E_REMOTE_IN)
#endif
#undef HDL
/****************************************************************************/
#define HDL E_IPC_OP_USE_EDGE_FLIP_GET_REPLY
#define HDL E_IPC_OP_EDGE_FLIP_MOVING_GET_REPLY
#if (TYPE == E_REMOTE_OPTIONS)
#elif (TYPE == E_REMOTE_OUT)
#elif (TYPE == E_WM_IN)
#elif (TYPE == E_REMOTE_IN)
START_INT(val, HDL)
printf("REPLY: %i\n", val);
END_INT;
#endif
#undef HDL
/****************************************************************************/
#define HDL E_IPC_OP_EDGE_FLIP_DRAGGING_SET
#if (TYPE == E_REMOTE_OPTIONS)
OP("-edge-flip-dragging-set", 1, "Set the edge flip while dragging policy flag (0/1)", 0, HDL)
#elif (TYPE == E_REMOTE_OUT)
REQ_INT(atoi(params[0]), HDL);
#elif (TYPE == E_WM_IN)
START_INT(value, HDL);
e_config->edge_flip_dragging = value;
E_CONFIG_LIMIT(e_config->edge_flip_dragging, 0, 1);
e_zone_update_flip_all();
SAVE;
END_INT;
#elif (TYPE == E_REMOTE_IN)
#endif
#undef HDL
/****************************************************************************/
#define HDL E_IPC_OP_EDGE_FLIP_DRAGGING_GET
#if (TYPE == E_REMOTE_OPTIONS)
OP("-edge-flip-dragging-get", 0, "Get the edge flip while dragging policy flag", 1, HDL)
#elif (TYPE == E_REMOTE_OUT)
REQ_NULL(HDL)
#elif (TYPE == E_WM_IN)
SEND_INT(e_config->edge_flip_dragging, E_IPC_OP_EDGE_FLIP_DRAGGING_GET_REPLY, HDL);
#elif (TYPE == E_REMOTE_IN)
#endif
#undef HDL
/****************************************************************************/
#define HDL E_IPC_OP_EDGE_FLIP_DRAGGING_GET_REPLY
#if (TYPE == E_REMOTE_OPTIONS)
#elif (TYPE == E_REMOTE_OUT)
#elif (TYPE == E_WM_IN)

View File

@ -64,9 +64,9 @@
#define E_IPC_OP_FONT_CACHE_SET 64
#define E_IPC_OP_FONT_CACHE_GET 65
#define E_IPC_OP_FONT_CACHE_GET_REPLY 66
#define E_IPC_OP_USE_EDGE_FLIP_SET 67
#define E_IPC_OP_USE_EDGE_FLIP_GET 68
#define E_IPC_OP_USE_EDGE_FLIP_GET_REPLY 69
#define E_IPC_OP_EDGE_FLIP_MOVING_SET 67
#define E_IPC_OP_EDGE_FLIP_MOVING_GET 68
#define E_IPC_OP_EDGE_FLIP_MOVING_GET_REPLY 69
#define E_IPC_OP_EDGE_FLIP_TIMEOUT_SET 70
#define E_IPC_OP_EDGE_FLIP_TIMEOUT_GET 71
#define E_IPC_OP_EDGE_FLIP_TIMEOUT_GET_REPLY 72
@ -387,3 +387,7 @@
#define E_IPC_OP_FONT_HINTING_SET 357
#define E_IPC_OP_FONT_HINTING_GET 358
#define E_IPC_OP_FONT_HINTING_GET_REPLY 359
#define E_IPC_OP_EDGE_FLIP_DRAGGING_SET 360
#define E_IPC_OP_EDGE_FLIP_DRAGGING_GET 361
#define E_IPC_OP_EDGE_FLIP_DRAGGING_GET_REPLY 362

View File

@ -272,7 +272,7 @@ e_zone_flip_coords_handle(E_Zone *zone, int x, int y)
int one_row = 1;
int one_col = 1;
if (!e_config->use_edge_flip) return;
if (!e_config->edge_flip_dragging) return;
/* if we have only 1 row we can flip up/down even if we have xinerama */
if (evas_list_count(zone->container->zones) > 1)
{
@ -1024,7 +1024,7 @@ _e_zone_cb_desk_show(void *data, int type, void *event)
static void
_e_zone_update_flip(E_Zone *zone)
{
if (e_config->use_edge_flip)
if (e_config->edge_flip_moving)
{
/* if we have only 1 row we can flip up/down even if we have xinerama */
int one_row = 1;