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 » StatusBar&InfoCtrl » Using SizeGrip on StatusBar locks mouse on Kubuntu Linux
Using SizeGrip on StatusBar locks mouse on Kubuntu Linux [message #14731] Tue, 11 March 2008 16:23 Go to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi,

It appears that using the SizeGrip on StatusBar to resize a TopWindow locks mouse on the whole X desktop on Kubuntu Linux. I do not know about other window managers. The only way out is to log in on a text console and kill the process in question. Then the mouse becomes operational again.

// Tom
Re: Using SizeGrip on StatusBar locks mouse on Kubuntu Linux [message #14744 is a reply to message #14731] Wed, 12 March 2008 14:37 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Tom1 wrote on Tue, 11 March 2008 11:23

Hi,

It appears that using the SizeGrip on StatusBar to resize a TopWindow locks mouse on the whole X desktop on Kubuntu Linux. I do not know about other window managers. The only way out is to log in on a text console and kill the process in question. Then the mouse becomes operational again.

// Tom


Which U++ version? There was a related SizeGrip fix not long ago.

Please make sure this is what you have in CtrlLib/ScrollBar.cpp:

void SizeGrip::LeftDown(Point p, dword flags)
{
	TopWindow *q = dynamic_cast<TopWindow *>(GetTopCtrl());
	if(!q || q->IsMaximized() || !q->IsSizeable()) return;
#ifdef PLATFORM_WIN32
	HWND hwnd = q->GetHWND();
	p = GetMousePos() - q->GetRect().TopLeft();
	if(hwnd) {
		::SendMessage(hwnd, WM_SYSCOMMAND, 0xf008, MAKELONG(p.x, p.y));
		::SendMessage(hwnd, WM_LBUTTONUP, 0, MAKELONG(p.x, p.y));
	}
#endif
#ifdef PLATFORM_X11
	if(_NET_Supported().Find(XAtom("_NET_WM_MOVERESIZE")) >= 0) {
		XUngrabPointer(Xdisplay, CurrentTime); // 2008-02-25 cxl/mdelfe... compiz fix... who has grabbed it anyway?...
		XClientMessageEvent m;
		m.type = ClientMessage;
		m.serial = 0;
		m.send_event = XTrue;
		m.window = q->GetWindow();
		m.message_type = XAtom("_NET_WM_MOVERESIZE");
		m.format = 32;
		p = GetMousePos();
		m.data.l[0] = p.x;
		m.data.l[1] = p.y;
		m.data.l[2] = 4;
		m.data.l[3] = 0;
		m.data.l[4] = 0;
		XSendEvent(Xdisplay, Xroot, 0, SubstructureNotifyMask|SubstructureRedirectMask,
		           (XEvent*)&m);
	}
#endif
}


(the critical line is the one with XUngrabPointer and comment...)

Mirek
Re: Using SizeGrip on StatusBar locks mouse on Kubuntu Linux [message #14759 is a reply to message #14744] Thu, 13 March 2008 10:53 Go to previous message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
OK, I updated to SVN.181 and this problem disappeared. Sorry to bother you and thanks Mirek!

// Tom
Previous Topic: howto add more InfoCtrl's to StatusBar?
Next Topic: Adding some spacing to a statusbar
Goto Forum:
  


Current Time: Fri Mar 29 07:50:12 CET 2024

Total time taken to generate the page: 0.01515 seconds