Implement backdrop for Quartz

We need to send window state change events to make GTK+
pick up on focus changed for backdrop.

https://bugzilla.gnome.org/show_bug.cgi?id=779392
This commit is contained in:
Matthias Clasen
2017-02-28 20:45:18 -05:00
parent 60e7e15f54
commit 953abc19da

View File

@@ -74,6 +74,7 @@
{ {
GdkWindow *window = [[self contentView] gdkWindow]; GdkWindow *window = [[self contentView] gdkWindow];
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FOCUSED);
_gdk_quartz_events_update_focus_window (window, TRUE); _gdk_quartz_events_update_focus_window (window, TRUE);
} }
@@ -82,6 +83,7 @@
GdkWindow *window = [[self contentView] gdkWindow]; GdkWindow *window = [[self contentView] gdkWindow];
_gdk_quartz_events_update_focus_window (window, FALSE); _gdk_quartz_events_update_focus_window (window, FALSE);
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_FOCUSED, 0);
} }
-(void)windowDidBecomeMain:(NSNotification *)aNotification -(void)windowDidBecomeMain:(NSNotification *)aNotification