e_client_border_set(ec, bordername);
}
+static Eina_Bool
+_e_client_type_match(E_Client *ec, E_Config_Client_Type *m)
+{
+ if (!ec || !m) return EINA_FALSE;
+ if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
+
+ if ((int)ec->netwm.type != m->window_type)
+ return EINA_FALSE;
+
+ if (((m->clas) && (!ec->icccm.class)) ||
+ ((ec->icccm.class) && (m->clas) && (!e_util_glob_match(ec->icccm.class, m->clas))))
+ return EINA_FALSE;
+
+ if (((m->name) && (!ec->icccm.name)) ||
+ ((ec->icccm.name) && (m->name) && (!e_util_glob_match(ec->icccm.name, m->name))))
+ return EINA_FALSE;
+
+ return EINA_TRUE;
+}
+
+static int
+_e_client_type_get(E_Client *ec)
+{
+ E_Config_Client_Type *m;
+ Eina_List *l;
+ int type = 0;
+
+ if (!e_config->client_types) return 0;
+
+ EINA_LIST_FOREACH(e_config->client_types, l, m)
+ {
+ if (!_e_client_type_match(ec, m)) continue;
+ else
+ {
+ type = m->client_type;
+ break;
+ }
+ }
+
+ ec->client_type = type;
+
+ return ec->client_type;
+}
+
////////////////////////////////////////////////
EINTERN void
e_client_idler_before(void)
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
Eina_Stringshare *title;
+ int client_type;
+
// pass 1 - eval0. fetch properties on new or on change and
// call hooks to decide what to do - maybe move/resize
if (!ec->changed) continue;
if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_FETCH, ec)) continue;
if (title != e_client_util_name_get(ec))
_e_client_event_property(ec, E_CLIENT_PROPERTY_TITLE);
+
+ client_type = ec->client_type;
+ if (client_type != _e_client_type_get(ec))
+ _e_client_event_property(ec, E_CLIENT_PROPERTY_CLIENT_TYPE);
+
/* PRE_POST_FETCH calls e_remember apply for new client */
if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_POST_FETCH, ec)) continue;
if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_FETCH, ec)) continue;
E_CLIENT_PROPERTY_GRAVITY = (1 << 5),
E_CLIENT_PROPERTY_NETWM_STATE = (1 << 6),
E_CLIENT_PROPERTY_STICKY = (1 << 7),
+ E_CLIENT_PROPERTY_CLIENT_TYPE = (1 << 8),
} E_Client_Property;
#ifdef _F_E_VIRTUAL_KEYBOARD_TYPE_
#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
uuid_t uuid;
#endif
+
+ int client_type; //e_client_type
};
#define e_client_focus_policy_click(ec) \
static E_Config_DD *_e_config_env_var_edd = NULL;
static E_Config_DD *_e_config_xkb_layout_edd = NULL;
static E_Config_DD *_e_config_xkb_option_edd = NULL;
+static E_Config_DD *_e_config_client_type_edd = NULL;
EAPI int E_EVENT_CONFIG_ICON_THEME = 0;
EAPI int E_EVENT_CONFIG_MODE_CHANGED = 0;
E_CONFIG_DD_FREE(_e_config_env_var_edd);
E_CONFIG_DD_FREE(_e_config_xkb_layout_edd);
E_CONFIG_DD_FREE(_e_config_xkb_option_edd);
+ E_CONFIG_DD_FREE(_e_config_client_type_edd);
}
static void
#define D _e_config_xkb_option_edd
E_CONFIG_VAL(D, T, name, STR);
+ _e_config_client_type_edd = E_CONFIG_DD_NEW("E_Config_Client_Type",
+ E_Config_Client_Type);
+#undef T
+#undef D
+#define T E_Config_Client_Type
+#define D _e_config_client_type_edd
+ E_CONFIG_VAL(D, T, name, STR);
+ E_CONFIG_VAL(D, T, clas, STR);
+ E_CONFIG_VAL(D, T, window_type, INT);
+ E_CONFIG_VAL(D, T, client_type, INT);
+
_e_config_edd = E_CONFIG_DD_NEW("E_Config", E_Config);
#undef T
#undef D
#ifdef _F_ZONE_WINDOW_ROTATION_
E_CONFIG_VAL(D, T, wm_win_rotation, UCHAR);
#endif
+ E_CONFIG_LIST(D, T, client_types, _e_config_client_type_edd);
}
/* externally accessible functions */
typedef struct _E_Config_Env_Var E_Config_Env_Var;
typedef struct _E_Config_XKB_Layout E_Config_XKB_Layout;
typedef struct _E_Config_XKB_Option E_Config_XKB_Option;
+typedef struct _E_Config_Client_Type E_Config_Client_Type;
typedef struct _E_Event_Config_Icon_Theme E_Event_Config_Icon_Theme;
#ifdef _F_ZONE_WINDOW_ROTATION_
unsigned char wm_win_rotation;
#endif
+ Eina_List *client_types;
};
struct E_Config_Bindings
const char *name;
};
+struct _E_Config_Client_Type
+{
+ const char *name; /* icccm.class_name */
+ const char *clas; /* icccm.class */
+ E_Window_Type window_type; /* Ecore_X_Window_Type / E_Window_Type */
+ int client_type; /* E_Client_Type */
+};
+
EINTERN int e_config_init(void);
EINTERN int e_config_shutdown(void);