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 |
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 |
|
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
|
|
|
|
Goto Forum:
Current Time: Fri Mar 29 07:50:12 CET 2024
Total time taken to generate the page: 0.01515 seconds
|