Bug 419300 - Selected message changes when modifying the color scheme
Summary: Selected message changes when modifying the color scheme
Status: CONFIRMED
Alias: None
Product: kmail2
Classification: Applications
Component: message list (show other bugs)
Version: 5.13.3
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-27 16:19 UTC by Michael D
Modified: 2020-10-24 15:29 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
video of issue (3.42 MB, video/mp4)
2020-03-27 16:19 UTC, Michael D
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael D 2020-03-27 16:19:43 UTC
Created attachment 127047 [details]
video of issue

Enable the kvantum theme KvYaru or KvMojaveLight. Select a kmail folder with multiple emails in it. Choose the last one, for instance. Switch focus to another window and watch the selected message change, probably to the first in the folder (but not always). I've attached a video demonstrating this. Does not occur with all kvantum themes and does not occur with Breeze widget style.
Comment 1 Laurent Montel 2020-03-28 14:20:12 UTC
So it's a bug about this theme.
Please report it against this theme.
Regards
Comment 2 Michael D 2020-03-28 14:22:12 UTC
According to the creator and maintainer of Kvantum, it can't be the theme or theme engine, in which case it's a bug in KMail. Some earlier discussion can be found on Kvantum's github: https://github.com/tsujan/Kvantum/issues/511
Comment 3 Christophe Marin 2020-03-28 15:52:07 UTC
If it was a KMail issue, we would be able to reproduce it with any theme.
Comment 4 Michael D 2020-03-28 16:08:34 UTC
Why would that be the case? The bug may or may not be exposed by different themes, at least in principle. I've never seen that bug anywhere but kmail, so it may be worth investigating given how many users use kvantum.
Comment 5 Christophe Marin 2020-03-28 17:00:57 UTC
the github reporter says: "KvYaru but not other themes (e.g. KvGnome)."

If not a kvantum issue, it's a kvyaru one.
Comment 6 Chris 2020-08-28 21:28:41 UTC
Hi all. I can report that I am also experiencing this bug with some Kvantum themes (e.g. KvGnomeDark, Mojave), but not with others (e.g. KvCyan, Arc). The difference between these themes is that the former themes change the style of various widgets when focus is toggled while the latter does not. 

I think this may be important. As the maintaner of Kvantum states in the following post, some kvantum themes change the colors of item-views when QEvent::WindowActivate or QEvent::WindowDeactivate is sent to the application (see https://github.com/tsujan/Kvantum/issues/511#issuecomment-604538708). Could it be possible that some component of kmail changes the selected row when the palette is changed?

I would also like to cross-reference Bug 425604. Its effects are reproducable in exactly the same way as this bug.
Comment 7 Chris 2020-08-28 21:42:02 UTC
(In reply to Chris from comment #6)
> I would also like to cross-reference Bug 425604. Its effects are
> reproducable in exactly the same way as this bug.

My apologies, I meant Bug 425665.
Comment 8 Chris 2020-10-24 06:21:16 UTC
I was looking into this again recently, and realised that their is a simple workaround.

Go to `/usr/share/Kvantum/<theme>/`, where `<theme>` is the theme that you are currently using. Symlink its `svg` file and copy its `kvconfig` file to the following folder: `~/.config/Kvantum/<theme>-no-inactiveness/`. 

Open the new `kvconfig` file in a text editor and find "`no_inactiveness=false`". Change `false` to `true`. 

Open *KvantumManager* and go to *Application Themes*. Select your new theme (i.e. `<theme>-no-inactiveness`) and add the following applications: 

"Kontact,KMail,KOrganizer,KAddressBook,Akregator,KNotes"

Click *Save*. Quit and re-open Kontact/Kmail, and you will see that you will no longer get the previous issue.
Comment 9 Christophe Marin 2020-10-24 15:07:43 UTC
(In reply to Chris from comment #6)
> Hi all. I can report that I am also experiencing this bug with some Kvantum
> themes (e.g. KvGnomeDark, Mojave), but not with others (e.g. KvCyan, Arc).
> The difference between these themes is that the former themes change the
> style of various widgets when focus is toggled while the latter does not. 
> 
> I think this may be important. As the maintaner of Kvantum states in the
> following post, some kvantum themes change the colors of item-views when
> QEvent::WindowActivate or QEvent::WindowDeactivate is sent to the
> application (see
> https://github.com/tsujan/Kvantum/issues/511#issuecomment-604538708). Could
> it be possible that some component of kmail changes the selected row when
> the palette is changed?
> 
*THIS* is a real issue that can be reproduced.

With Breeze:
1/ open a folder
2/ in systemsettings / colors, change the color scheme
3/ The message list is redrawn but the selected message changes

If you select another one and change the color scheme again, the same message as 3/ will be selected.
Comment 10 Christophe Marin 2020-10-24 15:29:13 UTC
Note that your workaround makes a lot of sense. changing the color when a window looses focus is a silly design. Redrawing everything has a cost.