From ff2700b1a0e533a582e5df03b921550c43686310 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Sat, 5 Dec 2015 10:55:43 -0500 Subject: [PATCH] stuff --- simpledisplay.d | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/simpledisplay.d b/simpledisplay.d index 9faf601..61839d3 100644 --- a/simpledisplay.d +++ b/simpledisplay.d @@ -4413,7 +4413,7 @@ version(X11) { Display* display; Pixmap buffer; - XIC xic; // input context + XIC xic; // input context void delegate(XEvent) setSelectionHandler; void delegate(in char[]) getSelectionHandler; @@ -4480,19 +4480,19 @@ version(X11) { XSetForeground(display, gc, BlackPixel(display, screen)); } - // input context - //TODO: create this only for top-level windows, and reuse that? - if (XDisplayConnection.xim !is null) { - xic = XCreateIC(XDisplayConnection.xim, - /*XNInputStyle*/"inputStyle".ptr, XIMPreeditNothing|XIMStatusNothing, - /*XNClientWindow*/"clientWindow".ptr, window, - /*XNFocusWindow*/"focusWindow".ptr, window, - null); - if (xic is null) { - import core.stdc.stdio : stderr, fprintf; - fprintf(stderr, "XCreateIC failed for window %u\n", cast(uint)window); - } - } + // input context + //TODO: create this only for top-level windows, and reuse that? + if (XDisplayConnection.xim !is null) { + xic = XCreateIC(XDisplayConnection.xim, + /*XNInputStyle*/"inputStyle".ptr, XIMPreeditNothing|XIMStatusNothing, + /*XNClientWindow*/"clientWindow".ptr, window, + /*XNFocusWindow*/"focusWindow".ptr, window, + null); + if (xic is null) { + import core.stdc.stdio : stderr, fprintf; + fprintf(stderr, "XCreateIC failed for window %u\n", cast(uint)window); + } + } setTitle(title); SimpleWindow.nativeMapping[window] = this;