Changeset View
Changeset View
Standalone View
Standalone View
src/PlatformBackends/X11ImageGrabber.cpp
Show First 20 Lines • Show All 427 Lines • ▼ Show 20 Line(s) | 423 | { | |||
---|---|---|---|---|---|
428 | mPixmap = getToplevelPixmap(QRect(), false); | 428 | mPixmap = getToplevelPixmap(QRect(), false); | ||
429 | 429 | | |||
430 | // now that we know we have a transient window, let's | 430 | // now that we know we have a transient window, let's | ||
431 | // find other possible transient windows and the app window itself. | 431 | // find other possible transient windows and the app window itself. | ||
432 | QRegion clipRegion; | 432 | QRegion clipRegion; | ||
433 | 433 | | |||
434 | QSet<xcb_window_t> transients; | 434 | QSet<xcb_window_t> transients; | ||
435 | xcb_window_t parentWinId = curWin; | 435 | xcb_window_t parentWinId = curWin; | ||
436 | const QRect desktopRect(0, 0, 1, 1); | ||||
rkflx: `const` | |||||
436 | do { | 437 | do { | ||
437 | // find parent window and add the window to the visible region | 438 | // find parent window and add the window to the visible region | ||
438 | xcb_window_t winId = parentWinId; | 439 | xcb_window_t winId = parentWinId; | ||
439 | QRect winRect; | 440 | QRect winRect; | ||
440 | parentWinId = getTransientWindowParent(winId, winRect); | 441 | parentWinId = getTransientWindowParent(winId, winRect); | ||
441 | transients << winId; | 442 | transients << winId; | ||
443 | | ||||
444 | // Don't include the 1x1 pixel sized desktop window in the top left corner that is present | ||||
445 | // if the window is a QDialog without a parent. | ||||
446 | // BUG: 376350 | ||||
447 | if (winRect != desktopRect) { | ||||
442 | clipRegion += winRect; | 448 | clipRegion += winRect; | ||
449 | } | ||||
443 | 450 | | |||
444 | // Continue walking only if this is a transient window (having a parent) | 451 | // Continue walking only if this is a transient window (having a parent) | ||
445 | } while (parentWinId != XCB_WINDOW_NONE && !transients.contains(parentWinId)); | 452 | } while (parentWinId != XCB_WINDOW_NONE && !transients.contains(parentWinId)); | ||
446 | 453 | | |||
447 | 454 | | |||
448 | // All parents are known now, find other transient children. | 455 | // All parents are known now, find other transient children. | ||
449 | // Assume that the lowest window is behind everything else, then if a new | 456 | // Assume that the lowest window is behind everything else, then if a new | ||
450 | // transient window is discovered, its children can then also be found. | 457 | // transient window is discovered, its children can then also be found. | ||
▲ Show 20 Lines • Show All 264 Lines • Show Last 20 Lines |
const