Commit 99005e254b6055e63fc432efd38b9a5a2d0ffcc9

Fixed passing a zero drawable to X11 api causing X errors.

In the windowsurface we shouldn't create a backingstore pixmap if the
window has invalid size.

Reviewed-by: Samuel
  
139139 QWindowSurface::setGeometry(rect);
140140
141141 const QSize size = rect.size();
142 if (d_ptr->device.size() == size)
142
143 if (d_ptr->device.size() == size || size.width() <= 0 || size.height() <= 0)
143144 return;
144145#ifndef QT_NO_XRENDER
145146 if (d_ptr->translucentBackground) {
184184 }
185185 }
186186
187 if (gc)
187 if (gc) {
188188 XFreeGC(X11->display, gc);
189 gc = XCreateGC(X11->display, d_ptr->device.handle(), 0, 0);
190 XSetGraphicsExposures(X11->display, gc, False);
189 gc = 0;
190 }
191 if (!d_ptr->device.isNull()) {
192 gc = XCreateGC(X11->display, d_ptr->device.handle(), 0, 0);
193 XSetGraphicsExposures(X11->display, gc, False);
194 }
191195}
192196
193197bool QX11WindowSurface::scroll(const QRegion &area, int dx, int dy)