トップ 最新 追記

Masa's blog

検索キーワード:

2013年10月15日 Solved! firefox + kinput2 = pull-down menu don't work !? [長年日記]

_ Solved! firefox + kinput2 = pull-down menu don't work !?

When I use kinput2 for japanese input method with firefox, pull-down menu of firefox don't work!

I have to apply a patch for libX11 and re-build it to solve a problem(see Fix bogus timestamp generated by XIM).

you can get a source of libX11 from Slackware site.

$ tar xvvf libX11-1.5.0.tar.xz
$ cd libX11-1.5.0/

and you can get a patch for libX11 from here

$ cat /_somewhere_/Fix-bogus-timestamp-generated-by-XIM.patch
diff --git a/modules/im/ximcp/imDefLkup.c b/modules/im/ximcp/imDefLkup.c
index 0a9553a..7add1f2 100644
--- a/modules/im/ximcp/imDefLkup.c
+++ b/modules/im/ximcp/imDefLkup.c
@@ -269,6 +269,8 @@ _XimForwardEventCore(
     int		 ret_code;
     INT16	 len;

+    bzero(buf32, sizeof(buf32)); /* valgrind noticed uninitialized memory use! */
+
     if (!(len = _XimSetEventToWire(ev, (xEvent *)&buf_s[4])))
 	return False;				/* X event */

@@ -706,6 +708,8 @@ _XimCommitRecv(

     MARK_FABRICATED(im);

+    bzero(&ev, sizeof(ev));	/* uninitialized : found when running kterm under valgrind */
+
     ev.type = KeyPress;
     ev.send_event = False;
     ev.display = im->core.display;
@@ -713,6 +717,15 @@ _XimCommitRecv(
     ev.keycode = 0;
     ev.state = 0;

+    ev.time = 0L;
+    ev.serial = LastKnownRequestProcessed(im->core.display);
+    /* FIXME :
+       I wish there were COMMENTs (!) about the data passed around.
+    */
+#if 0
+    fprintf(stderr,"%s,%d: putback k press   FIXED ev.time=0 ev.serial=%lu\n", __FILE__, __LINE__, ev.serial);
+#endif
+
     XPutBackEvent(im->core.display, (XEvent *)&ev);

     return True;
diff --git a/modules/im/ximcp/imTrans.c b/modules/im/ximcp/imTrans.c
index 4bdecb2..a8cd95e 100644
--- a/modules/im/ximcp/imTrans.c
+++ b/modules/im/ximcp/imTrans.c
@@ -222,12 +222,20 @@ _XimTransInternalConnection(

     if (spec->is_putback)
 	return;
+
+    bzero(&ev, sizeof(ev));	/* FIXME: other fields may be accessed, too. */
     kev = (XKeyEvent *)&ev;
     kev->type = KeyPress;
     kev->send_event = False;
     kev->display = im->core.display;
     kev->window = spec->window;
     kev->keycode = 0;
+    kev->time = 0L;
+    kev->serial = LastKnownRequestProcessed(im->core.display);
+#if 0
+    fprintf(stderr,"%s,%d: putback FIXED kev->time=0 kev->serial=%lu\n", __FILE__, __LINE__, kev->serial);
+#endif
+
     XPutBackEvent(im->core.display, &ev);
     XFlush(im->core.display);
     spec->is_putback = True;

apply a patch and rebuild libX11!

$ patch -p1 </_somewhere_/Fix-bogus-timestamp-generated-by-XIM.patch
$ export LC_ALL=ja_JP.UTF-8
$ export LANG=ja_JP.UTF-8
$ ./configure \
 --prefix=/usr \
 --libdir=/usr/lib \
 --sysconfdir=/etc \
 --localstatedir=/var \
 --infodir=/usr/info \
 --mandir=/usr/man \
 --disable-static
$ make
$ su
# make install
# ldconfig

and then everything gose fine ;)


2013年10月25日 Install of LMMS(Linux MultiMedia Studio) on Slackware-14.0 [長年日記]

_ Install of LMMS(Linux MultiMedia Studio) on Slackware-14.0

pulseaudio-4.0.tar.xz

$ tar xvvf pulseaudio-4.0.tar.xz
$ cd pulseaudio-4.0
$ ./configure && make

# make install && ldconfig

fluidsynth-1.1.6.tar.bz2

$ tar xvvf fluidsynth-1.1.6.tar.bz2
$ cd fluidsynth-1.1.6.
$ ./configure && make

# make install && ldconfig

json-c-0.9.tar.gz

$ tar xvvf json-c-0.9.tar.gz
$ cd json-c-0.9
$ ./configure && make

# make install && ldconfig

stk-4.4.4.tar.gz

$ tar xvvf stk-4.4.4.tar.gz
$ cd stk-4.4.4
$ LDFLAGS=-lpthread ./configure
$ LDFLAGS=-lpthread make

# mkdir /usr/lib
# cp src/libstk.a /usr/lib/
# mkdir /usr/include/stk
# cp include/* /usr/include/stk/
# mkdir /usr/share/stk/rawwaves
# cp rawwaves/* /usr/share/stk/rawwaves/

lmms-0.4.15.tar.bz2

$ tar xvvf lmms-0.4.15.tar.bz2
$ cd lmms-0.4.15
$ mkdir build
$ cd build
$ cmake ../
$ make

# make install && ldconfig

SGM-V2.01.7z

$ 7z x SGM-V2.01.7z
$ mkdir ~/lmms/SoundFonts
$ cp SGM-V2.01.sf2 ~/lmms/SoundFonts/