mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-21 07:55:10 +02:00
macOS: Fix waiting for result from desktop notification not working
This commit is contained in:
@@ -139,6 +139,8 @@ Detailed list of changes
|
|||||||
|
|
||||||
- When dragging in rectangle select mode use a crosshair mouse cursor configurable via :opt:`pointer_shape_when_dragging`
|
- When dragging in rectangle select mode use a crosshair mouse cursor configurable via :opt:`pointer_shape_when_dragging`
|
||||||
|
|
||||||
|
- macOS: Fix waiting for result from desktop notification not working (:disc:`8379`)
|
||||||
|
|
||||||
|
|
||||||
0.39.1 [2025-02-01]
|
0.39.1 [2025-02-01]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -438,7 +438,7 @@ ident_in_list_of_notifications(NSString *ident, NSArray<UNNotification*> *list)
|
|||||||
|
|
||||||
void
|
void
|
||||||
cocoa_report_live_notifications(const char* ident) {
|
cocoa_report_live_notifications(const char* ident) {
|
||||||
do_notification_callback(ident, "live", "");
|
do_notification_callback(ident, "live", ident ? ident : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
|||||||
@@ -640,8 +640,10 @@ class MacOSIntegration(DesktopIntegration):
|
|||||||
return
|
return
|
||||||
if event == 'created':
|
if event == 'created':
|
||||||
n = self.notification_manager.notification_created(desktop_notification_id)
|
n = self.notification_manager.notification_created(desktop_notification_id)
|
||||||
from .fast_data_types import cocoa_live_delivered_notifications
|
# so that we purge dead notifications, check for live notifications
|
||||||
cocoa_live_delivered_notifications() # so that we purge dead notifications
|
# after a few seconds, cant check right away as cocoa does not
|
||||||
|
# report the created notification as live.
|
||||||
|
add_timer(self.check_live_delivered_notifications, 5.0, False)
|
||||||
if n and n.sound_name in standard_sound_names:
|
if n and n.sound_name in standard_sound_names:
|
||||||
from .fast_data_types import cocoa_play_system_sound_by_id_async
|
from .fast_data_types import cocoa_play_system_sound_by_id_async
|
||||||
cocoa_play_system_sound_by_id_async(standard_sound_names[n.sound_name][1])
|
cocoa_play_system_sound_by_id_async(standard_sound_names[n.sound_name][1])
|
||||||
@@ -666,6 +668,10 @@ class MacOSIntegration(DesktopIntegration):
|
|||||||
log_error('No category found with buttons:', n.buttons)
|
log_error('No category found with buttons:', n.buttons)
|
||||||
log_error('Current categories:', self.current_categories)
|
log_error('Current categories:', self.current_categories)
|
||||||
|
|
||||||
|
def check_live_delivered_notifications(self, *a: object) -> None:
|
||||||
|
from .fast_data_types import cocoa_live_delivered_notifications
|
||||||
|
cocoa_live_delivered_notifications()
|
||||||
|
|
||||||
|
|
||||||
class FreeDesktopIntegration(DesktopIntegration):
|
class FreeDesktopIntegration(DesktopIntegration):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user