| Summary: | Tabbox previews are missing | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Elias Probst <mail> |
| Component: | tabbox | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | Flags: | mgraesslin:
ReviewRequest+
|
| Priority: | NOR | ||
| Version First Reported In: | 4.9.80 | ||
| Target Milestone: | --- | ||
| Platform: | Gentoo Packages | ||
| OS: | Linux | ||
| URL: | https://git.reviewboard.kde.org/r/122170/ | ||
| Latest Commit: | http://commits.kde.org/kwin/4a260c6f42f5d09f1657b750fc2eb72dafcf4f23 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Bug Depends on: | |||
| Bug Blocks: | 343081 | ||
| Attachments: | Screenshow showing the broken layout of the "Grid" tabbox preview in different sizes | ||
to be honest: almost all previews are a little bit broken. The problem is that a dialog which is supposed to be put on full screen is smashed into a window. the previews got improved in 5.x - do you consider this bug as fixed nowadays? Now all previews are completely empty - just the background is shown. Updating currently and will retry in a few minutes. Ok, after updating + restarting everything: the previews are still completely empty - just their background is shown. There aren't any related log messages neither from kwin nor the KCM. maybe we broke things when moving the layouts around... Will test on a clean install. I cannot reproduce with a clean install (tested kubuntu live cd) The problem seems to be the hardcoded desktop files in layoutpreview.cpp which are used for the preview.
Adding this debug statement to layoutpreview.cpp:
diff --git a/kcmkwin/kwintabbox/layoutpreview.cpp b/kcmkwin/kwintabbox/layoutpreview.cpp
index 87ed1ba..7900fb2 100644
--- a/kcmkwin/kwintabbox/layoutpreview.cpp
+++ b/kcmkwin/kwintabbox/layoutpreview.cpp
@@ -140,6 +140,9 @@ void ExampleClientModel::init()
if (service) {
m_nameList << service->entryPath();
}
+ else {
+ qDebug() << "Unable to create service for" << "kde4-" + application + ".desktop";
+ }
}
}
Gave me the following result:
Unable to create service for "kde4-konqbrowser.desktop"
Unable to create service for "kde4-KMail2.desktop"
Unable to create service for "kde4-systemsettings.desktop"
Unable to create service for "kde4-dolphin.desktop"
So the preview "blindly" assumes these applications are installed wherever kwintabbox is used.
The current approach is IMHO rather fragile, e.g. I don't have any "KDE4" apps installed and there dolphin's desktop file isn't even named dolphin.desktop but org.kde.dolphin.desktop.
I think it would make more sense to create 4 dummy applications/desktop files to be shipped with tabbox and to use them instead.
Thanks for the investigation. Yes, that needs changing. I cloned the bug to have this one about the new problem starting from comment #3. Git commit 4a260c6f42f5d09f1657b750fc2eb72dafcf4f23 by Martin Gräßlin. Committed on 20/01/2015 at 14:16. Pushed by graesslin into branch 'Plasma/5.2'. [kcmkwin/tabbox] Improve locating the services used in preview mode Instead of hard coding the desktop files, let's try to use what the user actually uses. * Browser mapped from text/html mime type * File manager mapped from inode/directory mime type * Email client mapped from message/rfc822 mime type Only systemsettings is "hard coded" as there is no mime type to map. The thumbnails are not changed, though. But they are so small that it's hardly recognizable anyway. For future it could be considered to map against appdata to get a better screenshot. REVIEW: 122170 M +26 -19 kcmkwin/kwintabbox/layoutpreview.cpp M +6 -1 kcmkwin/kwintabbox/layoutpreview.h http://commits.kde.org/kwin/4a260c6f42f5d09f1657b750fc2eb72dafcf4f23 |
Created attachment 75457 [details] Screenshow showing the broken layout of the "Grid" tabbox preview in different sizes The layout preview for the "Grid" tabbox has a broken layout (the actual tabbox works). By default, the window which shows the preview is very small (first window in attached screenshot). The window previews overlap each other and the icon/application name are shown above the window preview. When resizing it a little bit, one can reach a partially good looking preview, but the icon/application name placement is still a little off, as it seems not to be attached something like "20px below the window preview" but more like "spread evenly across the available space". When resizing the window even further, it is clearly visible that the icon/application name is attached to the bottom of each application's area. I also noted that the size of the preview window must be somewhere stored, as when having the preview window resized, then closing + re-opening it, it still shows the previous size. This might be the reason, this broken layout went unnoticed, as during the development/test phase the window was resized once and in every further iteration the preview looked mostly ok.