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++ Library support » U++ Library : Other (not classified elsewhere) » BUG: Key states incorrectly cleared on Ubuntu
BUG: Key states incorrectly cleared on Ubuntu [message #23648] Tue, 10 November 2009 16:14 Go to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I've noticed a problem with key handling on Ubuntu 8.04 when the 'Appearance->Visual Effects' setting is on 'Normal Effects'. The keyboard state gets cleared when the mouse is clicked, preventing the use of key modifiers like K_CTRL and stopping multi-selection from working.

The problem appears on all Upp apps, including the 2008.1 version of TheIde. I've also tested it with a svn version from about a week ago.

I have found a solution, but I am unsure whether it will cause any undesirable side effects, since I'm not sure why ClearKbdState_ is being called in TakeFocus at all.

In TakeFocus (X11Wnd.cpp, line 839) change:
	ClearKbdState_();
	if(IsEnabled() && IsVisible() && top->window != GetXServerFocusWindow())
		SetWndFocus();

to:
	if(IsEnabled() && IsVisible() && top->window != GetXServerFocusWindow()) {
		ClearKbdState_();
		SetWndFocus();
	}


It's very annoying that different settings on the same window manager can change it's X event profile!
Re: BUG: Key states incorrectly cleared on Ubuntu [message #23652 is a reply to message #23648] Tue, 10 November 2009 23:21 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
mrjt wrote on Tue, 10 November 2009 10:14

I've noticed a problem with key handling on Ubuntu 8.04 when the 'Appearance->Visual Effects' setting is on 'Normal Effects'. The keyboard state gets cleared when the mouse is clicked, preventing the use of key modifiers like K_CTRL and stopping multi-selection from working.

The problem appears on all Upp apps, including the 2008.1 version of TheIde. I've also tested it with a svn version from about a week ago.

I have found a solution, but I am unsure whether it will cause any undesirable side effects, since I'm not sure why ClearKbdState_ is being called in TakeFocus at all.

In TakeFocus (X11Wnd.cpp, line 839) change:
	ClearKbdState_();
	if(IsEnabled() && IsVisible() && top->window != GetXServerFocusWindow())
		SetWndFocus();

to:
	if(IsEnabled() && IsVisible() && top->window != GetXServerFocusWindow()) {
		ClearKbdState_();
		SetWndFocus();
	}


It's very annoying that different settings on the same window manager can change it's X event profile!


OK. Obviously, ClearKbdState_ is called to prevent some similar undesirable effects of various WM... It is obviously strange that TakeFocus gets called so much often.

Anyway, I goes there really is nothing wrong with calling it only for focus really changing.. Applied.

Mirek
Previous Topic: BUG: EditKeys
Next Topic: User lists of "bad" naming of classes, functions etc in U++...
Goto Forum:
  


Current Time: Thu Mar 28 14:59:35 CET 2024

Total time taken to generate the page: 0.01112 seconds