Skip to content

Commit

Permalink
debugging XOpenIM
Browse files Browse the repository at this point in the history
  • Loading branch information
TrilbyWhite committed Jun 16, 2013
1 parent 7d45db9 commit b2359ec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ all: ${PROG}.c
@gcc -o ${PROG} ${PROG}.c ${CFLAGS}
@strip ${PROG}

debug: ${PROG}.c
@gcc -o ${PROG} ${PROG}.c ${CFLAGS} -DDEBUG

clean:
@rm -rf ${PROG}

Expand Down
9 changes: 7 additions & 2 deletions interrobang.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ static int config(int argc, const char **argv) {
}
if (!rc) {
chdir(getenv("XDG_CONFIG_HOME"));
chdir("interrobang");
rc = fopen("config","r");
if (chdir("interrobang")==0) rc = fopen("config","r");
}
if (!rc) { chdir(getenv("HOME")); rc = fopen(".interrobangrc","r"); }
chdir(cwd);
Expand Down Expand Up @@ -221,7 +220,13 @@ static int init_X() {
CWOverrideRedirect|CWBorderPixel,&wa);
buf = XCreatePixmap(dpy,root,w,h,DefaultDepth(dpy,scr));
/* input context */
#ifdef DEBUG
fprintf(stderr,"pre XOpenIM (dpy=%d)\n",dpy);
#endif
XIM xim = XOpenIM(dpy,NULL,NULL,NULL);
#ifdef DEBUG
fprintf(stderr,"post XOpenIM\n");
#endif
xic = XCreateIC(xim,XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
XNClientWindow, win, XNFocusWindow, win, NULL);
XMapWindow(dpy,win);
Expand Down

0 comments on commit b2359ec

Please sign in to comment.