Bug 405619 - kwin won't blur flatpak menus
Summary: kwin won't blur flatpak menus
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.14.5
Platform: Flatpak Linux
: NOR normal
Target Milestone: ---
Assignee: Mike
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-18 22:54 UTC by Mikel Pérez
Modified: 2020-05-08 03:10 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Bug (31.22 KB, patch)
2020-05-08 03:09 UTC, Mike
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikel Pérez 2019-03-18 22:54:15 UTC
SUMMARY
I have the translucency and blur effects enabled. On normal apps, they work and menus are a target of it. on flatpaked apps, only translucency takes place

STEPS TO REPRODUCE
1. enable the Translucency and Blur effects
2. open a normal app
3. open a flatpak version of that app
(one to try is org.kde.konsole)

OBSERVED RESULT
menus translucency isn't blurred

EXPECTED RESULT
menus translucency blurred

SOFTWARE/OS VERSIONS
Linux: Fedora 29
KDE Plasma Version: 5.14.5
KDE Frameworks Version: 5.55.0
Qt Version: 5.11.3

ADDITIONAL INFORMATION
I think it happens on wayland too
Comment 1 Mikel Pérez 2019-03-18 23:04:01 UTC
actually on wayland it's something different: it works on non-flatpak apps the first 3-4 times and then starts only being translucent most of the time but sometimes it's also blurry. with flatpak apps both effects just don't work
Comment 2 David Edmundson 2019-03-18 23:19:36 UTC
Please run xprop and click on the should-be-blurred window.
Comment 3 Mikel Pérez 2019-03-19 00:39:38 UTC
(In reply to David Edmundson from comment #2)
> Please run xprop and click on the should-be-blurred window.

how do I do that with a menu open?
Comment 4 David Edmundson 2019-03-19 11:27:09 UTC
sleep 5 ; xprop
Comment 5 Mikel Pérez 2019-03-20 20:10:10 UTC
(In reply to David Edmundson from comment #4)
> sleep 5 ; xprop

it prints
xprop: error: Can't grab the mouse.

when a menu is open
Comment 6 Vlad Zahorodnii 2019-03-28 12:27:25 UTC
(In reply to Mikel Pérez from comment #5)
> xprop: error: Can't grab the mouse.

I work around that by running xprop and then using only keyboard to open a popup that I would like to test.
Comment 7 Mikel Pérez 2019-03-28 19:10:05 UTC
(In reply to Vlad Zagorodniy from comment #6)
> (In reply to Mikel Pérez from comment #5)
> > xprop: error: Can't grab the mouse.
> 
> I work around that by running xprop and then using only keyboard to open a
> popup that I would like to test.

fantastic thanks!· this is xprop's output of a nonblurred menu in org.kde.konsole flatpak

_NET_WM_USER_TIME(CARDINAL) = 401223988
WM_TRANSIENT_FOR(WINDOW): window id # 0x5400007
_KDE_NET_WM_SHADOW(CARDINAL) = 88080409, 88080411, 88080412, 88080413, 88080414, 88080415, 88080416, 88080417, 8, 18, 28, 18
_NET_WM_ICON_NAME(UTF8_STRING) = 
_KDE_NET_WM_DESKTOP_FILE(UTF8_STRING) = "org.kde.konsole"
_NET_WM_ICON(CARDINAL) = *snipped*
XdndAware(ATOM) = BITMAP
WM_NAME(STRING) =
_NET_WM_NAME(UTF8_STRING) = "Konsole"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x3e, 0x7e, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DROPDOWN_MENU, _NET_WM_WINDOW_TYPE_POPUP_MENU, _NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x5400009
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
window id # of group leader: 0x5400009
_NET_WM_PID(CARDINAL) = 2
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 88080452
WM_CLASS(STRING) = "konsole", "konsole"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NORMAL_HINTS(WM_SIZE_HINTS):
user specified location: 436, 431
user specified size: 287 by 252
window gravity: Static
Comment 8 Vlad Zahorodnii 2019-04-01 08:19:04 UTC
Hmm, I don't see _KDE_NET_WM_BLUR_BEHIND_REGION.

> 1. enable the Translucency and Blur effects

Could you please expand on this? What exactly did you do?
Comment 9 Nate Graham 2019-04-01 16:30:59 UTC
System Settings > Desktop Behavior > Desktop Effects > turn on Blur effect

System Settings > Application Style > Widget Style > Breeze > Configure > Transparency tab > Set the slider to something other than "Opaque"
Comment 10 Mikel Pérez 2019-04-01 16:56:48 UTC
(In reply to Nate Graham from comment #9)
> System Settings > Desktop Behavior > Desktop Effects > turn on Blur effect
> 
> System Settings > Application Style > Widget Style > Breeze > Configure >
> Transparency tab > Set the slider to something other than "Opaque"

oh, I thought the transparency was due to the Translucency effect -- but it's actually due to both! breeze's transparency yields the properly blurred (because i have the blur effect on) translucent menus -but normal ones on flatpak qt apps and (non-flatpaked) gtk apps-, while the Translucency effect (in Desktop Behaviour > Desktop Effects) yields the translucent but not blurred menus on gtk and flatpaks
Comment 11 Nate Graham 2019-04-01 17:25:00 UTC
Oh, so is there a bug here?
Comment 12 Mikel Pérez 2019-04-01 18:06:52 UTC
(In reply to Nate Graham from comment #11)
> Oh, so is there a bug here?

yes, flatpak apps don't respect breeze transparency
Comment 13 Mikel Pérez 2019-04-01 18:09:28 UTC
I also suppose they wouldn't blur since they don't have _KDE_NET_WM_BLUR_BEHIND_REGION but since they're not transparent I don't know
Comment 14 Vlad Zahorodnii 2019-04-01 19:28:36 UTC
@Nate I know how to enable blur behind context menus. I asked that question because the first item in STEPS TO REPRODUCE was ambiguous.

> while the Translucency effect (in Desktop Behaviour > Desktop Effects) yields the translucent but not blurred menus on gtk and flatpaks

The translucency effect has nothing to do with blur.

Could you please post your ~/.config/breezerc?
Comment 15 Mikel Pérez 2019-04-01 21:08:04 UTC
(In reply to Vlad Zagorodniy from comment #14)
> @Nate I know how to enable blur behind context menus. I asked that question
> because the first item in STEPS TO REPRODUCE was ambiguous.
> 
> > while the Translucency effect (in Desktop Behaviour > Desktop Effects) yields the translucent but not blurred menus on gtk and flatpaks
> 
> The translucency effect has nothing to do with blur.
> 
> Could you please post your ~/.config/breezerc?

I'm aware of that, but I thought the translucency effect was the one adding the translucency to the menus, but it turned out to be breeze. what I'm saying is that only the menus that respect breeze's transparency are blurred, in case it helps you pinpoint the issue

here's my breezerc

[Common]
ShadowStrength=89
[Style]
MenuOpacity=35
[Windeco]
ButtonSize=ButtonSmall
DrawSizeGrip=true
TitleAlignment=AlignLeft
Comment 16 David Edmundson 2019-04-01 21:09:20 UTC
Afterwards please copy and paste ~/.config/breezerc into ~/.var/org.kde.konsole/config/breezerc and verify that works,

It almost certainly will, at which point we'll move this into kconfig/breeze getting xdg-portal support.
Comment 17 Mikel Pérez 2019-04-02 01:52:19 UTC
(In reply to David Edmundson from comment #16)
> Afterwards please copy and paste ~/.config/breezerc into
> ~/.var/org.kde.konsole/config/breezerc and verify that works,
> 
> It almost certainly will, at which point we'll move this into kconfig/breeze
> getting xdg-portal support.

yep, it works
Comment 18 postix 2019-12-15 11:55:21 UTC
(In reply to Mikel Pérez from comment #10)
> oh, I thought the transparency was due to the Translucency effect -- but
> it's actually due to both! breeze's transparency yields the properly blurred
> (because i have the blur effect on) translucent menus -but normal ones on
> flatpak qt apps and (non-flatpaked) gtk apps-, while the Translucency effect
> (in Desktop Behaviour > Desktop Effects) yields the translucent but not
> blurred menus on gtk and flatpaks

(In reply to Mikel Pérez from comment #15)
> I thought the translucency effect was the one adding
> the translucency to the menus, but it turned out to be breeze. what I'm
> saying is that only the menus that respect breeze's transparency are
> blurred, in case it helps you pinpoint the issue

---

>  while the Translucency effect
> (in Desktop Behaviour > Desktop Effects) yields the translucent but not
> blurred menus on gtk and flatpaks

Is that the reason / bug why menus of GTK apps are transparent but not blurred at all on my system?
Having two settings for transparency is confusing indeed.

#System settings
Operating System: Manjaro Linux 
KDE Plasma Version: 5.17.4
KDE Frameworks Version: 5.65.0
Qt Version: 5.13.2
Comment 19 Vlad Zahorodnii 2020-01-16 14:35:49 UTC
(In reply to Postix from comment #18)
> Is that the reason / bug why menus of GTK apps are transparent but not
> blurred at all on my system?
Well, no, it's because those applications don't set _KDE_NET_WM_BLUR_BEHIND_REGION and GTK provides us no any way to do that.
Comment 20 Mike 2020-05-08 03:09:33 UTC
Created attachment 128246 [details]
Bug