Bug 435706 - Allow applications to draw content in the KWin titlebar
Summary: Allow applications to draw content in the KWin titlebar
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-13 21:53 UTC by Mircea Kitsune
Modified: 2021-04-14 00:36 UTC (History)
3 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 Mircea Kitsune 2021-04-13 21:53:26 UTC
This suggestion kicked off after recently dealing with Client-Side-Decorations in GTK3 applications and having to install a patch called GTK3-noCSD. It's additionally relevant now that KDE just implemented what it calls the hamburger menu, which seems like a step in the right direction.

I feel it's legitimate to ask whether the time has come to support applications being allowed to draw menu / tab / toolbar items directly in the KWin titlebar. This is one of the few features of modern desktops KDE doesn't yet offer, with Gnome being a common example of it: It allows applications to draw special items right in place of the window title, which can host tabs or search fields or backward / forward buttons or anything else. I'd also reference the many Chromium / Firefox KDE users who've been dreaming for years about having the ability to make their browser tabs show up in the window titlebar for extra space.

https://i.imgur.com/M2LlXiB.png

I'm not sure how such a system would work under the hood, though I do know some of the basics have already been done; We have the Application Menu titlebar button, which allows putting the menu bar of Qt and GTK applications in a button or even a plasma widget... we could thus start by offering the option to draw the titlebar on the KWin decoration. If we're talking more complex widgets then it may be a different story: Applications need a way to tell KWin they want it to draw things like a search field or custom button in the titlebar, which may require changes to how Qt and GTK decorations communicate to window managers to request drawing application content. Such a framework should already exist: I'd once more point to the Firefox browser which knows to tell a compatible window manager that it wants its tabs drawn in the title bar.
Comment 1 The Feren OS Dev 2021-04-13 22:46:30 UTC
A person from KDE has already expressed a similar idea: https://kver.wordpress.com/2014/10/25/presenting-dwd-a-candidate-for-kde-window-decorations/
Comment 2 Mircea Kitsune 2021-04-13 23:31:54 UTC
(In reply to The Feren OS Dev from comment #1)

That's very nice and exciting, thank you for sharing! I strongly hope it's an idea that will materialize in time.
Comment 3 Nate Graham 2021-04-14 00:36:33 UTC
It's an interesting idea.

And as you can see, that bug post is from 2014--quite a while ago. So it's not new either. Over the years, some speculative attempts were made, but in the end, it's the kind of thing that just doesn't really work out too well in practice. You can see a real-world implementation of this feature in some Windows apps, which put a limited number of buttons in the toolbar--usually just 3 or 4, if that. It's a minor thing with very little impact on the overall user experience. Overall the technical implementation challenges probably outweigh what few advantages would come from it.

So I don't think we'll end up going in this direction, probably. Sorry. :)