summaryrefslogtreecommitdiff
path: root/mozilla-1497534.patch
blob: 066c9199618732daae65c1c6b10c119fe1d090e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h
--- a/widget/gtk/nsWindow.h
+++ b/widget/gtk/nsWindow.h
@@ -287,6 +287,7 @@
     // descendant windows
     GtkWidget*         GetMozContainerWidget();
     GdkWindow*         GetGdkWindow() { return mGdkWindow; }
+    GtkWidget*         GetGtkWidget() { return mShell; }
     bool               IsDestroyed() { return mIsDestroyed; }
 
     void               DispatchDragEvent(mozilla::EventMessage aMsg,
diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -7480,5 +7480,10 @@
       }
   }
 
-  return (gFocusWindow == window);
-}
+  GtkWidget* widget = window->GetGtkWidget();
+  if (widget) {
+      return !(gtk_widget_get_state_flags(widget) & GTK_STATE_FLAG_BACKDROP);
+  }
+
+  return false;
+}

bgstack15