Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » codetip bug in the unbuntu9.04
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: codetip bug in the unbuntu9.04 [message #21515 is a reply to message #21512] |
Sun, 24 May 2009 01:47   |
gxl117
Messages: 71 Registered: March 2009 Location: China
|
Member |
|
|
| cbpporter wrote on Sat, 23 May 2009 19:36 |
| gxl117 wrote on Sat, 23 May 2009 18:14 | but it can't input any multi-byte char. other app can.
|
You can't enter these characters in TheIDE? If this is the case it's because TheIDE won't let you enter characters that are incompatible with the encoding of the current file. You must go to the properties of the file and change the encoding to Utf8.
|
that is not the reason.
I'm set editor charset to UTF8.
If SCIM is automatic launch with Xsystem,when theide codetip occur, can't input any char to editor,any thing! keyboard is hung!
if SCIM exit and restart it manual,Theide restore normal,when codetip occur,can input english char to codeeitor.but theide don't respond to SCIM, can't input multibyte char to editor,other app can accept input.
BTW, Even I set editor charset to UTF8,it also can't show multi-byte char,whenever editor show messy code for multibyte char.
windowsXP theide hasn't that problem.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: codetip bug in the unbuntu9.04 [message #21971 is a reply to message #21960] |
Sat, 13 June 2009 10:08   |
 |
mirek
Messages: 14290 Registered: November 2005
|
Ultimate Member |
|
|
Well, I am absolutely unsure about the fix, but this seems to help:
void Ctrl::Create0(Ctrl *owner, bool redirect, bool savebits)
{
GuiLock __;
ASSERT(IsMainThread());
LLOG("Create " << Name() << " " << GetRect());
ASSERT(!IsChild() && !IsOpen());
LLOG("Ungrab1");
ReleaseGrab();
XSetWindowAttributes swa;
swa.bit_gravity = ForgetGravity;
swa.background_pixmap = None;
swa.override_redirect = redirect;
swa.save_under = savebits;
Color c = SColorPaper();
swa.background_pixel = GetXPixel(c.GetR(), c.GetG(), c.GetB());
Rect r = GetRect();
isopen = true;
Window w = XCreateWindow(Xdisplay, RootWindow(Xdisplay, Xscreenno),
r.left, r.top, r.Width(), r.Height(),
0, CopyFromParent, InputOutput, CopyFromParent,
CWBitGravity|CWSaveUnder|CWOverrideRedirect|
(IsCompositedGui() ? CWBackPixel : CWBackPixmap),
&swa);
if(!w) XError("XCreateWindow failed !");
int i = Xwindow().Find(None);
if(i >= 0) Xwindow().SetKey(i, w);
XWindow& cw = i >= 0 ? Xwindow()[i] : Xwindow().Add(w);
cw.ctrl = this;
cw.exposed = false;
cw.owner = owner;
/*
cw.xic = xim ? XCreateIC(xim,
XNInputStyle, XIMPreeditNothing|XIMStatusNothing,
XNClientWindow, w,
XNFocusWindow, w,
NULL)
: NULL;
*/
// This seems to fix SCIM problem
cw.xic = xim ? XCreateIC((XIM)xim,
XNInputStyle, XIMPreeditNothing|XIMStatusNothing,
XNClientWindow, Xroot,
NULL)
: NULL;
top = new Top;
top->window = w;
long im_event_mask = 0;
if(cw.xic)
XGetICValues(cw.xic, XNFilterEvents, &im_event_mask, NULL);
XSelectInput(Xdisplay, w, ExposureMask|StructureNotifyMask|KeyPressMask|
FocusChangeMask|KeyPressMask|KeyReleaseMask|PointerMotionMask|
ButtonPressMask|ButtonReleaseMask|PropertyChangeMask|
VisibilityChangeMask|im_event_mask);
int version = 5;
XChangeProperty(Xdisplay, w, XAtom("XdndAware"), XA_ATOM, 32,
0, (byte *)&version, 1);
CancelMode();
if(r.Contains(GetMousePos()))
DispatchMouse(MOUSEMOVE, GetMousePos() - r.TopLeft());
if(redirect) {
int windowType = XInternAtom(Xdisplay, "_NET_WM_WINDOW_TYPE_POPUP_MENU", false);
XChangeProperty(Xdisplay, w, XInternAtom(Xdisplay, "_NET_WM_WINDOW_TYPE", false), XA_ATOM, 32,
PropModeReplace, (byte *)&windowType, 1);
}
RefreshLayoutDeep();
}
The question is how it will affect XIM usability - please check and report (it seems to work just fine with CS-CZ).
Mirek
|
|
|
|
|
|
| Re: codetip bug in the unbuntu9.04 [message #21973 is a reply to message #21972] |
Sat, 13 June 2009 12:05   |
gxl117
Messages: 71 Registered: March 2009 Location: China
|
Member |
|
|
OK,I fix it.as follow:
void Ctrl::Create0(Ctrl *owner, bool redirect, bool savebits)
{
GuiLock __;
ASSERT(IsMainThread());
LLOG("Create " << Name() << " " << GetRect());
ASSERT(!IsChild() && !IsOpen());
LLOG("Ungrab1");
ReleaseGrab();
XSetWindowAttributes swa;
swa.bit_gravity = ForgetGravity;
swa.background_pixmap = None;
swa.override_redirect = redirect;
swa.save_under = savebits;
Color c = SColorPaper();
swa.background_pixel = GetXPixel(c.GetR(), c.GetG(), c.GetB());
Rect r = GetRect();
isopen = true;
Window w = XCreateWindow(Xdisplay, RootWindow(Xdisplay, Xscreenno),
r.left, r.top, r.Width(), r.Height(),
0, CopyFromParent, InputOutput, CopyFromParent,
CWBitGravity|CWSaveUnder|CWOverrideRedirect|
(IsCompositedGui() ? CWBackPixel : CWBackPixmap),
&swa);
if(!w) XError("XCreateWindow failed !");
int i = Xwindow().Find(None);
if(i >= 0) Xwindow().SetKey(i, w);
XWindow& cw = i >= 0 ? Xwindow()[i] : Xwindow().Add(w);
cw.ctrl = this;
cw.exposed = false;
cw.owner = owner;
/*
cw.xic = xim ? XCreateIC(xim,
XNInputStyle, XIMPreeditNothing|XIMStatusNothing,
XNClientWindow, w,
XNFocusWindow, w,
NULL)
: NULL;
*/
// This seems to fix SCIM problem
cw.xic = xim ? XCreateIC((XIM)xim,
XNInputStyle, XIMPreeditNothing|XIMStatusNothing,
XNClientWindow, Xroot,
XNFocusWindow,w,//add this line,allow FCITX get input focus.
NULL)
: NULL;
[Updated on: Sat, 13 June 2009 13:17] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: codetip bug in the unbuntu9.04 [message #21996 is a reply to message #21994] |
Sun, 14 June 2009 14:36   |
 |
mirek
Messages: 14290 Registered: November 2005
|
Ultimate Member |
|
|
| gxl117 wrote on Sun, 14 June 2009 08:31 | Yes,I test FCITX Chinese input method.it also has this problem.
Should input method don't track cursor of LineEdit.
I also tested DocEdit,it has same problem.So may all upp text ctrl have that problem.
|
OK, working on fix.
Anyway, for that to work, I need to "invoke" that IM popup (not being CJK, I never did that).
Can you help me? Step by step, given I have english Ubuntu installed with XIM, how I am supposed to invoke it?
Install chinese keyboard or what?
Mirek
|
|
|
|
|
|
|
|
| Re: codetip bug in the unbuntu9.04 [message #22002 is a reply to message #22000] |
Sun, 14 June 2009 16:25   |
gxl117
Messages: 71 Registered: March 2009 Location: China
|
Member |
|
|
| luzr wrote on Sun, 14 June 2009 15:56 | I guess I have SCIM installed. It shows Chinese input methods just fine.
What I am not sure to do is how to invoke that popup. Should I press something or what?
Mirek
|
oh,If you install scim-tables-zh,you should have Chinese input mothod name WuBi.
press down key:Ctrl+space SCIM window will show,and repeat press down Ctrl+shift,until the window shown below:

you get chinese input mothod names WuBi.Followed by pressing the 'l' 'w' 't' 'y'. Popup will show. press space key,cinese char should input to editor,and popup hide.you can repeat this process.it shoule repeat input chinese word "ÊäÈë"¡£
-
Attachment: wubi.jpg
(Size: 2.68KB, Downloaded 956 times)
[Updated on: Sun, 14 June 2009 16:26] Report message to a moderator
|
|
|
|
|
|
| Re: codetip bug in the unbuntu9.04 [message #22006 is a reply to message #22003] |
Sun, 14 June 2009 17:27   |
gxl117
Messages: 71 Registered: March 2009 Location: China
|
Member |
|
|
| luzr wrote on Sun, 14 June 2009 16:45 | No success...
Nevermind, attempted fix does not seem to break anything; please check svn in 30 minutes and report results if possible...
Mirek
|
I tested SVN,it can't activate SCIM.When i undo XIMPreeditPosition to XIMPreeditNoting, SCIM can activate but popup can't track cursor.It always stayed in the upper left corner of the editor window.
[Updated on: Sun, 14 June 2009 17:40] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Tue Apr 28 19:33:11 GMT+2 2026
Total time taken to generate the page: 0.01136 seconds
|