Skip to content

Commit cc0744f

Browse files
committed
fix: x11 preview display when window effects are set to optimal performance.
as title Log: as title pms: BUG-292179
1 parent c7a5b09 commit cc0744f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

panels/dock/taskmanager/x11preview.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ class AppItemWindowDeletegate : public QAbstractItemDelegate
259259
QRect hoverRect = option.rect;
260260

261261
QPen pen;
262-
if (WM_HELPER->hasComposite()) {
262+
if (WM_HELPER->hasComposite() && WM_HELPER->hasBlurWindow()) {
263263
auto pixmap = index.data(WindowPreviewContentRole).value<QPixmap>();
264264
auto size = calSize(pixmap.size());
265265
auto scaledPixmap = pixmap.scaled(size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
@@ -334,7 +334,7 @@ class AppItemWindowDeletegate : public QAbstractItemDelegate
334334

335335
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override
336336
{
337-
if (!WM_HELPER->hasComposite()) {
337+
if (!WM_HELPER->hasComposite() || !WM_HELPER->hasBlurWindow()) {
338338
return QSize(PREVIEW_CONTENT_MAX_WIDTH + PREVIEW_HOVER_BORDER * 2, PREVIEW_TITLE_HEIGHT + PREVIEW_HOVER_BORDER * 2);
339339
}
340340

@@ -458,7 +458,7 @@ void X11WindowPreviewContainer::showPreview(const QPointer<AppItem> &item, const
458458
void X11WindowPreviewContainer::updateOrientation()
459459
{
460460

461-
if (m_direction % 2 == 0 && WM_HELPER->hasComposite()) {
461+
if (m_direction % 2 == 0 && WM_HELPER->hasComposite() && WM_HELPER->hasBlurWindow()) {
462462
m_view->setFlow(QListView::LeftToRight);
463463
} else {
464464
m_view->setFlow(QListView::TopToBottom);

0 commit comments

Comments
 (0)