diff options
author | Matthias Clasen <mclasen@redhat.com> | 2005-02-21 03:38:31 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-02-21 03:38:31 +0000 |
commit | a1670a154a5462f2673d05b8c2e16742a93e986a (patch) | |
tree | 92fd6470500da0c87a2db00a75d2450dba578f6a /gtk/gtkwindow.c | |
parent | 6a19b7b8946ffe3d9e7ac79e4fe0a213e20be74e (diff) | |
download | gtk+-a1670a154a5462f2673d05b8c2e16742a93e986a.tar.gz |
Use the timestamp of the last user interaction when focusing the window.
2005-02-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkwindow.c (gtk_window_present): Use the timestamp of
the last user interaction when focusing the window. (#166379,
Elijah Newren)
Diffstat (limited to 'gtk/gtkwindow.c')
-rw-r--r-- | gtk/gtkwindow.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 { |