discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dock app using distributed objects


From: Hugo Melder
Subject: Re: Dock app using distributed objects
Date: Mon, 13 Dec 2021 15:27:37 +0100

A neat dock! It's good that you don't use libxcb or other xorg libraries. I've seen other proof-of-concept docks that depend on libxcb e.g. https://github.com/AlessandroSangiuliano/Puck and considering the long-term move to wayland-based environment this is a better approach.

On Tue, Dec 7 2021 at 01:20:36 PM +0100, Riccardo Canalicchio <riccardo.canalicchio@gmail.com> wrote:
thanks for the feedback, it is really appreciated,
the idea of DO came from looking at the osx api for the NSStatusBar [1] ideally one could have something like:

[[Dock systemDock] registerDockTile: dockTileView];
[dockTileView setTitle:@"My app name"];
[dockTileView setMenu:menu];
...
[dockTileView setBadgeLabel:@"4"];

I did evaluate different approaches less invasive from the "client" point of view but they would require different implementations based on the backend in use and would lead to different results.
This is because they would need to reparent the mini windows to the dock.
On Xorg this could be achieved using Xembed [2] (kde used to have something like this) while on wayland with the XDG foreign protocol (unstable atm) [3].
In the end, I opted for DO mainly because it could be implemented entirely in gnustep, it would be consistent across backends and would provide all the features I would expect from a dock as well the possibility to render the tiles in a cohesive way.

To make the dock registration optional for apps and support non-gnustep applications the dock could have a mechanism to automatically generate dock tiles listening to the running processes and then allow through the api to customise the appearance and the menu.
Contributions also in the form of suggestions are more than welcome :D

best regards,
Riccardo

[1] https://github.com/tjarratt/NSStatusItemExample/blob/master/NSStatusItemExample/AppDelegate.m
[2] https://specifications.freedesktop.org/xembed-spec/xembed-spec-latest.html
[3] https://wayland.app/protocols/xdg-foreign-unstable-v2

reply via email to

[Prev in Thread] Current Thread [Next in Thread]