Set user_time from startup_id if window realized
For non-realized windows we set the user_time from the startup id on realization. However, if the window is already realized when the startup_id is not set we currently don't, but we should. (#573922)
This commit is contained in:
parent
87459ff86c
commit
5e0bd0c9be
@ -1503,15 +1503,18 @@ gtk_window_set_startup_id (GtkWindow *window,
|
|||||||
|
|
||||||
if (GTK_WIDGET_REALIZED (window))
|
if (GTK_WIDGET_REALIZED (window))
|
||||||
{
|
{
|
||||||
|
guint32 timestamp = extract_time_from_startup_id (priv->startup_id);
|
||||||
|
|
||||||
|
#ifdef GDK_WINDOWING_X11
|
||||||
|
if (timestamp != GDK_CURRENT_TIME)
|
||||||
|
gdk_x11_window_set_user_time (GTK_WIDGET (window)->window, timestamp);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Here we differentiate real and "fake" startup notification IDs,
|
/* Here we differentiate real and "fake" startup notification IDs,
|
||||||
* constructed on purpose just to pass interaction timestamp
|
* constructed on purpose just to pass interaction timestamp
|
||||||
*/
|
*/
|
||||||
if (startup_id_is_fake (priv->startup_id))
|
if (startup_id_is_fake (priv->startup_id))
|
||||||
{
|
|
||||||
guint32 timestamp = extract_time_from_startup_id (priv->startup_id);
|
|
||||||
|
|
||||||
gtk_window_present_with_time (window, timestamp);
|
gtk_window_present_with_time (window, timestamp);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gdk_window_set_startup_id (GTK_WIDGET (window)->window,
|
gdk_window_set_startup_id (GTK_WIDGET (window)->window,
|
||||||
|
Loading…
Reference in New Issue
Block a user