diff --git a/src/core/window.c b/src/core/window.c index 5f5e62b78..a3997a76b 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -136,7 +136,8 @@ enum { PROP_MINI_ICON, PROP_DECORATED, PROP_FULLSCREEN, - PROP_WINDOW_TYPE + PROP_WINDOW_TYPE, + PROP_USER_TIME }; enum @@ -202,6 +203,9 @@ meta_window_get_property(GObject *object, case PROP_WINDOW_TYPE: g_value_set_enum (value, win->type); break; + case PROP_USER_TIME: + g_value_set_uint (value, win->net_wm_user_time); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -280,6 +284,16 @@ meta_window_class_init (MetaWindowClass *klass) META_WINDOW_NORMAL, G_PARAM_READABLE)); + g_object_class_install_property (object_class, + PROP_USER_TIME, + g_param_spec_uint ("user-time", + "User time", + "Timestamp of last user interaction", + 0, + G_MAXUINT, + 0, + G_PARAM_READABLE)); + window_signals[WORKSPACE_CHANGED] = g_signal_new ("workspace-changed", G_TYPE_FROM_CLASS (object_class), @@ -8514,6 +8528,8 @@ meta_window_set_user_time (MetaWindow *window, __window_is_terminal (window)) window->display->allow_terminal_deactivation = FALSE; } + + g_object_notify (G_OBJECT (window), "user-time"); } /* Sets the demands_attention hint on a window, but only