1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00
This commit is contained in:
QC 2014-01-30 21:32:36 +01:00
parent c32e18b600
commit 101c63cde6
2 changed files with 3 additions and 2 deletions

View file

@ -119,8 +119,9 @@ SwitcherMode dmenu_switcher_dialog ( char **input )
} else if ( n >=0 && list[n] != NULL ) {
fputs( list[n],stdout );
} else if ( n == -3 && *input != NULL && *input[0] != '\0' ) {
fputs( *input, stdout );
fputs( *input, stdout );
}
for ( unsigned int i=0; list[i] != NULL; i++ ) {
free( list[i] );
}

View file

@ -112,7 +112,7 @@ void textbox_font( textbox *tb, char *font, char *fg, char *bg )
// outer code may need line height, width, etc
void textbox_extents( textbox *tb )
{
int length = strlen( tb->text ) + strlen( tb->prompt) +1;
int length = strlen( tb->text ) + strlen( tb->prompt ) +1;
char *line = alloca( length + 1 );
sprintf( line, "%s %s", tb->prompt, tb->text );
XftTextExtents8( display, tb->font, ( unsigned char* )line, length, &tb->extents );