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: Riccardo Canalicchio
Subject: Re: Dock app using distributed objects
Date: Tue, 7 Dec 2021 13:20:36 +0100

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



On Tue, 7 Dec 2021 at 11:08, Richard Frith-Macdonald <richard@frithmacdonald.me.uk> wrote:


> On 7 Dec 2021, at 08:48, Gregory Casamento <greg.casamento@gmail.com> wrote:
>
> Riccardo,
>
> Firstly, the dock is visually appealing, full marks. :)
>
>
> On Mon, Dec 6, 2021 at 3:03 PM Riccardo Canalicchio <riccardo.canalicchio@gmail.com> wrote:
> Hello,
> I have been thinking about how to have a live image representation of an app for a dock application and I wanted to try with distributed objects.
>
> But, secondly, I believe there is another, more lightweight, way that can be used to do this aside from DO.  The issue I see here is requiring every app to do it this way.  If you look in NSApplication you will see a reference to NSIconView and NSIconWindow.  These classes display the changing icon in WindowMaker (this is not an endorsement of wmaker, I would like a GS based Dock outside of GWorkspace as well).  So, perhaps, it is possible to do this without using Distributed Objects.   This is only a suggestion, I like where you're going.

Yes ... I remmber from many, many years ago (way back when I was working on the GUI) I had this working as it worked in NeXTstep:  the miniwindow used to be a fully functional window that a NeXTstep app could write into while it is in the dock.  This was used to create visual indicators, in the dock, of the state of an application.

I also recall being annoyed because Apple removed this functionality from OSX and replaced it with a different mechanism (much more limited and less technically satisfying, but a simpler way to achieve a similar effect in practice), though I don't recall the details.  I'm pretty sure we moved to match the OSX implementation.  I expect this is what WindowMaker is working with.



reply via email to

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