mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-03 08:00:50 +00:00
xim
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@251 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -21,6 +21,8 @@ struct _MwLL {
|
||||
void* user;
|
||||
Atom wm_delete;
|
||||
int copy_buffer;
|
||||
XIM xim;
|
||||
XIC xic;
|
||||
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
|
||||
Reference in New Issue
Block a user