Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » codetip bug in the unbuntu9.04
codetip bug in the unbuntu9.04 [message #21498] Sat, 23 May 2009 04:29 Go to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
I use upp in the unbuntu9.04, when code tip happen, my can't input any character to codeeditor,keyboard is hung.I tested upp1209~1218,the bug all exist.
index.php?t=getfile&id=1734&private=0

as above,when codetip occur,keyboard can't input any thing.
Re: codetip bug in the unbuntu9.04 [message #21500 is a reply to message #21498] Sat, 23 May 2009 08:50 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I am unable to reproduce this Sad (Testing in Ubuntu 9.04, gnome)

-> I need more details.

32bit or 64bit ubuntu?

Gnome?

What is your keyboard settings?

Does it work in 1208? Obviously, if you could identify revision when it gets broken, fix should be trivial Smile

Mirek
Re: codetip bug in the unbuntu9.04 [message #21501 is a reply to message #21500] Sat, 23 May 2009 09:25 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
I not test 1209 ago version.
unbuntu9.04 is 32bit,gnome.
US english keyboard.
when thide window focus change to other window then reget focus keyboard is recover.but when codetip occur again,keyboard hung again.
I english is poor,sorry.
Re: codetip bug in the unbuntu9.04 [message #21502 is a reply to message #21501] Sat, 23 May 2009 09:59 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
gxl117 wrote on Sat, 23 May 2009 03:25

I not test 1209 ago version.



Could you? E.g. start with something old (like 1100) and then do bisection to find a cause? Smile Would save me a lot of time...

Mirek
Re: codetip bug in the unbuntu9.04 [message #21505 is a reply to message #21502] Sat, 23 May 2009 10:51 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
luzr wrote on Sat, 23 May 2009 09:59

gxl117 wrote on Sat, 23 May 2009 03:25

I not test 1209 ago version.



Could you? E.g. start with something old (like 1100) and then do bisection to find a cause? Smile Would save me a lot of time...

Mirek


I test 1100,it hasn't that bug. all thing is fine.
Re: codetip bug in the unbuntu9.04 [message #21506 is a reply to message #21505] Sat, 23 May 2009 12:14 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
I'm error,1100 also have that problem. it should conflict with SCIM.
Re: codetip bug in the unbuntu9.04 [message #21509 is a reply to message #21506] Sat, 23 May 2009 16:10 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
gxl117 wrote on Sat, 23 May 2009 06:14

I'm error,1100 also have that problem. it should conflict with SCIM.


So it is somehow related with SCIM?

Mirek
Re: codetip bug in the unbuntu9.04 [message #21510 is a reply to message #21509] Sat, 23 May 2009 17:14 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
luzr wrote on Sat, 23 May 2009 16:10

gxl117 wrote on Sat, 23 May 2009 06:14

I'm error,1100 also have that problem. it should conflict with SCIM.


So it is somehow related with SCIM?

Mirek


because theide is restore normal when I exit SCIM. but it can't input any multi-byte char. other app can.
Re: codetip bug in the unbuntu9.04 [message #21512 is a reply to message #21510] Sat, 23 May 2009 19:36 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
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.
Re: codetip bug in the unbuntu9.04 [message #21515 is a reply to message #21512] Sun, 24 May 2009 01:47 Go to previous messageGo to next message
gxl117 is currently offline  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 #21524 is a reply to message #21515] Sun, 24 May 2009 19:47 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, please, enlight me. Is SCIM something that gets intalled to Ubuntu by default?

I am asking because my 'default' install does not seem to have a problem.

The problem is that I need to reproduce the problem to fix it.

Mirek
Re: codetip bug in the unbuntu9.04 [message #21527 is a reply to message #21524] Sun, 24 May 2009 20:53 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
luzr wrote on Sun, 24 May 2009 19:47

Well, please, enlight me. Is SCIM something that gets intalled to Ubuntu by default?

I am asking because my 'default' install does not seem to have a problem.

The problem is that I need to reproduce the problem to fix it.

Mirek


I install ubuntu9.04 for chinese version,SCIM is automatic add some multibyte char input method.My SCIM version number is 1.4.6.

when keyboard hang,I move theide window or resize it or click other app window, codeeditor is restore.but if codetip occur again,keyboard hang again.when problem happen,my don't use chinese input method. keyboard is set to english.
Re: codetip bug in the unbuntu9.04 [message #21529 is a reply to message #21527] Sun, 24 May 2009 21:35 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
I confirm "scim-tables-zh-0.5.8-1" package is conflict with upp.I uninstall it,upp is normal.but I can't input chinese to theide not by the that input method. except that,codeeditor not show chinese correct,even charset set to UTF8.
Re: codetip bug in the unbuntu9.04 [message #21533 is a reply to message #21529] Mon, 25 May 2009 10:34 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Recently I`ve searched internet for SCIM discussions. Well, SCIM is told to be installed by default on Ubuntu with a number ob localizations - actually not only Asian, but even for some Cyrillic ones (but they actually don`t need it).
And it looks like SCIM is known to be buggy with a relatively large number of applications as it has incorrect input focus hooking behaviour in some situations. Thus it is sometimes recommended to use SCIM alternatives instead of original utility.
Hope this little info will help.
Re: codetip bug in the unbuntu9.04 [message #21616 is a reply to message #21533] Fri, 29 May 2009 14:51 Go to previous messageGo to next message
loki is currently offline  loki
Messages: 36
Registered: October 2007
Member
Hello, it seems, if this bug is related to the scim problem too. But I actually have no Ubuntu installation, so I cant test. Could you check, if you have the same problem if you just open and close a menu?
Re: codetip bug in the unbuntu9.04 [message #21960 is a reply to message #21616] Fri, 12 June 2009 13:46 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Ok, reproduced and started work on fixing.

Just for fun:

https://bugs.launchpad.net/ubuntu/+source/scim/+bug/293001

Mirek
Re: codetip bug in the unbuntu9.04 [message #21971 is a reply to message #21960] Sat, 13 June 2009 10:08 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
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 #21972 is a reply to message #21971] Sat, 13 June 2009 11:48 Go to previous messageGo to next message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
I tested it,keyboard don't hang. But Theide can't respond to SCIM,So it can't input Chinese.

BTW£ºI now do not use SCIM, I use Fcitx instead.Fcitx work very well.
Re: codetip bug in the unbuntu9.04 [message #21973 is a reply to message #21972] Sat, 13 June 2009 12:05 Go to previous messageGo to next message
gxl117 is currently offline  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 #21975 is a reply to message #21973] Sat, 13 June 2009 12:57 Go to previous messageGo to previous message
gxl117 is currently offline  gxl117
Messages: 71
Registered: March 2009
Location: China
Member
I'm sorry.SCIM still not normal.Fcitx is normal.
Previous Topic: highlight matching braces problem
Next Topic: Feature request to support existing projects
Goto Forum:
  


Current Time: Thu Mar 28 19:09:58 CET 2024

Total time taken to generate the page: 0.01237 seconds