https://bugs.kde.org/show_bug.cgi?id=427569

--- Comment #1 from Yichao Yu <yyc1...@gmail.com> ---
I'm still not sure what's changed but the issue seems to be caused by showing a
widget before a parent is set.

In `app/viewmainpage.cpp`, `mThumbnailBar` was created without a parent and may
be set to visible immediately after creation before it is added to
`mThumbnailSplitter`. This caused a toplevel `QXcbWindow` to be created for it.

The following patch fixes/works around the issue.

```
diff --git a/app/viewmainpage.cpp b/app/viewmainpage.cpp
index 35c5ce59..d1faa431 100644
--- a/app/viewmainpage.cpp
+++ b/app/viewmainpage.cpp
@@ -148,7 +148,6 @@ struct ViewMainPagePrivate
         mThumbnailBar = new ThumbnailBarView;
         ThumbnailBarItemDelegate* delegate = new
ThumbnailBarItemDelegate(mThumbnailBar);
         mThumbnailBar->setItemDelegate(delegate);
-        mThumbnailBar->setVisible(GwenviewConfig::thumbnailBarIsVisible());
         mThumbnailBar->setSelectionMode(QAbstractItemView::ExtendedSelection);
     }

@@ -330,6 +329,7 @@ struct ViewMainPagePrivate
         mThumbnailSplitter->addWidget(mAdapterContainer);
         mThumbnailSplitter->addWidget(mThumbnailBar);
        
mThumbnailSplitter->setSizes(GwenviewConfig::thumbnailSplitterSizes());
+        mThumbnailBar->setVisible(GwenviewConfig::thumbnailBarIsVisible());

         QVBoxLayout* layout = new QVBoxLayout(q);
         layout->setContentsMargins(0, 0, 0, 0);
```

This seems to be fairly harmless. I'm not sure though if this is supposed to be
working.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to