diff --git a/ChangeLog b/ChangeLog index c2a21c3c36..4ca7105c88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-10-08 Richard Hult + + * gdk/quartz/gdkwindow-quartz.c: (gdk_window_focus): Implement, + patch from Paul Davis. + 2007-10-08 Richard Hult * gdk/quartz/gdkwindow-quartz.c: (move_resize_window_internal): diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c index fa7a752dbc..cfb831b27f 100644 --- a/gdk/quartz/gdkwindow-quartz.c +++ b/gdk/quartz/gdkwindow-quartz.c @@ -2039,9 +2039,23 @@ void gdk_window_focus (GdkWindow *window, guint32 timestamp) { + GdkWindowObject *private; + GdkWindowImplQuartz *impl; + g_return_if_fail (GDK_IS_WINDOW (window)); - /* FIXME: Implement */ + private = (GdkWindowObject*) window; + impl = GDK_WINDOW_IMPL_QUARTZ (private->impl); + + if (impl->toplevel) + { + if (private->accept_focus && private->window_type != GDK_WINDOW_TEMP) + { + GDK_QUARTZ_ALLOC_POOL; + [impl->toplevel makeKeyWindow]; + GDK_QUARTZ_RELEASE_POOL; + } + } } void