Don't crash when XGrabKeyboard() fails for some reason.
svn path=/trunk/KDE/kdebase/workspace/; revision=798523
This commit is contained in:
parent
c1b759bd10
commit
0af83a41ec
1 changed files with 4 additions and 1 deletions
|
@ -298,7 +298,10 @@ bool grabXKeyboard( Window w )
|
|||
|
||||
void ungrabXKeyboard()
|
||||
{
|
||||
assert( keyboard_grabbed );
|
||||
if( !keyboard_grabbed )
|
||||
{ // grabXKeyboard() may fail sometimes, so don't fail, but at least warn anyway
|
||||
kDebug() << "ungrabXKeyboard() called but keyboard not grabbed!";
|
||||
}
|
||||
keyboard_grabbed = false;
|
||||
XUngrabKeyboard( display(), xTime());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue