forked from enlightenment/enlightenment
Allows to focus a specified window on start using the remember settings.
This is for the users who don't want to give new windows by default the focus. SVN revision: 33268
This commit is contained in:
parent
38bf25eceb
commit
73672354b3
|
@ -5825,6 +5825,8 @@ _e_border_eval(E_Border *bd)
|
||||||
bd->user_skip_winlist = rem->prop.skip_winlist;
|
bd->user_skip_winlist = rem->prop.skip_winlist;
|
||||||
if (rem->apply & E_REMEMBER_APPLY_ICON_PREF)
|
if (rem->apply & E_REMEMBER_APPLY_ICON_PREF)
|
||||||
bd->icon_preference = rem->prop.icon_preference;
|
bd->icon_preference = rem->prop.icon_preference;
|
||||||
|
if (rem->apply & E_REMEMBER_SET_FOCUS_ON_START)
|
||||||
|
bd->want_focus = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ struct _E_Config_Dialog_Data
|
||||||
int apply_skip_winlist;
|
int apply_skip_winlist;
|
||||||
int apply_run;
|
int apply_run;
|
||||||
int apply_icon_pref;
|
int apply_icon_pref;
|
||||||
|
int set_focus_on_start;
|
||||||
} remember;
|
} remember;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -100,13 +101,16 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
||||||
if (cfdata->border->remember->apply & E_REMEMBER_APPLY_SKIP_WINLIST) cfdata->remember.apply_skip_winlist = 1;
|
if (cfdata->border->remember->apply & E_REMEMBER_APPLY_SKIP_WINLIST) cfdata->remember.apply_skip_winlist = 1;
|
||||||
if (cfdata->border->remember->apply & E_REMEMBER_APPLY_RUN) cfdata->remember.apply_run = 1;
|
if (cfdata->border->remember->apply & E_REMEMBER_APPLY_RUN) cfdata->remember.apply_run = 1;
|
||||||
if (cfdata->border->remember->apply & E_REMEMBER_APPLY_ICON_PREF) cfdata->remember.apply_icon_pref = 1;
|
if (cfdata->border->remember->apply & E_REMEMBER_APPLY_ICON_PREF) cfdata->remember.apply_icon_pref = 1;
|
||||||
|
if (cfdata->border->remember->apply & E_REMEMBER_SET_FOCUS_ON_START) cfdata->remember.set_focus_on_start = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!cfdata->border->remember) cfdata->mode = MODE_NOTHING;
|
if (!cfdata->border->remember) cfdata->mode = MODE_NOTHING;
|
||||||
else if ((cfdata->remember.apply_pos) && (cfdata->remember.apply_size) &&
|
else if ((cfdata->remember.apply_pos) && (cfdata->remember.apply_size) &&
|
||||||
(cfdata->remember.apply_locks) && (cfdata->remember.apply_layer) &&
|
(cfdata->remember.apply_locks) && (cfdata->remember.apply_layer) &&
|
||||||
(cfdata->remember.apply_border) && (cfdata->remember.apply_sticky) &&
|
(cfdata->remember.apply_border) && (cfdata->remember.apply_sticky) &&
|
||||||
(cfdata->remember.apply_desktop) && (cfdata->remember.apply_shade) &&
|
(cfdata->remember.apply_desktop) && (cfdata->remember.apply_shade) &&
|
||||||
(cfdata->remember.apply_zone) && (cfdata->remember.apply_skip_winlist))
|
(cfdata->remember.apply_zone) && (cfdata->remember.apply_skip_winlist) &&
|
||||||
|
(cfdata->remember.set_focus_on_start))
|
||||||
cfdata->mode = MODE_ALL;
|
cfdata->mode = MODE_ALL;
|
||||||
else if ((cfdata->remember.apply_pos) && (cfdata->remember.apply_size) &&
|
else if ((cfdata->remember.apply_pos) && (cfdata->remember.apply_size) &&
|
||||||
(cfdata->remember.apply_locks))
|
(cfdata->remember.apply_locks))
|
||||||
|
@ -291,7 +295,8 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||||
(cfdata->remember.apply_border) || (cfdata->remember.apply_sticky) ||
|
(cfdata->remember.apply_border) || (cfdata->remember.apply_sticky) ||
|
||||||
(cfdata->remember.apply_desktop) || (cfdata->remember.apply_shade) ||
|
(cfdata->remember.apply_desktop) || (cfdata->remember.apply_shade) ||
|
||||||
(cfdata->remember.apply_zone) || (cfdata->remember.apply_skip_winlist) ||
|
(cfdata->remember.apply_zone) || (cfdata->remember.apply_skip_winlist) ||
|
||||||
(cfdata->remember.apply_run) || (cfdata->remember.apply_icon_pref)))
|
(cfdata->remember.apply_run) || (cfdata->remember.apply_icon_pref) ||
|
||||||
|
(cfdata->remember.set_focus_on_start)))
|
||||||
{
|
{
|
||||||
if (cfdata->border->remember)
|
if (cfdata->border->remember)
|
||||||
{
|
{
|
||||||
|
@ -400,6 +405,8 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||||
if (cfdata->remember.apply_skip_winlist) cfdata->border->remember->apply |= E_REMEMBER_APPLY_SKIP_WINLIST;
|
if (cfdata->remember.apply_skip_winlist) cfdata->border->remember->apply |= E_REMEMBER_APPLY_SKIP_WINLIST;
|
||||||
if (cfdata->remember.apply_run) cfdata->border->remember->apply |= E_REMEMBER_APPLY_RUN;
|
if (cfdata->remember.apply_run) cfdata->border->remember->apply |= E_REMEMBER_APPLY_RUN;
|
||||||
if (cfdata->remember.apply_icon_pref) cfdata->border->remember->apply |= E_REMEMBER_APPLY_ICON_PREF;
|
if (cfdata->remember.apply_icon_pref) cfdata->border->remember->apply |= E_REMEMBER_APPLY_ICON_PREF;
|
||||||
|
if (cfdata->remember.set_focus_on_start) cfdata->border->remember->apply |= E_REMEMBER_SET_FOCUS_ON_START;
|
||||||
|
|
||||||
cfdata->border->remember->apply_first_only = cfdata->remember.apply_first_only;
|
cfdata->border->remember->apply_first_only = cfdata->remember.apply_first_only;
|
||||||
e_remember_update(cfdata->border->remember, cfdata->border);
|
e_remember_update(cfdata->border->remember, cfdata->border);
|
||||||
}
|
}
|
||||||
|
@ -519,5 +526,8 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
|
||||||
e_widget_list_object_append(o, ob, 1, 1, 0.5);
|
e_widget_list_object_append(o, ob, 1, 1, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ob = e_widget_check_add(evas, _("Always focus on start"), &(cfdata->remember.set_focus_on_start));
|
||||||
|
e_widget_list_object_append(o, ob, 1, 1, 0.5);
|
||||||
|
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ typedef struct _E_Remember E_Remember;
|
||||||
#define E_REMEMBER_APPLY_RUN (1 << 9)
|
#define E_REMEMBER_APPLY_RUN (1 << 9)
|
||||||
#define E_REMEMBER_APPLY_SKIP_WINLIST (1 << 10)
|
#define E_REMEMBER_APPLY_SKIP_WINLIST (1 << 10)
|
||||||
#define E_REMEMBER_APPLY_ICON_PREF (1 << 11)
|
#define E_REMEMBER_APPLY_ICON_PREF (1 << 11)
|
||||||
|
#define E_REMEMBER_SET_FOCUS_ON_START (1 << 12)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#ifndef E_REMEMBER_H
|
#ifndef E_REMEMBER_H
|
||||||
|
|
Loading…
Reference in New Issue