Merge remote-tracking branch 'raboof/font_size_change'

This commit is contained in:
Boris Faure 2016-05-21 22:35:15 +02:00
commit 021fbdb055
1 changed files with 27 additions and 0 deletions

View File

@ -1212,6 +1212,22 @@ err:
return -1;
}
static void
_handle_xterm_50_command(Termpty *ty,
char *s,
int len)
{
int i;
int size;
for (i = 0; i < len - strlen(":size="); i++)
{
if (strncmp(s + i, ":size=", strlen(":size=")) == 0)
{
size = strtol(s + i + strlen(":size="), NULL, 10);
termio_font_size_set(ty->obj, size);
}
}
}
static void
_handle_xterm_777_command(Termpty *ty EINA_UNUSED,
@ -1417,6 +1433,17 @@ _handle_esc_xterm(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
#endif
}
break;
case 50:
DBG("xterm font support");
if (!*p)
goto err;
s = eina_unicode_unicode_to_utf8(p, &len);
if (s)
{
_handle_xterm_50_command(ty, s, len);
free(s);
}
break;
case 777:
DBG("xterm notification support");
s = eina_unicode_unicode_to_utf8(p, &len);