summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-02-01 08:47:43 +0100
committerDave Davenport <qball@gmpclient.org>2017-02-01 08:47:43 +0100
commit8e64885c55b4fbe34be656592a54de5b7811be65 (patch)
treeb2c3bb4f429ced311cfdd679f5aaf64e1117e1d0
parentcbea7e33373abe3c0da2b43ea2a07ca324ce902c (diff)
Set default language on pango context.
-rw-r--r--source/rofi.c2
-rw-r--r--source/view.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/source/rofi.c b/source/rofi.c
index ea155f2b..ea54565a 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -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 );
diff --git a/source/view.c b/source/view.c
index 78d1f047..097ea193 100644
--- a/source/view.c
+++ b/source/view.c
@@ -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 );