Bug 403817 - On canvas color selector triggers a taskbar entry in plasma
Summary: On canvas color selector triggers a taskbar entry in plasma
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Victor Wåhlström
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-01 06:32 UTC by Raghavendra kamath
Modified: 2019-05-05 09:25 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
video demonstrating the duplicate entry in taskbar (206.69 KB, video/mp4)
2019-02-01 06:32 UTC, Raghavendra kamath
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raghavendra kamath 2019-02-01 06:32:10 UTC
Created attachment 117767 [details]
video demonstrating the duplicate entry in taskbar

SUMMARY
When using krita with plasma desktop environment, the on canvas color selector triggers the taskbar entry. I have attached a video demonstrating the duplicate taskbar entry being popping up and going when the color selector disappears.

On IRC wolthera and deevad also confirmed this. 

STEPS TO REPRODUCE
1. Open latest krita under plasma desktop, open a new file
2. press shift + I to get on canvas color selector popup.
3. you'll notice the task bar gets a duplicate krita entry, which will disappear as the color selector will go.

OBSERVED RESULT
color selectoir behaves as if it is a window of its own

EXPECTED RESULT
color selector should be contained withing the application

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.14.5
Qt Version: 5.12.0
KDE Frameworks Version: 5.54.0
Kernel Version: 4.20.5-arch1-1-ARCH
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-4790K CPU @ 4.00GHz
Memory: 15.6 GiB of RAM
Comment 1 wolthera 2019-02-22 17:21:42 UTC
Can confirm, no idea why it happens.
Comment 2 Ashwin Dhakaita 2019-02-26 17:31:25 UTC
I found this comment in kiscolorselectorbase.cpp. Under lazyCreatePopup function.

/**
         * On Linux passing Qt::X11BypassWindowManagerHint makes
         * the window never hide if one switches it with Alt+Tab
         * or something like that. The window also don't get any
         * mouse-enter/leave events. So we have to make it normal
         * window (which is visible to the window manager and
         * appears in the tasks bar). Therefore we don't use it
         * anyomore.
         */

Apparently, it is voluntarily made to behave in such a manner.
Comment 3 Halla Rempt 2019-04-30 11:37:24 UTC
Yes, removing the Qt::Window flag will cause all kinds of issues, so we'll have to live with this.
Comment 4 Victor Wåhlström 2019-05-01 14:05:39 UTC
While that comment is correct, it is possible to set Qt::BypassWindowManagerHint and then workaround the issues mentioned by the comment.

The workaround might have side effects, but nothing we shouldn't be able to test for. I'll provide a patch for review once I've familiarized myself with the new gitlab workflow.
Comment 5 Victor Wåhlström 2019-05-05 09:25:30 UTC
Git commit 840a169728efdc1fc3c0e99859e469e167c182ca by Victor Wåhlström.
Committed on 05/05/2019 at 09:24.
Pushed by victorw into branch 'master'.

Prevent additional taskbar entry when invoking the on-canvas color selector

M  +27   -11   plugins/dockers/advancedcolorselector/kis_color_selector_base.cpp
M  +2    -0    plugins/dockers/advancedcolorselector/kis_color_selector_base.h

https://invent.kde.org/kde/krita/commit/840a169728efdc1fc3c0e99859e469e167c182ca