aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2013-02-06 09:11:53 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2013-02-06 09:11:53 +0000
commit1231a2e4532a0c6cfad3c21a1383db5e0cd8c012 (patch)
tree9083d64b08743fe9b9d5a7214845f3f70807a3ac
parent7c4da3e8432ec6dc376d898cd51b53f1fab1c1ad (diff)
downloadenlightenment-1231a2e4532a0c6cfad3c21a1383db5e0cd8c012.tar.gz
enlightenment-1231a2e4532a0c6cfad3c21a1383db5e0cd8c012.tar.xz
enlightenment-1231a2e4532a0c6cfad3c21a1383db5e0cd8c012.zip
formatting
SVN revision: 83667
-rw-r--r--src/modules/conf_window_manipulation/e_int_config_focus.c201
1 files changed, 101 insertions, 100 deletions
diff --git a/src/modules/conf_window_manipulation/e_int_config_focus.c b/src/modules/conf_window_manipulation/e_int_config_focus.c
index 15e638f34..7c687b5d5 100644
--- a/src/modules/conf_window_manipulation/e_int_config_focus.c
+++ b/src/modules/conf_window_manipulation/e_int_config_focus.c
@@ -2,12 +2,12 @@
/* PROTOTYPES - same all the time */
-static void *_create_data(E_Config_Dialog *cfd);
-static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-static int _advanced_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
-static int _advanced_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+static void *_create_data(E_Config_Dialog *cfd);
+static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+static int _advanced_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
+static int _advanced_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
static Evas_Object *_advanced_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
@@ -15,24 +15,24 @@ static Evas_Object *_advanced_create(E_Config_Dialog *cfd, Evas *evas, E_Config_
struct _E_Config_Dialog_Data
{
/*- BASIC -*/
- int mode;
- int use_auto_raise;
+ int mode;
+ int use_auto_raise;
/*- ADVANCED -*/
- int focus_policy;
- int focus_setting;
- int pass_click_on;
- int window_activehint_policy;
- int always_click_to_raise;
- int always_click_to_focus;
- int focus_last_focused_per_desktop;
- int focus_revert_on_hide_or_close;
- int pointer_slide;
- int disable_all_pointer_warps;
+ int focus_policy;
+ int focus_setting;
+ int pass_click_on;
+ int window_activehint_policy;
+ int always_click_to_raise;
+ int always_click_to_focus;
+ int focus_last_focused_per_desktop;
+ int focus_revert_on_hide_or_close;
+ int pointer_slide;
+ int disable_all_pointer_warps;
double pointer_warp_speed;
double auto_raise_delay;
- int border_raise_on_mouse_action;
- int border_raise_on_focus;
- int allow_above_fullscreen;
+ int border_raise_on_mouse_action;
+ int border_raise_on_focus;
+ int allow_above_fullscreen;
};
/* a nice easy setup function that does the dirty work */
@@ -41,12 +41,12 @@ e_int_config_focus(E_Container *con, const char *params __UNUSED__)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
-
+
if (e_config_dialog_find("E", "windows/window_focus")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
-
+
/* methods */
- v->create_cfdata = _create_data;
+ v->create_cfdata = _create_data;
v->free_cfdata = _free_data;
v->basic.apply_cfdata = _basic_apply;
v->basic.create_widgets = _basic_create;
@@ -56,8 +56,8 @@ e_int_config_focus(E_Container *con, const char *params __UNUSED__)
v->advanced.check_changed = _advanced_check_changed;
/* create config diaolg for NULL object/data */
- cfd = e_config_dialog_new(con, _("Focus Settings"), "E",
- "windows/window_focus", "preferences-focus",
+ cfd = e_config_dialog_new(con, _("Focus Settings"), "E",
+ "windows/window_focus", "preferences-focus",
0, v, NULL);
return cfd;
}
@@ -72,9 +72,9 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cfdata->window_activehint_policy = e_config->window_activehint_policy;
cfdata->always_click_to_raise = e_config->always_click_to_raise;
cfdata->always_click_to_focus = e_config->always_click_to_focus;
- cfdata->focus_last_focused_per_desktop =
+ cfdata->focus_last_focused_per_desktop =
e_config->focus_last_focused_per_desktop;
- cfdata->focus_revert_on_hide_or_close =
+ cfdata->focus_revert_on_hide_or_close =
e_config->focus_revert_on_hide_or_close;
cfdata->pointer_slide = e_config->pointer_slide;
cfdata->disable_all_pointer_warps = e_config->disable_all_pointer_warps;
@@ -84,7 +84,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cfdata->use_auto_raise = e_config->use_auto_raise;
cfdata->auto_raise_delay = e_config->auto_raise_delay;
- cfdata->border_raise_on_mouse_action =
+ cfdata->border_raise_on_mouse_action =
e_config->border_raise_on_mouse_action;
cfdata->border_raise_on_focus = e_config->border_raise_on_focus;
cfdata->allow_above_fullscreen = e_config->allow_above_fullscreen;
@@ -98,7 +98,7 @@ _create_data(E_Config_Dialog *cfd __UNUSED__)
* the running systems/config in the apply methods
*/
E_Config_Dialog_Data *cfdata;
-
+
cfdata = E_NEW(E_Config_Dialog_Data, 1);
_fill_data(cfdata);
return cfdata;
@@ -118,42 +118,42 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
e_border_button_bindings_ungrab_all();
if (cfdata->mode == E_FOCUS_CLICK)
{
- e_config->focus_policy = E_FOCUS_CLICK;
- e_config->focus_setting = E_FOCUS_NEW_WINDOW;
- e_config->pass_click_on = 1;
- e_config->window_activehint_policy = 2;
- e_config->always_click_to_raise = 0;
- e_config->always_click_to_focus = 0;
- e_config->focus_last_focused_per_desktop = 1;
- e_config->focus_revert_on_hide_or_close = 1;
- e_config->pointer_slide = 0;
- e_config->disable_all_pointer_warps = 1;
+ e_config->focus_policy = E_FOCUS_CLICK;
+ e_config->focus_setting = E_FOCUS_NEW_WINDOW;
+ e_config->pass_click_on = 1;
+ e_config->window_activehint_policy = 2;
+ e_config->always_click_to_raise = 0;
+ e_config->always_click_to_focus = 0;
+ e_config->focus_last_focused_per_desktop = 1;
+ e_config->focus_revert_on_hide_or_close = 1;
+ e_config->pointer_slide = 0;
+ e_config->disable_all_pointer_warps = 1;
}
else if (cfdata->mode == E_FOCUS_MOUSE)
{
- e_config->focus_policy = E_FOCUS_MOUSE;
- e_config->focus_setting = E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED;
- e_config->pass_click_on = 1;
- e_config->window_activehint_policy = 2;
- e_config->always_click_to_raise = 0;
- e_config->always_click_to_focus = 0;
- e_config->focus_last_focused_per_desktop = 0;
- e_config->focus_revert_on_hide_or_close = 0;
- e_config->pointer_slide = 1;
- e_config->disable_all_pointer_warps = 0;
+ e_config->focus_policy = E_FOCUS_MOUSE;
+ e_config->focus_setting = E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED;
+ e_config->pass_click_on = 1;
+ e_config->window_activehint_policy = 2;
+ e_config->always_click_to_raise = 0;
+ e_config->always_click_to_focus = 0;
+ e_config->focus_last_focused_per_desktop = 0;
+ e_config->focus_revert_on_hide_or_close = 0;
+ e_config->pointer_slide = 1;
+ e_config->disable_all_pointer_warps = 0;
}
else
{
- e_config->focus_policy = E_FOCUS_SLOPPY;
- e_config->focus_setting = E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED;
- e_config->pass_click_on = 1;
- e_config->window_activehint_policy = 2;
- e_config->always_click_to_raise = 0;
- e_config->always_click_to_focus = 0;
- e_config->focus_last_focused_per_desktop = 1;
- e_config->focus_revert_on_hide_or_close = 1;
- e_config->pointer_slide = 1;
- e_config->disable_all_pointer_warps = 0;
+ e_config->focus_policy = E_FOCUS_SLOPPY;
+ e_config->focus_setting = E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED;
+ e_config->pass_click_on = 1;
+ e_config->window_activehint_policy = 2;
+ e_config->always_click_to_raise = 0;
+ e_config->always_click_to_focus = 0;
+ e_config->focus_last_focused_per_desktop = 1;
+ e_config->focus_revert_on_hide_or_close = 1;
+ e_config->pointer_slide = 1;
+ e_config->disable_all_pointer_warps = 0;
}
e_config->use_auto_raise = cfdata->use_auto_raise;
e_border_button_bindings_grab_all();
@@ -164,8 +164,8 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
static int
_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
- return ((e_config->focus_policy != cfdata->mode) ||
- (e_config->use_auto_raise != cfdata->use_auto_raise));
+ return (e_config->focus_policy != cfdata->mode) ||
+ (e_config->use_auto_raise != cfdata->use_auto_raise);
}
static int
@@ -179,9 +179,9 @@ _advanced_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
e_config->window_activehint_policy = cfdata->window_activehint_policy;
e_config->always_click_to_raise = cfdata->always_click_to_raise;
e_config->always_click_to_focus = cfdata->always_click_to_focus;
- e_config->focus_last_focused_per_desktop =
+ e_config->focus_last_focused_per_desktop =
cfdata->focus_last_focused_per_desktop;
- e_config->focus_revert_on_hide_or_close =
+ e_config->focus_revert_on_hide_or_close =
cfdata->focus_revert_on_hide_or_close;
e_config->pointer_slide = cfdata->pointer_slide;
e_config->disable_all_pointer_warps = cfdata->disable_all_pointer_warps;
@@ -200,22 +200,22 @@ _advanced_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
static int
_advanced_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
- return ((e_config->focus_policy != cfdata->focus_policy) ||
- (e_config->focus_setting != cfdata->focus_setting) ||
- (e_config->pass_click_on != cfdata->pass_click_on) ||
- (e_config->window_activehint_policy != cfdata->window_activehint_policy) ||
- (e_config->always_click_to_raise != cfdata->always_click_to_raise) ||
- (e_config->always_click_to_focus != cfdata->always_click_to_focus) ||
- (e_config->focus_last_focused_per_desktop != cfdata->focus_last_focused_per_desktop) ||
- (e_config->focus_revert_on_hide_or_close != cfdata->focus_revert_on_hide_or_close) ||
- (e_config->pointer_slide != cfdata->pointer_slide) ||
- (e_config->disable_all_pointer_warps != cfdata->disable_all_pointer_warps) ||
- (fabs(e_config->pointer_warp_speed - cfdata->pointer_warp_speed) < DBL_EPSILON) ||
- (e_config->use_auto_raise != cfdata->use_auto_raise) ||
- (e_config->auto_raise_delay != cfdata->auto_raise_delay) ||
- (e_config->border_raise_on_mouse_action != cfdata->border_raise_on_mouse_action) ||
- (e_config->border_raise_on_focus != cfdata->border_raise_on_focus) ||
- (e_config->allow_above_fullscreen != cfdata->allow_above_fullscreen));
+ return (e_config->focus_policy != cfdata->focus_policy) ||
+ (e_config->focus_setting != cfdata->focus_setting) ||
+ (e_config->pass_click_on != cfdata->pass_click_on) ||
+ (e_config->window_activehint_policy != cfdata->window_activehint_policy) ||
+ (e_config->always_click_to_raise != cfdata->always_click_to_raise) ||
+ (e_config->always_click_to_focus != cfdata->always_click_to_focus) ||
+ (e_config->focus_last_focused_per_desktop != cfdata->focus_last_focused_per_desktop) ||
+ (e_config->focus_revert_on_hide_or_close != cfdata->focus_revert_on_hide_or_close) ||
+ (e_config->pointer_slide != cfdata->pointer_slide) ||
+ (e_config->disable_all_pointer_warps != cfdata->disable_all_pointer_warps) ||
+ (fabs(e_config->pointer_warp_speed - cfdata->pointer_warp_speed) < DBL_EPSILON) ||
+ (e_config->use_auto_raise != cfdata->use_auto_raise) ||
+ (e_config->auto_raise_delay != cfdata->auto_raise_delay) ||
+ (e_config->border_raise_on_mouse_action != cfdata->border_raise_on_mouse_action) ||
+ (e_config->border_raise_on_focus != cfdata->border_raise_on_focus) ||
+ (e_config->allow_above_fullscreen != cfdata->allow_above_fullscreen);
}
/**--GUI--**/
@@ -232,10 +232,10 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data
e_widget_list_object_append(o, ob, 1, 0, 0.0);
ob = e_widget_radio_add(evas, _("Window under the Mouse"), E_FOCUS_MOUSE, rg);
e_widget_list_object_append(o, ob, 1, 0, 0.0);
- ob = e_widget_radio_add(evas, _("Most recent Window under the Mouse"),
+ ob = e_widget_radio_add(evas, _("Most recent Window under the Mouse"),
E_FOCUS_SLOPPY, rg);
e_widget_list_object_append(o, ob, 1, 0, 0.0);
- ob = e_widget_check_add(evas, _("Raise windows on mouse over"),
+ ob = e_widget_check_add(evas, _("Raise windows on mouse over"),
&(cfdata->use_auto_raise));
e_widget_list_object_append(o, ob, 1, 0, 0.5);
return o;
@@ -275,20 +275,20 @@ _advanced_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Da
E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED, rg);
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(ol, of, 1, 0, 0.5);
- e_widget_toolbook_page_append(otb, NULL, _("Focus"), ol,
+ e_widget_toolbook_page_append(otb, NULL, _("Focus"), ol,
1, 0, 1, 0, 0.5, 0.0);
/* Stacking */
ol = e_widget_list_add(evas, 0, 0);
of = e_widget_framelist_add(evas, _("Autoraise"), 0);
- autoraise_check = e_widget_check_add(evas, _("Raise windows on mouse over"),
+ autoraise_check = e_widget_check_add(evas, _("Raise windows on mouse over"),
&(cfdata->use_auto_raise));
e_widget_framelist_object_append(of, autoraise_check);
ob = e_widget_label_add(evas, _("Delay before raising:"));
e_widget_check_widget_disable_on_unchecked_add(autoraise_check, ob);
e_widget_framelist_object_append(of, ob);
- ob = e_widget_slider_add(evas, 1, 0, _("%1.1f s"), 0.0, 9.9, 0.1, 0,
+ ob = e_widget_slider_add(evas, 1, 0, _("%1.1f s"), 0.0, 9.9, 0.1, 0,
&(cfdata->auto_raise_delay), NULL, 100);
e_widget_check_widget_disable_on_unchecked_add(autoraise_check, ob);
e_widget_framelist_object_append(of, ob);
@@ -296,17 +296,17 @@ _advanced_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Da
of = e_widget_framelist_add(evas, _("Raise Window"), 0);
e_widget_framelist_content_align_set(of, 0.0, 0.0);
- ob = e_widget_check_add(evas, _("Raise when starting to move or resize"),
+ ob = e_widget_check_add(evas, _("Raise when starting to move or resize"),
&(cfdata->border_raise_on_mouse_action));
e_widget_framelist_object_append(of, ob);
- ob = e_widget_check_add(evas, _("Raise when focusing"),
+ ob = e_widget_check_add(evas, _("Raise when focusing"),
&(cfdata->border_raise_on_focus));
e_widget_framelist_object_append(of, ob);
- ob = e_widget_check_add(evas, _("Allow windows above fullscreen window"),
+ ob = e_widget_check_add(evas, _("Allow windows above fullscreen window"),
&(cfdata->allow_above_fullscreen));
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(ol, of, 1, 0, 0.5);
- e_widget_toolbook_page_append(otb, NULL, _("Stacking"), ol,
+ e_widget_toolbook_page_append(otb, NULL, _("Stacking"), ol,
1, 0, 1, 0, 0.5, 0.0);
/* Urgency */
@@ -318,7 +318,7 @@ _advanced_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Da
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Activate on hint"), E_ACTIVEHINT_POLICY_ACTIVATE, rg);
e_widget_framelist_object_append(of, ob);
- e_widget_toolbook_page_append(otb, NULL, _("Hints"), of,
+ e_widget_toolbook_page_append(otb, NULL, _("Hints"), of,
1, 0, 1, 0, 0.5, 0.0);
/* Pointer */
ol = e_widget_list_add(evas, 0, 0);
@@ -330,10 +330,10 @@ _advanced_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Da
* make sense to have one but not the other.
*/
- obp = ob = e_widget_check_add(evas, _("Prevent all forms of pointer warping"),
- &(cfdata->disable_all_pointer_warps));
+ obp = ob = e_widget_check_add(evas, _("Prevent all forms of pointer warping"),
+ &(cfdata->disable_all_pointer_warps));
e_widget_framelist_object_append(of, ob);
- ob = e_widget_check_add(evas, _("Slide pointer to a new window which is focused"),
+ ob = e_widget_check_add(evas, _("Slide pointer to a new window which is focused"),
&(cfdata->pointer_slide));
e_widget_framelist_object_append(of, ob);
e_widget_check_widget_disable_on_checked_add(obp, ob);
@@ -346,31 +346,32 @@ _advanced_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Da
e_widget_check_widget_disable_on_checked_add(obp, ob);
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(ol, of, 1, 0, 0.5);
- e_widget_toolbook_page_append(otb, NULL, _("Pointer"), ol,
+ e_widget_toolbook_page_append(otb, NULL, _("Pointer"), ol,
1, 0, 1, 0, 0.5, 0.0);
/* Misc */
ol = e_widget_list_add(evas, 0, 0);
of = e_widget_framelist_add(evas, _("Other Settings"), 0);
- ob = e_widget_check_add(evas, _("Always pass click events to programs"),
+ ob = e_widget_check_add(evas, _("Always pass click events to programs"),
&(cfdata->pass_click_on));
e_widget_framelist_object_append(of, ob);
- ob = e_widget_check_add(evas, _("Click raises the window"),
+ ob = e_widget_check_add(evas, _("Click raises the window"),
&(cfdata->always_click_to_raise));
e_widget_framelist_object_append(of, ob);
- ob = e_widget_check_add(evas, _("Click focuses the window"),
+ ob = e_widget_check_add(evas, _("Click focuses the window"),
&(cfdata->always_click_to_focus));
e_widget_framelist_object_append(of, ob);
- ob = e_widget_check_add(evas, _("Refocus last window on desktop switch"),
+ ob = e_widget_check_add(evas, _("Refocus last window on desktop switch"),
&(cfdata->focus_last_focused_per_desktop));
e_widget_framelist_object_append(of, ob);
- ob = e_widget_check_add(evas, _("Focus last focused window on lost focus"),
+ ob = e_widget_check_add(evas, _("Focus last focused window on lost focus"),
&(cfdata->focus_revert_on_hide_or_close));
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(ol, of, 1, 0, 0.5);
- e_widget_toolbook_page_append(otb, NULL, _("Miscellaneous"), ol,
+ e_widget_toolbook_page_append(otb, NULL, _("Miscellaneous"), ol,
1, 0, 1, 0, 0.5, 0.0);
e_widget_toolbook_page_show(otb, 0);
return otb;
}
+