From bb0834637c7620870d784180436c90492c89db9b Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Tue, 30 Jul 2019 00:18:05 +0200 Subject: X11: Support UTF8 in window titles It's possible that this does bad things if a UTF8 string is used on a system that does not support it (because XStoreName is still called), but I have no idea how likely this scenario is. Leaving it this way because it means the ASCII case will still work everywhere, and it's easy enough to avoid if this is a problem. --- test/pugl_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/pugl_test.c b/test/pugl_test.c index f81cf99..af93caf 100644 --- a/test/pugl_test.c +++ b/test/pugl_test.c @@ -182,7 +182,9 @@ main(int argc, char** argv) puglIgnoreKeyRepeat(view, ignoreKeyRepeat); puglSetEventFunc(view, onEvent); - if (puglCreateWindow(view, "Pugl Test")) { + const uint8_t title[] = { 'P', 'u', 'g', 'l', ' ', + 'P', 'r', 0xC3, 0xBC, 'f', 'u', 'n', 'g' }; + if (puglCreateWindow(view, (const char*)title)) { return 1; } -- cgit v1.2.1