mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kdeui: catch X11 errors in KSelectionOwner::_checkOwnership()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
75e94cc39f
commit
6b7c8d12bb
1 changed files with 5 additions and 0 deletions
|
@ -159,8 +159,13 @@ void KSelectionOwner::_checkOwnership()
|
|||
if (currentowner != d->x11window) {
|
||||
kDebug() << "Selection owner changed";
|
||||
emit lostOwnership();
|
||||
// NOTE: catching errors here is done to not get fatal I/O
|
||||
KXErrorHandler kx11errorhandler;
|
||||
XDestroyWindow(d->x11display, d->x11window);
|
||||
XFlush(d->x11display);
|
||||
if (kx11errorhandler.error(true)) {
|
||||
kDebug() << KXErrorHandler::errorMessage(kx11errorhandler.errorEvent());
|
||||
}
|
||||
d->x11window = None;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue