Changeset View
Changeset View
Standalone View
Standalone View
xembed-sni-proxy/sniproxy.cpp
Show First 20 Lines • Show All 282 Lines • ▼ Show 20 Line(s) | 278 | { | |||
---|---|---|---|---|---|
283 | 283 | | |||
284 | if (!geom) { | 284 | if (!geom) { | ||
285 | return QImage(); | 285 | return QImage(); | ||
286 | } | 286 | } | ||
287 | 287 | | |||
288 | xcb_image_t *image = xcb_image_get(c, m_windowId, 0, 0, geom->width, geom->height, 0xFFFFFFFF, XCB_IMAGE_FORMAT_Z_PIXMAP); | 288 | xcb_image_t *image = xcb_image_get(c, m_windowId, 0, 0, geom->width, geom->height, 0xFFFFFFFF, XCB_IMAGE_FORMAT_Z_PIXMAP); | ||
289 | 289 | | |||
290 | // Don't hook up cleanup yet, we may use a different QImage after all | 290 | // Don't hook up cleanup yet, we may use a different QImage after all | ||
291 | QImage naiveConversion = QImage(image->data, image->width, image->height, QImage::Format_ARGB32); | 291 | QImage naiveConversion; | ||
292 | if (image) { | ||||
broulik: Just do
```
if (image) {
```
The indentation seems a little off, we use four spaces for… | |||||
maciejsitarz: Fixed the 'if' and indentation in the newly uploaded diff | |||||
293 | naiveConversion = QImage(image->data, image->width, image->height, QImage::Format_ARGB32); | ||||
294 | } else { | ||||
295 | qCDebug(SNIPROXY) << "Skip NULL image returned from xcb_image_get() for" << m_windowId << Title(); | ||||
296 | return QImage(); | ||||
297 | } | ||||
292 | 298 | | |||
293 | if (isTransparentImage(naiveConversion)) { | 299 | if (isTransparentImage(naiveConversion)) { | ||
294 | QImage elaborateConversion = QImage(convertFromNative(image)); | 300 | QImage elaborateConversion = QImage(convertFromNative(image)); | ||
295 | 301 | | |||
296 | // Update icon only if it is at least partially opaque. | 302 | // Update icon only if it is at least partially opaque. | ||
297 | // This is just a workaround for X11 bug: xembed icon may suddenly | 303 | // This is just a workaround for X11 bug: xembed icon may suddenly | ||
298 | // become transparent for a one or few frames. Reproducible at least | 304 | // become transparent for a one or few frames. Reproducible at least | ||
299 | // with WINE applications. | 305 | // with WINE applications. | ||
▲ Show 20 Lines • Show All 242 Lines • Show Last 20 Lines |
Just do
The indentation seems a little off, we use four spaces for indentation.