Set default language on pango context.

This commit is contained in:
Dave Davenport 2017-02-01 08:47:43 +01:00
parent cbea7e3337
commit 8e64885c55
2 changed files with 6 additions and 1 deletions

View File

@ -857,6 +857,7 @@ int main ( int argc, char *argv[] )
fprintf ( stderr, "Failed to create EWMH atoms\n" );
free ( errors );
}
TICK_N ( "Setup XCB" );
if ( xkb_x11_setup_xkb_extension ( xcb->connection, XKB_X11_MIN_MAJOR_XKB_VERSION, XKB_X11_MIN_MINOR_XKB_VERSION,
XKB_X11_SETUP_XKB_EXTENSION_NO_FLAGS, NULL, NULL, &xkb.first_event, NULL ) < 0 ) {
@ -938,6 +939,7 @@ int main ( int argc, char *argv[] )
exit ( EXIT_FAILURE );
}
x11_setup ( &xkb );
TICK_N ( "Setup xkb" );
if ( xcb_connection_has_error ( xcb->connection ) ) {
fprintf ( stderr, "Connection has error\n" );
exit ( EXIT_FAILURE );

View File

@ -697,7 +697,10 @@ void __create_window ( MenuFlags menu_flags )
pango_context_set_font_description ( p, pfd );
pango_font_description_free ( pfd );
}
PangoLanguage *l = pango_language_get_default();
pango_context_set_language ( p, l );
TICK_N ( "configure font");
// Tell textbox to use this context.
textbox_set_pango_context ( font, p );
// cleanup
@ -732,7 +735,7 @@ void __create_window ( MenuFlags menu_flags )
xcb_change_property ( xcb->connection, XCB_PROP_MODE_REPLACE, box, XCB_ATOM_WM_NAME, XCB_ATOM_STRING, 8, 4, "rofi" );
const char wm_class_name[] = "rofi\0Rofi";
xcb_icccm_set_wm_class ( xcb->connection, box, sizeof(wm_class_name),wm_class_name);
xcb_icccm_set_wm_class ( xcb->connection, box, sizeof(wm_class_name),wm_class_name);
TICK_N ( "setup window name and class");
char *transparency = rofi_theme_get_string ( WIDGET ( win ), "transparency", NULL );