diff --git a/ChangeLog b/ChangeLog index 2da3a8cf09..a827090667 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-02-20 Matthias Clasen + + * gtk/gtkwindow.c (gtk_window_present): Use the timestamp of + the last user interaction when focusing the window. (#166379, + Elijah Newren) + Thu Feb 17 14:58:16 2005 Manish Singh * gtk/gtkuimanager.c (start_element_handler): make sure expand diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 2da3a8cf09..a827090667 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2005-02-20 Matthias Clasen + + * gtk/gtkwindow.c (gtk_window_present): Use the timestamp of + the last user interaction when focusing the window. (#166379, + Elijah Newren) + Thu Feb 17 14:58:16 2005 Manish Singh * gtk/gtkuimanager.c (start_element_handler): make sure expand diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 2da3a8cf09..a827090667 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2005-02-20 Matthias Clasen + + * gtk/gtkwindow.c (gtk_window_present): Use the timestamp of + the last user interaction when focusing the window. (#166379, + Elijah Newren) + Thu Feb 17 14:58:16 2005 Manish Singh * gtk/gtkuimanager.c (start_element_handler): make sure expand diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 20b024369c..ad5d6f05e4 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -45,6 +45,10 @@ #include "gtkmarshalers.h" #include "gtkplug.h" +#ifdef GDK_WINDOWING_X11 +#include "x11/gdkx.h" +#endif + enum { SET_FOCUS, FRAME_EVENT, @@ -5932,8 +5936,13 @@ gtk_window_present (GtkWindow *window) /* note that gdk_window_focus() will also move the window to * the current desktop, for WM spec compliant window managers. */ +#ifdef GDK_WINDOWING_X11 + gdk_window_focus (widget->window, + gdk_x11_display_get_user_time (gtk_widget_get_display (widget))); +#else gdk_window_focus (widget->window, gtk_get_current_event_time ()); +#endif } else {