allow comp matching for UNKNOWN type windows

sometimes this is a valid type and we want to match it
devs/stefan/wl-session-recovery
Mike Blumenkrantz 8 years ago
parent 4d67584970
commit 7f63c4ec2d
  1. 7
      src/bin/e_client.h
  2. 14
      src/bin/e_comp_object.c
  3. 4
      src/bin/e_int_config_comp_match.c

@ -66,7 +66,12 @@ typedef enum
E_WINDOW_TYPE_TOOLTIP,
E_WINDOW_TYPE_NOTIFICATION,
E_WINDOW_TYPE_COMBO,
E_WINDOW_TYPE_DND
E_WINDOW_TYPE_DND,
/* since UNKNOWN was used improperly in comp matching,
* this value is a placeholder to indicate that we want
* only type UNKNOWN windows
*/
E_WINDOW_TYPE_REAL_UNKNOWN = 999
} E_Window_Type;
typedef enum _E_Urgency_Policy

@ -373,10 +373,16 @@ _e_comp_object_shadow_client_match(const E_Client *ec, E_Comp_Match *m)
if (((m->role) && (!ec->icccm.window_role)) ||
((ec->icccm.window_role) && (m->role) && (!e_util_glob_match(ec->icccm.window_role, m->role))))
return EINA_FALSE;
if ((ec->netwm.type != E_WINDOW_TYPE_UNKNOWN) &&
(m->primary_type != E_WINDOW_TYPE_UNKNOWN) &&
((int)ec->netwm.type != m->primary_type))
return EINA_FALSE;
if (m->primary_type)
{
if (ec->netwm.type)
{
if ((int)ec->netwm.type != m->primary_type)
return EINA_FALSE;
}
else if (m->primary_type != E_WINDOW_TYPE_REAL_UNKNOWN)
return EINA_FALSE;
}
if (m->borderless != 0)
{
int borderless = 0;

@ -100,6 +100,8 @@ _match_type_label_get(int type)
return _("Tooltip");
if (E_WINDOW_TYPE_UTILITY == type)
return _("Utility");
if (E_WINDOW_TYPE_REAL_UNKNOWN == type)
return _("Unknown");
return _("Unused");
}
@ -422,6 +424,8 @@ _create_edit_frame(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdat
e_widget_list_object_append(li, o, 1, 0, 0.0);
o = e_widget_radio_add(evas, _("Utility"), E_WINDOW_TYPE_UTILITY, rg);
e_widget_list_object_append(li, o, 1, 0, 0.0);
o = e_widget_radio_add(evas, _("Unknown"), E_WINDOW_TYPE_REAL_UNKNOWN, rg);
e_widget_list_object_append(li, o, 1, 0, 0.0);
e_widget_size_min_get(li, &mw, &mh);
evas_object_resize(li, mw, mh);

Loading…
Cancel
Save