|
|
|
@ -160,17 +160,9 @@ bool KSharedPixmap::x11Event(XEvent *event)
|
|
|
|
|
void *drawable_id = (void *) pixmap_id;
|
|
|
|
|
Drawable pixmap = *(Drawable*) drawable_id;
|
|
|
|
|
|
|
|
|
|
Status status = XGetGeometry(qt_xdisplay(), pixmap, &root, &dummy, &dummy, &width, &height, &udummy, &udummy);
|
|
|
|
|
|
|
|
|
|
// HACK
|
|
|
|
|
// XGetGeometry can return bogus values on some systems, leading to a SIGFPE
|
|
|
|
|
// See http://bugs.trinitydesktop.org/show_bug.cgi?id=1161 for details
|
|
|
|
|
// Work around that here...
|
|
|
|
|
if ((width < 1) || (height < 1))
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
if (status == BadDrawable)
|
|
|
|
|
if (!XGetGeometry(qt_xdisplay(), pixmap, &root, &dummy, &dummy, &width, &height, &udummy, &udummy)) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (d->rect.isEmpty())
|
|
|
|
|
{
|
|
|
|
|