Cleanup previous PR

This commit is contained in:
Kovid Goyal
2026-02-21 21:30:24 +05:30
parent c32cc2233a
commit 2e1e89f280
3 changed files with 6 additions and 13 deletions

View File

@@ -229,6 +229,9 @@ Detailed list of changes
- Wayland: Add support for the background blur extension (:iss:`9534`)
- macOS: A new option :opt:`macos_dock_badge_on_bell` to show a badge on the
kitty dock icon when a bell occurs (:pull:`9529`)
0.45.0 [2025-12-24]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -67,4 +67,3 @@ void get_cocoa_key_equivalent(uint32_t, int, char *key, size_t key_sz, int*);
void set_cocoa_pending_action(CocoaPendingAction action, const char*);
void cocoa_report_live_notifications(const char* ident);
void cocoa_set_dock_badge(const char *label);
void cocoa_clear_dock_badge(void);

View File

@@ -1345,16 +1345,7 @@ void
cocoa_set_dock_badge(const char *label) {
@autoreleasepool {
NSDockTile *dockTile = [NSApp dockTile];
[dockTile setBadgeLabel:@(label)];
[dockTile display];
}
}
void
cocoa_clear_dock_badge(void) {
@autoreleasepool {
NSDockTile *dockTile = [NSApp dockTile];
[dockTile setBadgeLabel:nil];
[dockTile setBadgeLabel:label ? @(label) : nil];
[dockTile display];
}
}
@@ -1386,8 +1377,8 @@ init_cocoa(PyObject *module) {
addObserverForName:NSApplicationDidBecomeActiveNotification
object:nil
queue:[NSOperationQueue mainQueue]
usingBlock:^(NSNotification *note __attribute__((unused))) {
cocoa_clear_dock_badge();
usingBlock:^(NSNotification *note UNUSED) {
cocoa_set_dock_badge(NULL);
}];
return true;
}