Add methods to handle sending the image and badge over a DO connection via GSDockManager protocol - #928
Add methods to handle sending the image and badge over a DO connection via GSDockManager protocol#928gcasa wants to merge 12 commits into
Conversation
|
I found an additional issue with AClock: it does not reflect it's changes because it grabs the view and updates it. So there is another way this needs to be updated. I also found an error where the proxy isn't released properly. |
|
Is this still work in progress or ready for review? If the former is the case please convert it to draft. |
My apologies, still a WIP. |
20bf34e to
9d7b74b
Compare
|
@fredkiefer This PR is ready for review. |
…n via GSDockManager protocol
…heir icon via an nsview
9d7b74b to
0ffda06
Compare
|
@fredkiefer I have converted this back to a draft. As I am testing both with the new dock app and legacy apps I am discovering issues as I go. Give me a couple of days to finish this up and I will convert it back. I just didn't want to have you start reviewing and then change things out from under you. When I do convert it back it will be ready. |
|
@fredkiefer This should be safe to review now in its current form. |
There was a problem hiding this comment.
🟡 Changes recommended
There are API/behavioral correctness issues in the updated dock tile rendering path and the -requestUserAttention: return semantics that should be addressed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds support for pushing application icon image data and badge text over a Distributed Objects (DO) connection to an external dock/icon manager, enabling better integration with external dock applications while keeping the protocol methods optional for backward compatibility.
Changes:
- Render the dock tile into an offscreen
NSImageand send its image data + badge label toGSIconManager(NSDockTile/NSApplication). - Extend
GSIconManagerprotocol/client logic to send icon data, badge text, and user-attention requests over DO with reconnection/loss handling. - Align
NSDockTileownership test with the new defaultcontentViewbehavior.
File summaries
| File | Description |
|---|---|
| Tests/gui/NSDockTile/ownership.m | Updates the ownership test to explicitly set a content view before asserting retain/release behavior. |
| Source/NSDockTile.m | Switches dock tile rendering to offscreen drawing and forwards the rendered image + badge to GSIconManager. |
| Source/NSApplication.m | Sends app icon + badge updates to GSIconManager and forwards user-attention requests. |
| Source/GSIconManager.m | Expands the DO client/protocol to send icon image data, badge text, and attention requests, with connection monitoring. |
| Source/GSIconManager.h | Exposes new GSUpdateIconManager / GSRequestUserAttention APIs. |
| Headers/AppKit/NSDockTile.h | Updates ivars/forward declarations consistent with the new dock tile implementation. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: gcasa <27943+gcasa@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This addresses issue#927. This change adds methods to send the image data and badge information over the GSIconManager protocol. These methods are optional so that this doesn't break the existing contract between GNUstep and older users of this protocol. I am using NSData to keep the utilization overhead low.
I am using the app in https://github.com/gcasa/apps-dock to test this change. It is currently working. The main driver for this is to make integration between GNUstep and external dock applications easier. This does not change how the external app works, only how the dock manages the app. I've used my work on the apps-dock DockWM to shape the changes I've made to libs-gui. I have made them as minimal as possible.
Disclosure: I am using AI to help debug and test this. The apps-dock application uses AI pretty extensively; this change uses it in a limited way to suggest fixes when needed and to optimize the libs-gui changes.