Bug 391917 - Add shadows for CSD windows
Summary: Add shadows for CSD windows
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.12.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 400634 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-03-16 10:00 UTC by jeremy9856
Modified: 2018-11-17 16:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jeremy9856 2018-03-16 10:00:40 UTC
Hello,

There is no shadows for CSD windows. I don't know if it's a kwin or gtk or gnome problem but if it's not a kwin problem can you tell me where I should report the issue.

Thanks !
Comment 1 Martin Flöser 2018-03-16 15:07:56 UTC
KWin provides an API for applications to add shadows. This is e.g. used by KRunner which is also a CSD application.
Comment 2 jeremy9856 2018-03-16 15:49:58 UTC
Is it a KWin specific API or a "standard" one ? AFAIK CSD apps have shadows on other DE.
Comment 3 jeremy9856 2018-03-18 17:11:45 UTC
Martin, maybe you could provide some infos here, on the GTK bug report ?

https://gitlab.gnome.org/GNOME/gtk/issues/100
Comment 4 Martin Flöser 2018-03-18 17:28:12 UTC
(In reply to jeremy9856 from comment #3)
> Martin, maybe you could provide some infos here, on the GTK bug report ?
> 
> https://gitlab.gnome.org/GNOME/gtk/issues/100

Sorry, but I'm not interested. Bad history
Comment 5 jeremy9856 2018-03-18 17:47:15 UTC
Well I can imagine that, Gnome dev can be "difficult" to work with I guess. Maybe we can put that aside in the interest of a better experience of the KDE and start by providing the infos they need ? We have a great desktop environment and there is so much momentum at the the moment it's too bad to block on such basic things.
Comment 6 Martin Flöser 2018-03-18 19:37:02 UTC
Sorry, but no. That would create a stress level for me which I would not able to handle. Just answering right no already increases my pulse.
Comment 7 jeremy9856 2018-03-18 21:54:20 UTC
Ok no problem. I hope that it can be eventually fixed. Thank you.
Comment 8 Matej Mrenica 2018-05-22 18:12:33 UTC
Some CSD applications drop shadows under Wayland session. Try gnome-disk-utility on Plasma Wayland for example.
Comment 9 Vlad Zahorodnii 2018-11-03 18:47:23 UTC
*** Bug 400634 has been marked as a duplicate of this bug. ***
Comment 10 Gianluca Pettinello 2018-11-04 06:39:03 UTC
We all know that gnome developers are doing wrong because they build a DE based on their view imposed to the commumity rather than listening to the needs of the community. We also know that they regularly break standards and eve their own code as a theme valid for one version of gtk is not valid any more for the next. It is for this reason that, after many years of unity and xfce I moved to kde, I was tired to debug my theme every month...
This said I kindly ask to Martin to tell us how we can approach gnome community so that they fix the standard. I mean we can be many KDE users and if we push all together on the same point maybe we can get the result.
Gianluca
Comment 11 Martin Flöser 2018-11-04 07:26:41 UTC
I reported about 20 bugs in gnome's bug tracker when Dad broke. None got fixed. Do you really think it would change if users report it as well?
Comment 12 Martin Flöser 2018-11-04 12:53:04 UTC
(In reply to Martin Flöser from comment #11)
> I reported about 20 bugs in gnome's bug tracker when Dad broke. None got
> fixed. Do you really think it would change if users report it as well?

CSD not dad. Autocorrection...
Comment 13 Gianluca Pettinello 2018-11-17 13:52:19 UTC
First of all I apologize for the late reply
@Martin
You are right indeed Gnome developers are difficult to convince.
I have a question.
If we use gtk-nocsd package (in Archlinux AUR) we get server side decorations and shadow on the window. But I still miss the shadow under the menus in gtk apps. Looking at kwin code I see there is a piece of code in client.cpp

void Client::readGtkFrameExtents(Xcb::Property &prop)
{
    m_clientSideDecorated = !prop.isNull() && prop->type != 0;
    emit clientSideDecoratedChanged();
}

which I'm trying to hack into
void Client::readGtkFrameExtents(Xcb::Property &prop)
{
    m_clientSideDecorated = true;
    emit clientSideDecoratedChanged();
}

Am I going nowhere by forcing the compositor to treat gtk windows as normal windows?
Regards
Gianluca
Comment 14 Gianluca Pettinello 2018-11-17 13:53:55 UTC
Going nowhere indeed :(
Comment 15 Vlad Zahorodnii 2018-11-17 14:02:44 UTC
(In reply to Gianluca Pettinello from comment #13)
> But I still miss the shadow under the menus in gtk apps.
Widget style/GTK has to upload shadows. See https://community.kde.org/KWin/Shadow
Comment 16 Gianluca Pettinello 2018-11-17 14:59:23 UTC
What you mean that gtk has to upload the shadow? Has gtk to fill an atom with the properties of the shadow? Sorry if I say something wrong but I'm not an expert.
Comment 17 Vlad Zahorodnii 2018-11-17 15:03:23 UTC
(In reply to Gianluca Pettinello from comment #16)
> What you mean that gtk has to upload the shadow?
Yes. KWin has no idea what shadows tooltips and other popups have to have.
Comment 18 Martin Flöser 2018-11-17 16:01:12 UTC
You can check how breeze does it: https://cgit.kde.org/breeze.git/tree/kstyle/breezeshadowhelper.cpp#n502
Comment 19 Gianluca Pettinello 2018-11-17 16:44:01 UTC
But can we trap a gtk window and let breeze make the shadow its own way? So we get also consistency in the shadow rendering, while csd is against consistency.
Silly question: is it breeze or kwin who says if the shadow has to be drawn?