mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 03:12:56 +00:00
avoid pointer with zero comparison
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
435771058d
commit
28277d1805
1 changed files with 4 additions and 4 deletions
|
@ -2737,7 +2737,7 @@ void QApplicationPrivate::openPopup(QWidget *popup)
|
|||
GrabModeAsync, GrabModeAsync, XNone, XNone, qt_x11Data->time);
|
||||
if (!(popupGrabOk = (r == GrabSuccess))) {
|
||||
// transfer grab back to the keyboard grabber if any
|
||||
if (QWidgetPrivate::keyboardGrabber != 0)
|
||||
if (QWidgetPrivate::keyboardGrabber)
|
||||
QWidgetPrivate::keyboardGrabber->grabKeyboard();
|
||||
else
|
||||
XUngrabKeyboard(dpy, qt_x11Data->time);
|
||||
|
@ -2782,13 +2782,13 @@ void QApplicationPrivate::closePopup(QWidget *popup)
|
|||
replayPopupMouseEvent = true;
|
||||
}
|
||||
// transfer grab back to mouse grabber if any, otherwise release the grab
|
||||
if (QWidgetPrivate::mouseGrabber != 0)
|
||||
if (QWidgetPrivate::mouseGrabber)
|
||||
QWidgetPrivate::mouseGrabber->grabMouse();
|
||||
else
|
||||
XUngrabPointer(dpy, qt_x11Data->time);
|
||||
|
||||
// transfer grab back to keyboard grabber if any, otherwise release the grab
|
||||
if (QWidgetPrivate::keyboardGrabber != 0)
|
||||
if (QWidgetPrivate::keyboardGrabber)
|
||||
QWidgetPrivate::keyboardGrabber->grabKeyboard();
|
||||
else
|
||||
XUngrabKeyboard(dpy, qt_x11Data->time);
|
||||
|
@ -2827,7 +2827,7 @@ void QApplicationPrivate::closePopup(QWidget *popup)
|
|||
GrabModeAsync, GrabModeAsync, XNone, XNone, qt_x11Data->time);
|
||||
if (!(popupGrabOk = (r == GrabSuccess))) {
|
||||
// transfer grab back to keyboard grabber
|
||||
if (QWidgetPrivate::keyboardGrabber != 0)
|
||||
if (QWidgetPrivate::keyboardGrabber)
|
||||
QWidgetPrivate::keyboardGrabber->grabKeyboard();
|
||||
else
|
||||
XUngrabKeyboard(dpy, qt_x11Data->time);
|
||||
|
|
Loading…
Add table
Reference in a new issue