git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@251 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-10 10:42:18 +00:00
parent c9dcda72ee
commit 0c28c9d104
2 changed files with 19 additions and 0 deletions

View File

@@ -38,6 +38,20 @@ MwLL MwLLCreate(MwLL parent, int x, int y, int width, int height) {
p = parent->window;
}
r->window = XCreateSimpleWindow(r->display, p, x, y, width, height, 0, 0, WhitePixel(r->display, XDefaultScreen(r->display)));
XSetLocaleModifiers("");
if((r->xim = XOpenIM(r->display, 0, 0, 0)) == NULL){
XSetLocaleModifiers("@im=none");
r->xim = XOpenIM(r->display, 0, 0, 0);
}
r->xic = XCreateIC(r->xim,
XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
XNClientWindow, r->window,
XNFocusWindow, r->window,
NULL);
XSetICFocus(r->xic);
r->copy_buffer = 1;
r->width = width;
@@ -62,6 +76,9 @@ MwLL MwLLCreate(MwLL parent, int x, int y, int width, int height) {
void MwLLDestroy(MwLL handle) {
MwLLDestroyCommon(handle);
XDestroyIC(handle->xic);
XCloseIM(handle->xim);
destroy_pixmap(handle);
XFreeGC(handle->display, handle->gc);
XDestroyWindow(handle->display, handle->window);

View File

@@ -21,6 +21,8 @@ struct _MwLL {
void* user;
Atom wm_delete;
int copy_buffer;
XIM xim;
XIC xic;
unsigned int width;
unsigned int height;