forked from enlightenment/enlightenment
add an amazing hack which, when a vmware player window is opened, disables keyboard remapping until the window is closed. this is stupid, but seems to be the only way to keep it from breaking keymaps on some setups
ticket #1057 SVN revision: 74919
This commit is contained in:
parent
b54be9093a
commit
21df8f0a2f
|
@ -24,6 +24,7 @@ static Eina_List *edge_bindings = NULL;
|
||||||
static Eina_List *signal_bindings = NULL;
|
static Eina_List *signal_bindings = NULL;
|
||||||
static Eina_List *wheel_bindings = NULL;
|
static Eina_List *wheel_bindings = NULL;
|
||||||
static Eina_List *acpi_bindings = NULL;
|
static Eina_List *acpi_bindings = NULL;
|
||||||
|
static int _e_bindings_mapping_change_enabled = 1;
|
||||||
|
|
||||||
typedef struct _E_Binding_Edge_Data E_Binding_Edge_Data;
|
typedef struct _E_Binding_Edge_Data E_Binding_Edge_Data;
|
||||||
|
|
||||||
|
@ -1077,12 +1078,23 @@ e_bindings_acpi_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Acpi
|
||||||
return act;
|
return act;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
e_bindings_mapping_change_enable(Eina_Bool enable)
|
||||||
|
{
|
||||||
|
if (enable)
|
||||||
|
_e_bindings_mapping_change_enabled++;
|
||||||
|
else
|
||||||
|
_e_bindings_mapping_change_enabled--;
|
||||||
|
if (_e_bindings_mapping_change_enabled < 0)
|
||||||
|
_e_bindings_mapping_change_enabled = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_e_bindings_mapping_change_event_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
_e_bindings_mapping_change_event_cb(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
||||||
{
|
{
|
||||||
Ecore_X_Event_Mapping_Change *ev = event;
|
Ecore_X_Event_Mapping_Change *ev = event;
|
||||||
fprintf(stderr, "MAPPING CHANGE: type: %d || keycode: %d || num: %d\n", ev->type, ev->keycode, ev->num);
|
if (!_e_bindings_mapping_change_enabled) return ECORE_CALLBACK_RENEW;
|
||||||
e_managers_keys_ungrab();
|
e_managers_keys_ungrab();
|
||||||
e_border_button_bindings_ungrab_all();
|
e_border_button_bindings_ungrab_all();
|
||||||
e_border_button_bindings_grab_all();
|
e_border_button_bindings_grab_all();
|
||||||
|
|
|
@ -149,6 +149,7 @@ EAPI void e_bindings_acpi_add(E_Binding_Context ctxt, int type, int status, cons
|
||||||
EAPI void e_bindings_acpi_del(E_Binding_Context ctxt, int type, int status, const char *action, const char *params);
|
EAPI void e_bindings_acpi_del(E_Binding_Context ctxt, int type, int status, const char *action, const char *params);
|
||||||
EAPI E_Action *e_bindings_acpi_find(E_Binding_Context ctxt, E_Object *obj, E_Event_Acpi *ev, E_Binding_Acpi **bind_ret);
|
EAPI E_Action *e_bindings_acpi_find(E_Binding_Context ctxt, E_Object *obj, E_Event_Acpi *ev, E_Binding_Acpi **bind_ret);
|
||||||
EAPI E_Action *e_bindings_acpi_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Acpi *ev);
|
EAPI E_Action *e_bindings_acpi_event_handle(E_Binding_Context ctxt, E_Object *obj, E_Event_Acpi *ev);
|
||||||
|
EAPI void e_bindings_mapping_change_enable(Eina_Bool enable);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4574,7 +4574,11 @@ _e_border_free(E_Border *bd)
|
||||||
if (bd->client.icccm.name)
|
if (bd->client.icccm.name)
|
||||||
eina_stringshare_del(bd->client.icccm.name);
|
eina_stringshare_del(bd->client.icccm.name);
|
||||||
if (bd->client.icccm.class)
|
if (bd->client.icccm.class)
|
||||||
eina_stringshare_del(bd->client.icccm.class);
|
{
|
||||||
|
if (!strcmp(bd->client.icccm.class, "Vmplayer"))
|
||||||
|
e_bindings_mapping_change_enable(EINA_FALSE);
|
||||||
|
eina_stringshare_del(bd->client.icccm.class);
|
||||||
|
}
|
||||||
if (bd->client.icccm.title)
|
if (bd->client.icccm.title)
|
||||||
eina_stringshare_del(bd->client.icccm.title);
|
eina_stringshare_del(bd->client.icccm.title);
|
||||||
if (bd->client.icccm.icon_name)
|
if (bd->client.icccm.icon_name)
|
||||||
|
@ -6650,11 +6654,13 @@ _e_border_eval0(E_Border *bd)
|
||||||
const char *pname, *pclass;
|
const char *pname, *pclass;
|
||||||
char *nname, *nclass;
|
char *nname, *nclass;
|
||||||
|
|
||||||
ecore_x_icccm_name_class_get(bd->client.win, &nname, &nclass);
|
ecore_x_icccm_name_class_get(bd->client.win, &nname, &nclass);
|
||||||
pname = bd->client.icccm.name;
|
pname = bd->client.icccm.name;
|
||||||
pclass = bd->client.icccm.class;
|
pclass = bd->client.icccm.class;
|
||||||
bd->client.icccm.name = eina_stringshare_add(nname);
|
bd->client.icccm.name = eina_stringshare_add(nname);
|
||||||
bd->client.icccm.class = eina_stringshare_add(nclass);
|
bd->client.icccm.class = eina_stringshare_add(nclass);
|
||||||
|
if (bd->client.icccm.class && (!strcmp(bd->client.icccm.class, "Vmplayer")))
|
||||||
|
e_bindings_mapping_change_enable(EINA_FALSE);
|
||||||
if (nname) free(nname);
|
if (nname) free(nname);
|
||||||
if (nclass) free(nclass);
|
if (nclass) free(nclass);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue