xpra icon
Bug tracker and wiki

Ticket #469: osx-notification-window.c

File osx-notification-window.c, 622 bytes (added by Antoine Martin, 3 years ago)

example code using the window from the notification object

Line 
1-(void)windowDidBecomeKey:(NSNotification *)aNotification
2{
3  NSWindow *win = [aNotification object];
4  GdkQuartzView *view = (GdkQuartzView *)[win contentView];
5  GdkWindow *window = [view gdkWindow];
6  g_warning ("windowDidBecomeKey: %x", window);
7
8  _gdk_quartz_events_update_focus_window (window, TRUE);
9}
10
11-(void)windowDidResignKey:(NSNotification *)aNotification
12{
13  NSWindow *win = [aNotification object];
14  GdkQuartzView *view = (GdkQuartzView *)[win contentView];
15  GdkWindow *window = [view gdkWindow];
16  g_warning ("windowDidResignKey: %x", window);
17
18  _gdk_quartz_events_update_focus_window (window, FALSE);
19}