right now this uses the "urgent" signal for the animate state, may want to change it to something else if separate theming is desired
ticket #1642
SVN revision: 78647
E_FOCUS_SLOPPY
} E_Focus_Policy;
+typedef enum _E_Urgency_Policy
+{
+ E_ACTIVEHINT_POLICY_IGNORE,
+ E_ACTIVEHINT_POLICY_ANIMATE,
+ E_ACTIVEHINT_POLICY_ACTIVATE
+} E_Urgency_Policy;
+
typedef enum _E_Focus_Setting
{
E_FOCUS_NONE,
E_CONFIG_VAL(D, T, focus_policy, INT); /**/
E_CONFIG_VAL(D, T, focus_setting, INT); /**/
E_CONFIG_VAL(D, T, pass_click_on, INT); /**/
+ E_CONFIG_VAL(D, T, window_activehint_policy, INT); /**/
E_CONFIG_VAL(D, T, always_click_to_raise, INT); /**/
E_CONFIG_VAL(D, T, always_click_to_focus, INT); /**/
E_CONFIG_VAL(D, T, use_auto_raise, INT); /**/
e_config->xkb.desklock_layout = NULL;
IFCFGEND;
+ IFCFG(0x0160);
+ e_config->window_activehint_policy = 2;
+ IFCFGEND;
+
e_config->config_version = E_CONFIG_FILE_VERSION;
_e_config_free(tcfg);
}
E_CONFIG_LIMIT(e_config->focus_policy, 0, 2);
E_CONFIG_LIMIT(e_config->focus_setting, 0, 3);
E_CONFIG_LIMIT(e_config->pass_click_on, 0, 1);
+ E_CONFIG_LIMIT(e_config->window_activehint_policy, 0, 2);
E_CONFIG_LIMIT(e_config->always_click_to_raise, 0, 1);
E_CONFIG_LIMIT(e_config->always_click_to_focus, 0, 1);
E_CONFIG_LIMIT(e_config->use_auto_raise, 0, 1);
/* increment this whenever a new set of config values are added but the users
* config doesn't need to be wiped - simply new values need to be put in
*/
-#define E_CONFIG_FILE_GENERATION 0x0159
+#define E_CONFIG_FILE_GENERATION 0x0160
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
struct _E_Config
int focus_policy; // GUI
int focus_setting; // GUI
int pass_click_on; // GUI
+ int window_activehint_policy; // GUI
int always_click_to_raise; // GUI
int always_click_to_focus; // GUI
int use_auto_raise; // GUI
e = ev;
- if (e->message_type == ECORE_X_ATOM_NET_ACTIVE_WINDOW)
- {
- bd = e_border_find_by_client_window(e->win);
- if (bd)
- {
+ if (e->message_type != ECORE_X_ATOM_NET_ACTIVE_WINDOW) return ECORE_CALLBACK_RENEW;
+ bd = e_border_find_by_client_window(e->win);
+ if (!bd) return ECORE_CALLBACK_RENEW;
#if 0 /* notes */
- if (e->data.l[0] == 0 /* 0 == old, 1 == client, 2 == pager */)
- {
- // FIXME: need config for the below - what to do given each
- // request (either do nothng, make app look urgent/want
- // attention or actiually flip to app as below is the
- // current default)
- // if 0 == just make app demand attention somehow
- // if 1 == just make app demand attention somehow
- // if 2 == activate window as below
- }
- timestamp = e->data.l[1];
- requestor_id e->data.l[2];
+ if (e->data.l[0] == 0 /* 0 == old, 1 == client, 2 == pager */)
+ {
+ }
+ timestamp = e->data.l[1];
+ requestor_id e->data.l[2];
#endif
- if (!bd->focused) e_border_activate(bd, EINA_FALSE);
- else e_border_raise(bd);
- }
+ switch (e_config->window_activehint_policy)
+ {
+ case 0: break;
+ case 1:
+ edje_object_signal_emit(bd->bg_object, "e,state,urgent", "e");
+ break;
+ default:
+ if (!bd->focused) e_border_activate(bd, EINA_FALSE);
+ else e_border_raise(bd);
}
return ECORE_CALLBACK_PASS_ON;
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;
cfdata->focus_policy = e_config->focus_policy;
cfdata->focus_setting = e_config->focus_setting;
cfdata->pass_click_on = e_config->pass_click_on;
+ 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 =
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_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_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_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 =
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_widget_toolbook_page_append(otb, NULL, _("Stacking"), ol,
1, 0, 1, 0, 0.5, 0.0);
+ /* Urgency */
+ of = e_widget_framelist_add(evas, _("Active Window Hint Policy"), 0);
+ rg = e_widget_radio_group_new(&cfdata->window_activehint_policy);
+ ob = e_widget_radio_add(evas, _("Ignore hint"), E_ACTIVEHINT_POLICY_IGNORE, rg);
+ e_widget_framelist_object_append(of, ob);
+ ob = e_widget_radio_add(evas, _("Animate on hint"), E_ACTIVEHINT_POLICY_ANIMATE, rg);
+ 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,
+ 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);