Basically integrating xfce4-windowck-plugin into xfwm4 itself. Unity had a similar toggle for title bar in its Appearance dialog.
Panel should be selected either automatically (any horizontal panel that's snapped to top/bottom border, top-side having the priority) or by a user from a drop-down list.
Edited
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
As a laptor user, I find the Hide title of windows when maximized (i.e. titleless_maximize) option super handy. However, I feel like the current implementation of it doesn't make much sense and is frankly half-baked.
When I select Hide title of windows when maximized, where does it go? How am I supposed to control windows now? But this is more of a side question.
The main request is to instead turn it into Show title of maximized windows on the panel, as being discussed below.
To be honest, I'm already using this feature plus xfce4-windowck-plugin so my needs are met. I just came to the conclusion that just hiding the title bar is kind of useless, in my opinion.
I kinda agree. I wonder how others use is other than the above example. I use it the same way. I would not know how to use the "hide top bar of windows when maximized" without the xfce4-windowck-plugin to have some control over the maximized window, else I am unaware how to un-maximize it. Maybe indeed xfce4-windowck-plugin should not only provide the window buttons as a plugin for the panel, but also a top window bar integration somehow if possible.
You're thinking of it the other way around. xfce4-windowck-plugin already does what it can do. As I said initially, ideally xfwm4 integrates some of windowck's code and provides this feature via its own panel plugins.
@KBar How does xfwm4 decide where on panel it put title and buttons? Could they be divided by panel plugins?
Do you suggest that xfwm4 should provide panel plugin similar to windowck?
I think it makes way more sense to have an option for the xfce4-windowck-plugin that basically hides not only the window buttons but the title bar too. And to work with CSD windows too, where it hides the control buttons at least. We have integrated a Unity like layout for our custom linux distro TROMjaro, and we use global menus + top bar integration. But looks bad for CSD windows since the window buttons cannot be hidden via XFCE.
Can you tell a bit more about what you mean by "global menus + top bar integration" ?
Is that something similar to traditional MacOS' top menu bar, that shows the menu of the currently active application ?
I know the plugin does not hide anything but makes sense to perhaps make it hide at least the buttons of windows if possible. We are brainstorming here how to achieve a better layout configuration and how these things are used. For me, the xfce4-windowck-plugin makes sense when one creates a Unity-like layout. And for that you need 3 things:
1 display the window buttons with options such as only when the window is maximized.
2. hide the window buttons for the window itself so that you do not have duplicated window buttons.
3. hide the topbar of windows when maximized so that it all blends well with the top bar/panel.
This is how it looks in TROMjaro:
We have selected to hide the top bar of windows when a window is maximized + show the window buttons on the top panel when a windows is maximized. But it doesn't work with CSD windows....simply because the plugin or XFCE itself does not have an option to remove the window buttons for the CSD windows...
For CSD windows there's nothing we can do, except fixing the clients.
Yet another example, why CSD is a really bad and egoistic idea to begin with. The correct approach would have been a protocol by which clients can communicate to the WM what things they wish to put into the title bar, and let the WM take care of everything. At that point we should also do this with the application's menu bar, so we can easily create layouts like the classic MacOS.
Yes exactly. CSD is awful in that regards. I think that the best for now is to be able to at least hide the window buttons. This way it looks like it is integrated into the top panel.
To show you an example. This is how it looks on TROMjaro (our distro) with the Unity layout and a non-csd window:
This is how it looks with a CSD window:
This is how it could look with a CSD window if we were to at least hide the window buttons:
I think simply hiding the window buttons for CSD windows is going to kinda fix it in terms of how it looks. Now you get 2 sets of window buttons.
The second bar in the CSD example (the one with the magnifying glass icon) is coming from the application, right ?
In that case, I don't see much we can do from window manager or panel side, unless touching the individual application's source code.
By the way, the first example (Thunar) still makes me wonder how exactly this technically is working: it really looks like Thunar's menu bar is appearing in the panel (quite the class MacOS style). There gotta be some way of communication between these two. Is there some X protocol for that ? Or some funny reparenting trick ?
It's vala-panel-appmenu (https://github.com/rilian-la-te/vala-panel-appmenu). I believe it uses libwnck + DBus shenanigans to force-move the menu bar to the panel. I don't know much about the details. There is no X protocol for that; it doesn't know anything about menu bars, AFAIK.
Yes the bar in the second csd example is the same. I removed the window buttons in GIMP to showcase how it could look like if we simply removed the window buttons of CSD windows when maximized.
And Akbarkhon is right we use the vala packages to extract the menus and add them to the top panel. Except the CSD ones, most do work with this.
Can you tell a bit more about what you mean by "global menus + top bar integration" ? Is that something similar to traditional MacOS' top menu bar, that shows the menu of the currently active application ?
Yes. See https://www.tromjaro.com/ - we made an XFCE layout switcher that switches between different layouts.
There is a plugin for that, vala-panel-appmenu. That's something different, though.
I want my maximized window to have its title bar not be hidden and inaccessible but rather moved to the panel. I guess it's best to share a video of Unity which I am a big fan of: https://youtu.be/xmLBhLeJMHE?t=443
It quite clearly demonstrates what I want. Just ignore the app menu in the video. When unmaximized, windows have their title bar in place. On maximize, it is moved to the top panel. Buttons are hidden now, while the title is displayed all across the panel. On mouse hover, buttons reappear and the app menu replaces window title but, again, let's ignore it. This sound a bit complicated, but even the simpler implementation should be more than enough: instead of hiding title bar of maximized windows (both CSD and SSD), just move them to the panel via internal plugins.
AS far as I understand the way Unity does it is a hack of hiding the title bar of the window and simulate one on that top bar. Also, unity has that unique top bar. XFCE has panels...making it a lot more difficult to implement the way you describe it. From what I understand.
The way we do it, and looks very much like Unity, is to simultaneously hide the top bar of windows when maximized and the borders, then enable the xfce4-windowck-plugin. The code is here https://git.trom.tf/TROMjaro/layout-switcher-package
Works great really. But for CSD windows the buttons of the window cannot be hidden since there is no top bar to be hidden anyway....
Ah, it's not about the application's menu bar (like on MacOS), but just the frame's title bar ?
Okay, that shouldn't be such a big deal: just have a panel plugin that shows title bar of the currently focused maximized window, present some buttons, etc. At least most of some actions (eg. closing, max/unmax, etc) should be pretty straightforward to implement from there, maybe few things (eg. starting an interactive resize/move) need some additional messaging, but that shouldn't be terribly complicated via window properties / messages.
The more tricky part seems to be the runtime configuration: the panel plugin needs to know when to do that.
Maybe the plugin should watch on xfwm's xfconf settings, or maybe it should be communicated via root window properties.
If you are going to implement this feature then probably the simplest way to do this is to start with merging windowck into xfwm4. I can try to prepare MR.