cht電腦資訊gcin
adm Find login register

gcin source 2.8.3 released

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
1subject: gcin source 2.8.3 releasedPromote 0 Bookmark 02014-12-19quote  

2.8.3 
- tsa2d32如果有錯誤,改成忽略,而不是中斷。 
- ctrl-space 倉頡等 gtab 輸入法拆碼輸入區內容沒有清除的問題
- 英數詞庫可以加入 E-mail address: [email protected]
- bug fix:英文預選詞選到 Elysée crash
- bug fix: 在詞音的詞庫新增含 '@!' 的半形符號可能導致詞庫錯亂
- 移除注音符號選擇中的英文字母。
- qt5 支援
- 禁止「第一次內定」輸入法到「英數」,需要內定是英數者,請取消「直接進入中文輸入狀態」,內定就是取消
- 「直接進入中文輸入狀態」在 LXDE 會有 gcin crash 的問題。

winlin

joined: 2007-09-25
posted: 1859
promoted: 111
bookmarked: 33
2subject: Promote 0 Bookmark 02014-12-19quote  

eliu兄好:

發現gtab的「彈出式視窗」好像沒效了,打完之後視窗還一直留在畫面上(五四三倉頡)。
不知道您那裡是否也有這個問題?

另外,我裝了qt5-default,qt5 module仍編不起來,
能否請教一下應該裝什麼套件來編譯它呢?

感謝~

-------------------------------------------------------------------
好用的gcin連結:

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
3subject: Promote 0 Bookmark 02014-12-20quote  

winlin
發現gtab的「彈出式視窗」好像沒效了,打完之後視窗還一直留在畫面上(五四三倉頡)。

不知道您那裡是否也有這個問題?

 

我的沒有這個問題。

另外,我裝了qt5-default,qt5 module仍編不起來,
能否請教一下應該裝什麼套件來編譯它呢?

qtbase5-dev

winlin

joined: 2007-09-25
posted: 1859
promoted: 111
bookmarked: 33
4subject: Promote 0 Bookmark 02014-12-20quote  

對了,補充一下,我的「彈出式視窗」問題的測試步驟是:
拆2個字碼(如: nl)後按空白鍵,再按enter或space把字送出,
送出字後,會發現「gcin視窗」還留在畫面上,(註:我的「外觀設定」→「編輯區顯示」是設成「gcin視窗」)
不過如果是按「,」或「。」把字送出,則gcin視窗會消失。
rm -fr .gcin之後再試,這個問題仍在。

關於qt5無法編譯成功的事,我查了一下,我原先就已經裝好了qtbase5-dev,
但是編譯還是發生錯誤,編譯過程的片段內容如下:

testing if you have qt3 support
-> No, you don't have. It's ok if you don't want Qt3 immodule.
testing if you have qt4 support
-> Yes, you have Qt4 support.
testing if you have qt5 support
-> Yes, you have Qt5 support.
testing if you have GTK+ 3.x support
-> Yes, you have GTK+ 3.x support.
...(恕刪)

(最後幾行如下)

make[2]: Entering directory '/home/winlin/gcin-2.8.3/qt4-im'
Makefile:38: .depend: No such file or directory
gcc -g -O -I../im-client -I/usr/include/X11 `pkg-config QtCore QtGui --cflags` -Wall -D_REENTRANT -DUNIX=1 -fPIC  -DQT4 -DQT_SHARED -DQT_IMMODULE -DPIC -MM *.cpp > .depend
/usr/share/qt4/bin/moc gcin-qt.h -o moc_gcin-qt.cpp
gcc -g -O -I../im-client -I/usr/include/X11 `pkg-config QtCore QtGui --cflags` -Wall -D_REENTRANT -DUNIX=1 -fPIC  -DQT4 -DQT_SHARED -DQT_IMMODULE -DPIC   -c -o moc_gcin-qt.o moc_gcin-qt.cpp
gcc -g -O -I../im-client -I/usr/include/X11 `pkg-config QtCore QtGui --cflags` -Wall -D_REENTRANT -DUNIX=1 -fPIC  -DQT4 -DQT_SHARED -DQT_IMMODULE -DPIC   -c -o gcin-qt.o gcin-qt.cpp
gcc -g -O -I../im-client -I/usr/include/X11 `pkg-config QtCore QtGui --cflags` -Wall -D_REENTRANT -DUNIX=1 -fPIC  -DQT4 -DQT_SHARED -DQT_IMMODULE -DPIC   -c -o im-gcin-qt.o im-gcin-qt.cpp
gcc -g -O -I../im-client -I/usr/include/X11 `pkg-config QtCore QtGui --cflags` -Wall -D_REENTRANT -DUNIX=1 -fPIC  -DQT4 -DQT_SHARED -DQT_IMMODULE -DPIC   -c -o gcin-imcontext-qt.o gcin-imcontext-qt.cpp
export LD_RUN_PATH=/usr/lib/gcin ;\
gcc -Wl,-rpath,/usr/lib/gcin -fno-exceptions -shared -o im-gcin.so moc_gcin-qt.o gcin-qt.o im-gcin-qt.o gcin-imcontext-qt.o -L../im-client -lgcin-im-client `pkg-config QtCore QtGui --libs`
rm -f core.*
make[2]: Leaving directory '/home/winlin/gcin-2.8.3/qt4-im'
if [ Y = 'Y' ]; then make -C qt5-im; fi
make[2]: Entering directory '/home/winlin/gcin-2.8.3/qt5-im'
Makefile:46: .depend: No such file or directory
gcc -g -O -I../im-client -I/usr/include/X11 `pkg-config Qt5Core Qt5Gui Qt5PlatformSupport QtDBus --cflags` -I /usr/include/qt5/QtGui/5.2.1/QtGui -Wall -D_REENTRANT -DUNIX=1 -fPIC  -DQT5 -DQT_SHARED -DQT_IMMODULE -DPIC -DDEBUG="00" -MM *.cpp > .depend
/usr/bin/moc gcin-qt5.h -o moc_gcin-qt5.cpp
gcc -g -O -I../im-client -I/usr/include/X11 `pkg-config Qt5Core Qt5Gui Qt5PlatformSupport QtDBus --cflags` -I /usr/include/qt5/QtGui/5.2.1/QtGui -Wall -D_REENTRANT -DUNIX=1 -fPIC  -DQT5 -DQT_SHARED -DQT_IMMODULE -DPIC -DDEBUG="00"   -c -o moc_gcin-qt5.o moc_gcin-qt5.cpp
In file included from moc_gcin-qt5.cpp:9:0:
gcin-qt5.h:3:47: fatal error: qpa/qplatforminputcontextplugin_p.h: No such file or directory
 #include <qpa/qplatforminputcontextplugin_p.h>
                                               ^
compilation terminated.
<builtin>: recipe for target 'moc_gcin-qt5.o' failed
make[2]: *** [moc_gcin-qt5.o] Error 1
make[2]: Leaving directory '/home/winlin/gcin-2.8.3/qt5-im'
Makefile:102: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/winlin/gcin-2.8.3'
dh_auto_build: make -j1 returned exit code 2
debian/rules:3: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

我查了一下qplatforminputcontextplugin_p.h路徑應是在下面:
/usr/include/i386-linux-gnu/qt5/QtGui/5.3.2/QtGui/qpa/qplatforminputcontextplugin_p.h

不知道是不是因為Debian和ubuntu的放置路徑不同才找不到?

-------------------------------------------------------------------
好用的gcin連結:

edited: 1
eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
5subject: Promote 0 Bookmark 02014-12-20quote  

winlin
我的「外觀設定」→「編輯區顯示」是設成「gcin視窗

這邊會造成 bug。

gcin-qt5.h:3:47: fatal error: qpa/qplatforminputcontextplugin_p.h: No such file or directory

install qtbase5-private-dev

winlin

joined: 2007-09-25
posted: 1859
promoted: 111
bookmarked: 33
6subject: Promote 0 Bookmark 02014-12-21quote  

eliu

 

這邊會造成 bug。

 

install qtbase5-private-dev

eliu兄好:
qtbase5-private-dev原先就有裝了,
上面的訊息就是在有裝的狀況下出現的錯誤訊息。

-------------------------------------------------------------------
好用的gcin連結:

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
7subject: Promote 0 Bookmark 02014-12-21quote  

winlin
qtbase5-private-dev原先就有裝了,

上面的訊息就是在有裝的狀況下出現的錯誤訊息。

$ dpkg -L qtbase5-private-dev | grep qplatforminputcontextplugin_p.h
/usr/include/qt5/QtGui/5.2.1/QtGui/qpa/qplatforminputcontextplugin_p.h

難道 Ubuntu& Debian 的 package 不一樣?

winlin

joined: 2007-09-25
posted: 1859
promoted: 111
bookmarked: 33
8subject: Promote 0 Bookmark 02014-12-21quote  

eliu

 

$ dpkg -L qtbase5-private-dev | grep qplatforminputcontextplugin_p.h
/usr/include/qt5/QtGui/5.2.1/QtGui/qpa/qplatforminputcontextplugin_p.h

難道 Ubuntu& Debian 的 package 不一樣?

$dpkg -L qtbase5-private-dev | grep qplatforminputcontextplugin_p.h
/usr/include/i386-linux-gnu/qt5/QtGui/5.3.2/QtGui/qpa/qplatforminputcontextplugin_p.h

確實不一樣~Laughing

不知道和32 bit與64bit的系統差異是否有關?

-------------------------------------------------------------------
好用的gcin連結:

edited: 1
eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
9subject: Promote 0 Bookmark 02014-12-22quote  

winlin
/usr/include/i386-linux-gnu/qt5/QtGui/5.3.2/QtGui/qpa/qplatforminputcontextplugin_p.h

這個 .deb 很奇怪,照理說 .h 是 source,不是 binary,不應該加入 i386-linux-gnu 才對。

修改 qt5-im/Makefile,加入

INCS+=-I/usr/include/i386-linux-gnu/qt5/QtGui/5.3.2/QtGui

winlin

joined: 2007-09-25
posted: 1859
promoted: 111
bookmarked: 33
10subject: Promote 0 Bookmark 02014-12-22quote  

eliu

這個 .deb 很奇怪,照理說 .h 是 source,不是 binary,不應該加入 i386-linux-gnu 才對。

修改 qt5-im/Makefile,加入

INCS+=-I/usr/include/i386-linux-gnu/qt5/QtGui/5.3.2/QtGui


感謝eliu兄協助,修改過後再編,仍是發生錯誤,
抱歉,我程度很差,實在看不懂問題出在哪裡,只好再把相關訊息貼上來。

 

make[2]: Leaving directory '/home/winlin/gcin-2.8.3/qt4-im'
if [ Y = 'Y' ]; then make -C qt5-im; fi
make[2]: Entering directory '/home/winlin/gcin-2.8.3/qt5-im'
Makefile:46: .depend: No such file or directory
gcc -g -O -I../im-client -I/usr/include/X11 `pkg-config Qt5Core Qt5Gui Qt5PlatformSupport QtDBus --cflags` -I/usr/include/i386-linux-gnu/qt5/QtGui/5.3.2/QtGui -Wall -D_REENTRANT -DUNIX=1 -fPIC  -DQT5 -DQT_SHARED -DQT_IMMODULE -DPIC -DDEBUG="00" -MM *.cpp > .depend
/usr/bin/moc gcin-qt5.h -o moc_gcin-qt5.cpp
gcc -g -O -I../im-client -I/usr/include/X11 `pkg-config Qt5Core Qt5Gui Qt5PlatformSupport QtDBus --cflags` -I/usr/include/i386-linux-gnu/qt5/QtGui/5.3.2/QtGui -Wall -D_REENTRANT -DUNIX=1 -fPIC  -DQT5 -DQT_SHARED -DQT_IMMODULE -DPIC -DDEBUG="00"   -c -o moc_gcin-qt5.o moc_gcin-qt5.cpp
moc_gcin-qt5.cpp:13:2: error: #error "This file was generated using the moc from 4.8.6. It"
 #error "This file was generated using the moc from 4.8.6. It"
  ^
moc_gcin-qt5.cpp:14:2: error: #error "cannot be used with the include files from this version of Qt."
 #error "cannot be used with the include files from this version of Qt."
  ^
moc_gcin-qt5.cpp:15:2: error: #error "(The moc has changed too much.)"
 #error "(The moc has changed too much.)"
  ^
moc_gcin-qt5.cpp:47:7: error: ‘QMetaObjectExtraData’ does not name a type
 const QMetaObjectExtraData QGcinPlatformInputContextPlugin::staticMetaObjectExtraData = {
       ^
moc_gcin-qt5.cpp:53:54: error: ‘staticMetaObjectExtraData’ was not declared in this scope
       qt_meta_data_QGcinPlatformInputContextPlugin, &staticMetaObjectExtraData }
                                                      ^
moc_gcin-qt5.cpp: In member function ‘virtual const QMetaObject* QGcinPlatformInputContextPlugin::metaObject() const’:
moc_gcin-qt5.cpp:62:71: error: conditional expression between distinct pointer types ‘QDynamicMetaObjectData*’ and ‘const QMetaObject*’ lacks a cast
     return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
                                                                       ^
moc_gcin-qt5.cpp:63:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
<builtin>: recipe for target 'moc_gcin-qt5.o' failed
make[2]: *** [moc_gcin-qt5.o] Error 1
make[2]: Leaving directory '/home/winlin/gcin-2.8.3/qt5-im'
Makefile:102: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/winlin/gcin-2.8.3'
dh_auto_build: make -j1 returned exit code 2
debian/rules:3: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

-------------------------------------------------------------------
好用的gcin連結:

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
11subject: Promote 0 Bookmark 02014-12-22quote  

locate moc 

看 qt5 的 moc 放在哪裡,/usr/bin/moc 似乎不是給 qt5 用的

winlin

joined: 2007-09-25
posted: 1859
promoted: 111
bookmarked: 33
12subject: Promote 0 Bookmark 02014-12-22quote  

eliu

locate moc 

看 qt5 的 moc 放在哪裡,/usr/bin/moc 似乎不是給 qt5 用的

找到了!

@dpkg -L  qtbase5-dev-tools
/.
/usr
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/moc-qt5.1.gz
/usr/share/doc
/usr/share/doc/qtbase5-dev-tools
/usr/share/doc/qtbase5-dev-tools/changelog.Debian.gz
/usr/share/doc/qtbase5-dev-tools/changelog.Debian.i386.gz
/usr/share/doc/qtbase5-dev-tools/changelog.gz
/usr/share/doc/qtbase5-dev-tools/copyright
/usr/share/doc/qtbase5-dev-tools/LGPL_EXCEPTION.txt
/usr/lib
/usr/lib/i386-linux-gnu
/usr/lib/i386-linux-gnu/qt5
/usr/lib/i386-linux-gnu/qt5/bin
/usr/lib/i386-linux-gnu/qt5/bin/moc
/usr/lib/i386-linux-gnu/qt5/bin/qdbuscpp2xml
/usr/lib/i386-linux-gnu/qt5/bin/qdbusxml2cpp
/usr/lib/i386-linux-gnu/qt5/bin/qdoc
/usr/lib/i386-linux-gnu/qt5/bin/qlalr
/usr/lib/i386-linux-gnu/qt5/bin/rcc
/usr/lib/i386-linux-gnu/qt5/bin/uic
/usr/lib/i386-linux-gnu/qt5/bin/syncqt.pl

-------------------------------------------------------------------
好用的gcin連結:

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
13subject: Promote 0 Bookmark 02014-12-22quote  

自己加入 configure

winlin

joined: 2007-09-25
posted: 1859
promoted: 111
bookmarked: 33
14subject: Promote 0 Bookmark 02014-12-23quote  

eliu

自己加入 configure

if [ $QT5_IM = 'N' ]; then
  mv gcin.spec gcin.spec.tmp
  grep -v qt5/plugins/inputmethods gcin.spec.tmp > gcin.spec
else
  for i in /usr/share/qt5/bin/moc /usr/lib/qt5/bin/moc /usr/lib/x86_64-linux-gnu/qt5/bin/moc /usr/lib64foo/qt5/bin/moc /usr/lib/i386-linux-gnu/qt5/bin/moc /usr/bin/moc
  do
    [ ! -x $i ] && continue
    QT5_MOC=$i
    echo "QT5_MOC=$QT5_MOC"
    break
  done
fi

總算順利完成!!!感謝~
針對上次回報那個彈出式視窗的問題,
如果eliu兄已提供新的測試版,麻煩跟我說一下,感恩~

-------------------------------------------------------------------
好用的gcin連結:

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
15subject: Promote 0 Bookmark 02014-12-23quote  

winlin
如果eliu兄已提供新的測試版,麻煩跟我說一下,感恩~

已經好了,在老地方

winlin

joined: 2007-09-25
posted: 1859
promoted: 111
bookmarked: 33
16subject: Promote 0 Bookmark 02014-12-24quote  

eliu兄好:
在沒有更動任何檔案內容的狀況下,還是有編譯錯誤~

make[3]: Entering directory '/home/winlin/gcin.tmp/qt5-im'
Makefile:46: .depend: No such file or directory
gcc -g -O -I../im-client -I/usr/include/X11 `pkg-config Qt5Core Qt5Gui Qt5PlatformSupport QtDBus --cflags` -I /usr/include/qt5/QtGui/5.2.1/QtGui /usr/include/i386-linux-gnu/qt5/QtGui/5.3.2/QtGui /usr/include/x86_64-linux-gnu/qt5/QtGui/5.3.2/QtGui -Wall -D_REENTRANT -DUNIX=1 -fPIC  -DQT5 -DQT_SHARED -DQT_IMMODULE -DPIC -DDEBUG="00" -MM *.cpp > .depend
gcc: error: /usr/include/x86_64-linux-gnu/qt5/QtGui/5.3.2/QtGui: No such file or directory
Makefile:44: recipe for target '.depend' failed
make[3]: *** [.depend] Error 1
make[3]: Leaving directory '/home/winlin/gcin.tmp/qt5-im'
Makefile:255: recipe for target 'clean' failed
make[2]: *** [clean] Error 2
make[2]: Leaving directory '/home/winlin/gcin.tmp'
debian/rules:12: recipe for target 'override_dh_auto_clean' failed
make[1]: *** [override_dh_auto_clean] Error 2
make[1]: Leaving directory '/home/winlin/gcin.tmp'
debian/rules:3: recipe for target 'clean' failed
make: *** [clean] Error 2
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2

要修改/home/winlin/gcin.tmp/qt5-im/Makefile的內容才能編起來:
INCS+=-I /usr/include/i386-linux-gnu/qt5/QtGui/5.3.2/QtGui

另外,那個彈出式視窗的問題解決了,感謝~

-------------------------------------------------------------------
好用的gcin連結:

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
17subject: Promote 0 Bookmark 02014-12-24quote  

winlin
INCS+=-I /usr/include/i386-linux-gnu/qt5/QtGui/5.3.2/QtGui

已修正, thanks

winlin

joined: 2007-09-25
posted: 1859
promoted: 111
bookmarked: 33
18subject: Promote 0 Bookmark 02014-12-24quote  

eliu

已修正, thanks

感謝eliu兄!
剛剛下載測試,現在確定完全不需要修改任何檔案就能順利編譯完成了!

-------------------------------------------------------------------
好用的gcin連結:

czchen
joined: 2014-04-15
posted: 3
promoted:
bookmarked:
19subject: Promote 0 Bookmark 02015-01-03quote  

Debian 上 Qt5 private header ,可以使用下列方式來設定。這樣不用每次有新版 Qt5 就要改 Makefilke

`pkg-config --variable=includedir Qt5Gui`/QtGui/`pkg-config --modversion Qt5Gui`/QtGui

 

MOC 可以用 qtchooser 來尋找,這樣就不會發生用錯 MOC 的問題。

QT4_MOC="qtchooser -run-tool=moc -qt=4"

QT5_MOC="qtchooser -run-tool=moc -qt=5"

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
20subject: Promote 0 Bookmark 02015-01-04quote  

thanks

ppc52776
joined: 2009-02-02
posted: 2
promoted:
bookmarked: 0
南港
21subject: 終於可以在qt5叫出gcin!Promote 0 Bookmark 02015-02-27quote  

大家好,

小弟我是使用 ArchLinux, 升級 kde5 以後, gcin 就無法叫出來了 Cry

已經升級 2.8.3 了還是叫不出來 >"<

後來才發現套件安裝位置不正確

pacman 安裝後檔案在
/usr/lib/qt5/plugins/platforminputcontexts/
正確的路徑應該在
/usr/lib/qt/plugins/platforminputcontexts/

回報一下~

YA~終於又可以用最喜歡的 gcin 來輸入了!!
這篇就是在 qt5 環境用 gcin-2.8.3 打出來的喔!!

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
22subject: 終於可以在qt5叫出gcin!Promote 0 Bookmark 02015-02-27quote  

ppc52776
後來才發現套件安裝位置不正確

pacman 安裝後檔案在
/usr/lib/qt5/plugins/platforminputcontexts/
正確的路徑應該在
/usr/lib/qt/plugins/platforminputcontexts/

這要向 packager 反應 https://www.archlinux.org/packages/extra/i686/gcin/

Gaetan Bisson

可能是外國人自己沒在用。

guest
23subject: Gcin + Qt5 + Arch Linux 的問題修正Promote 0 Bookmark 02015-03-05quote  

已經在 ArchLinux 官方回報這個問題了(https://bugs.archlinux.org/task/44052),現階段請以這個修改過的 PKGBUILD (http://pastebin.com/KztQ7Fmd) 來編譯沒問題的版本。

guest
24subject: Gcin + Qt5 + Arch Linux 的問題修正Promote 0 Bookmark 02015-03-05quote  

Archlinux 2.8.3-2 已經修正這個問題,不需要自己處理了

siyuan
joined: 2012-01-04
posted: 13
promoted:
bookmarked:
紐西蘭
25subject: Promote 0 Bookmark 02015-03-11quote  

奇怪,我也是 Arch Linux 跑 KDE5,只要一裝 gcin,plasmashell 就會無法啟動,進 KDE 後就只剩一個黑色桌面。但只要一把 gcin qt5 的 plugin .so 檔刪除,plasmashell 就可以正常啟動。你們都沒有這問題?

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
26subject: Promote 0 Bookmark 02015-03-11quote  

你的 pc 是不是比較老舊?

我猜測的原因:desktop session 有 open gcin ime 的 client,ime client 會自動啟動 gcin server.

gcin server 會在執行 5 秒後開啟 status icon (tray),如果超過 5 秒 顯示 status icon 的 notification area 還沒 ready,此時有可能 gcin open status icon 就可能 造成 deadlock.

edited: 1
siyuan
joined: 2012-01-04
posted: 13
promoted:
bookmarked:
紐西蘭
27subject: Promote 0 Bookmark 02015-03-11quote  

還滿新的耶,i7 3770K。

剛才看了一下 qt5 plugin 的 code,好像也看不出什麼。奇怪的是如果先將 plugin .so 檔移開,等 KDE 啟動完畢後再把 plugin 移回來,重起 gcin 也照樣正常用。黑桌面只是 plasmashell 起不來,其他程式都還正常,也能用 gcin 打字。

Edit: 突然想到,你說 system icon 如果沒有起來就可能會卡死,那 plasma 5 就不在支援傳統 xembed 的 systray icon 了,不知道跟這是否有關係?但也無法解釋為何其他人沒有相同問題。

edited: 1
siyuan
joined: 2012-01-04
posted: 13
promoted:
bookmarked:
紐西蘭
28subject: Promote 0 Bookmark 02015-03-21quote  

問題找到了,但原因不明。我發現只要把 gcin/qt5-im/gcin-imcontext-qt5.cpp 裡第 60 行的 printf 拿掉,plasmashell 就能正常起動。

QGcinPlatformInputContext::QGcinPlatformInputContext()
{
        dbg("QGcinPlatformInputContext::QGcinPlatformInputContext() \n");
        QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface();
        if(!native)
                return;
        Display *display = static_cast<Display *>(native->nativeResourceForWindow("display", NULL));
        printf("display %p\n", display);

        if (!(gcin_ch = gcin_im_client_open(display))) {
                perror("cannot open gcin_ch");
                dbg("gcin_im_client_open error\n");
                return;
        }

        dbg("QGcinPlatformInputContext succ\n");
}

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
29subject: Promote 0 Bookmark 02015-03-21quote  

感謝回報

guest
30subject: Promote 0 Bookmark 02015-05-28quote  

我在 openSUSE Tumbleweed 的 Plasma 5 測試,也會遇到之前 siyuan 提過的黑色桌面的問題。
只要將 printf 那一行移除,就可以正常進入桌面。

不過目前仍無法看到系統列的輸入法圖示。

1,2,next

cht電腦資訊gcin
adm Find login register
views:106058