mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
Add public meta_window_get_user_time
Useful for sorting windows by interaction time.
This commit is contained in:
parent
35b1dda3a3
commit
81183c71c1
@ -8456,6 +8456,26 @@ meta_window_stack_just_below (MetaWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_user_time:
|
||||
*
|
||||
* The user time represents a timestamp for the last time the user
|
||||
* interacted with this window. Note this property is only available
|
||||
* for non-override-redirect windows.
|
||||
*
|
||||
* The property is set by Mutter initially upon window creation,
|
||||
* and updated thereafter on input events (key and button presses) seen by Mutter,
|
||||
* client updates to the _NET_WM_USER_TIME property (if later than the current time)
|
||||
* and when focusing the window.
|
||||
*
|
||||
* Returns: The last time the user interacted with this window.
|
||||
*/
|
||||
guint32
|
||||
meta_window_get_user_time (MetaWindow *window)
|
||||
{
|
||||
return window->net_wm_user_time;
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_set_user_time (MetaWindow *window,
|
||||
guint32 timestamp)
|
||||
|
@ -118,6 +118,7 @@ const char *meta_window_get_title (MetaWindow *window);
|
||||
MetaWindow *meta_window_get_transient_for (MetaWindow *window);
|
||||
void meta_window_delete (MetaWindow *window,
|
||||
guint32 timestamp);
|
||||
guint32 meta_window_get_user_time (MetaWindow *window);
|
||||
int meta_window_get_pid (MetaWindow *window);
|
||||
const char *meta_window_get_client_machine (MetaWindow *window);
|
||||
gboolean meta_window_is_modal (MetaWindow *window);
|
||||
|
Loading…
Reference in New Issue
Block a user