summaryrefslogtreecommitdiff
path: root/D132929.diff
blob: 0a6184217e470afdebaa5f91115bcfa081e5c2af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -2946,7 +2946,12 @@
       uint32_t timestamp = GDK_CURRENT_TIME;
 
       nsGTKToolkit* GTKToolkit = nsGTKToolkit::GetToolkit();
-      if (GTKToolkit) timestamp = GTKToolkit->GetFocusTimestamp();
+      if (GTKToolkit) {
+        timestamp = GTKToolkit->GetFocusTimestamp();
+      }
+      if (!timestamp) {
+        timestamp = GetLastUserInputTime();
+      }
 
       LOG("  requesting toplevel activation [%p]\n", (void*)toplevelWindow);
       gtk_window_present_with_time(GTK_WINDOW(toplevelWindow->mShell),

bgstack15