Bug 335289 - Rendering of kwin context menu is broken
Summary: Rendering of kwin context menu is broken
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: git master
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-24 15:40 UTC by Elias Probst
Modified: 2015-01-13 13:24 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Rendering issue of kwin contextmenu (39.55 KB, image/png)
2014-05-24 15:40 UTC, Elias Probst
Details
Context menu without shadow (32.30 KB, image/png)
2014-05-25 23:12 UTC, Elias Probst
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elias Probst 2014-05-24 15:40:00 UTC
Created attachment 86801 [details]
Rendering issue of kwin contextmenu

The rendering of the kwin context menu is somehow broken.
It seems to be missing compositing and the rounded corners are filled with a black background.

See attached screenshot.

Running latest KF5/Plasma from git.
kwin supportInformation: http://pastebin.kde.org/pijhp066g
Comment 1 Elias Probst 2014-05-24 15:52:03 UTC
It seems this is not strictly related to kwin's context menu.
The same happens e.g. for the context menu in a text input in systemsettings or kinfocenter.
The context menu on the plasmashell desktop doesn't have the black-filled rounded corners, but is missing any shadows.
I actually couldn't find a single KF5-based application yet where the context menus are rendered as they should be.

Context menus in Thunderbird/Firefox are rendered just fine.
Comment 3 Elias Probst 2014-05-24 16:43:42 UTC
@Thomas: Thanks for the information. Looks like it was just a little too late for 5.3.0. Will apply this fix locally then until 5.3.1 is released.
Comment 4 Elias Probst 2014-05-24 17:02:28 UTC
Downstream bug for Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=511388
Comment 5 Elias Probst 2014-05-25 19:46:25 UTC
Re-opening as the initially described issue is only partially fixed by the Qt patch.
The black corners are gone, but the menus remain uncomposited (at least no shadow is rendered).
Comment 6 Thomas Lübking 2014-05-25 20:06:47 UTC
Do they have a shadow property?*
Can you upload a new screenshot?

*That's gonna be tricky, since you can't pick the window.
Run "xev -event substructure -root" and open the window, there'll be a "MapNotify" event (eventually some ;-)

eg:
MapNotify event, serial 18, synthetic NO, window 0x29c,
    event 0x29c, window 0x60040a, override YES

next, run "sleep 5; xprop -id 0x60040a | grep -i shadow", with "0x60040a" being the actual id you obtained, and open the popup within the next 5 seconds, then wait until the xprop command finishes.
Comment 7 Elias Probst 2014-05-25 23:12:10 UTC
Created attachment 86821 [details]
Context menu without shadow

It doesn't have a shadow property.

The other properties (without piping the output through grep):
_NET_WM_USER_TIME(CARDINAL) = 35512316
WM_TRANSIENT_FOR(WINDOW): window id # 0x1400002
XdndAware(ATOM) = BITMAP
_NET_WM_NAME(UTF8_STRING) = "KWin"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x3e, 0x7e, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x1400002
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: True
                Initial state is Normal State.
_NET_WM_PID(CARDINAL) = 3002
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 21786105
WM_CLASS(STRING) = "kwin", "kwin"
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: 2008, 1492
                user specified size: 210 by 190
                window gravity: Static
Comment 8 Martin Flöser 2014-05-26 06:19:17 UTC
Do other context menus have the shadow for you?
Comment 9 Thomas Lübking 2014-05-26 11:07:07 UTC
xcb_flush, https://codereview.qt-project.org/#change,85654
Elias' arms. Both. ;-)
Comment 10 Elias Probst 2014-05-26 13:30:13 UTC
(In reply to comment #8)
> Do other context menus have the shadow for you?

See comment#1:
> It seems this is not strictly related to kwin's context menu.
> The same happens e.g. for the context menu in a text input in systemsettings or kinfocenter.
> The context menu on the plasmashell desktop doesn't have the black-filled rounded corners, but is missing any shadows.
> I actually couldn't find a single KF5-based application yet where the context menus are rendered as they should be.

> Context menus in Thunderbird/Firefox are rendered just fine.

This statement remains true except of the "black-filled rounded corners", so it's only the shadows/compositing missin.

@Thomas:
Rebuilding now with the xcb_flush patch, will update once the build is done + I tested it.
Comment 11 Elias Probst 2014-05-26 15:13:03 UTC
Rebuilt now dev-qt/qtgui-5.3.0 with the patch from https://codereview.qt-project.org/#change,85654, restarted kwin and still have no shadows in kwin's windeco context menu.

The same for context menu in applications (restarted them after the rebuild).
Comment 12 Thomas Lübking 2014-05-26 15:37:33 UTC
oxygen might set the shadow property on the window WId (the non-ARGB one)

Dropping FF/TB and to rephrase Martins question: does any Qt/Oxygen styled popup menu (kwrite, kmail, dolphin, ...) have shadows?
Comment 13 Elias Probst 2014-05-26 15:52:28 UTC
> Dropping FF/TB and to rephrase Martins question: does any Qt/Oxygen styled popup menu (kwrite, kmail, dolphin, ...) have shadows?

Running a purely Qt5/KF5-based environment currently, so I don't have many applications to test this, but so far it was the same (no shadow) for at least konsole, khelpcenter, systemsettings, plasmashell, ksysguard, kinfocenter, …

To answer this question: No

I don't have Oxygen for Qt4 available right now to test this.
Comment 14 Martin Flöser 2014-05-26 16:17:55 UTC
just looked at the context menu of KWin (Qt5) and KMail (Qt4): no shadow for 
KWin, shadow for KMail. Looks like an Oxygen issue to me.
Comment 15 Martin Flöser 2015-01-13 08:25:03 UTC
I fixed that problem in Qt.
Comment 16 Elias Probst 2015-01-13 12:56:23 UTC
(In reply to Martin Gräßlin from comment #15)
> I fixed that problem in Qt.

Can you point me to the commit? I'd like to give the patch a try to see if it works for me.
Comment 17 Martin Flöser 2015-01-13 13:24:26 UTC
That should be https://codereview.qt-project.org/84169