always re-set xmodmap after changing kbd layout group

SVN revision: 80761
This commit is contained in:
Mike Blumenkrantz 2012-12-12 13:31:18 +00:00
parent 15df42143e
commit a8143270cd
3 changed files with 16 additions and 13 deletions

View File

@ -23,18 +23,7 @@ e_deskenv_init(void)
}
}
// load ~/.Xmodmap
// NOTE: one day we should replace this with an e based config + service
if (e_config->deskenv.load_xmodmap)
{
e_user_homedir_concat(buf, sizeof(buf), ".Xmodmap");
if (ecore_file_exists(buf))
{
snprintf(buf2, sizeof(buf2), "xmodmap %s", buf);
ecore_exe_run(buf2, NULL);
}
}
e_deskenv_xmodmap_run();
// make gnome apps happy
// NOTE: one day we should replace this with an e based config + service
if (e_config->deskenv.load_gnome)
@ -56,3 +45,16 @@ e_deskenv_shutdown(void)
{
return 1;
}
EAPI void
e_deskenv_xmodmap_run(void)
{
char buf[PATH_MAX], buf2[PATH_MAX + sizeof("xmodmap ")];
// load ~/.Xmodmap
// NOTE: one day we should replace this with an e based config + service
if (!e_config->deskenv.load_xmodmap) return;
e_user_homedir_concat(buf, sizeof(buf), ".Xmodmap");
if (!ecore_file_exists(buf)) return;
snprintf(buf2, sizeof(buf2), "xmodmap %s", buf);
ecore_exe_run(buf2, NULL);
}

View File

@ -5,6 +5,6 @@
EINTERN int e_deskenv_init(void);
EINTERN int e_deskenv_shutdown(void);
EAPI void e_deskenv_xmodmap_run(void);
#endif
#endif

View File

@ -45,6 +45,7 @@ e_xkb_update(int cur_group)
{
_e_xkb_cur_group = cur_group;
ecore_x_xkb_select_group(cur_group);
e_deskenv_xmodmap_run();
_e_xkb_update_event(cur_group);
return;
}