Bug 1507608 - [Linux/Gtk+] Mark also mShell as app paintable when drawing to mContainer, r=jhorak
authorMartin Stransky <stransky@redhat.com>
Wed, 21 Nov 2018 14:44:06 +0000
changeset 506683 12cd6bf51cdeafb596082068b7c925a844b37a83
parent 506682 85c1c4e2b17e12286b897a59c9e2f1727b2bac3c
child 506684 f340a2489f7366a1383ac842ac3191a19e26b500
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjhorak
bugs1507608
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1507608 - [Linux/Gtk+] Mark also mShell as app paintable when drawing to mContainer, r=jhorak Differential Revision: https://phabricator.services.mozilla.com/D12430
widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -3930,23 +3930,25 @@ nsWindow::Create(nsIWidget* aParent,
          */
         GtkStyleContext* style = gtk_widget_get_style_context(mShell);
         drawToContainer =
             !mIsX11Display ||
             (mCSDSupportLevel == CSD_SUPPORT_CLIENT) ||
             gtk_style_context_has_class(style, "csd");
         eventWidget = (drawToContainer) ? container : mShell;
 
-        gtk_widget_add_events(eventWidget, kEvents);
-        if (drawToContainer)
-            gtk_widget_add_events(mShell, GDK_PROPERTY_CHANGE_MASK);
-
         // Prevent GtkWindow from painting a background to avoid flickering.
         gtk_widget_set_app_paintable(eventWidget, TRUE);
 
+        gtk_widget_add_events(eventWidget, kEvents);
+        if (drawToContainer) {
+            gtk_widget_add_events(mShell, GDK_PROPERTY_CHANGE_MASK);
+            gtk_widget_set_app_paintable(mShell, TRUE);
+        }
+
         // If we draw to mContainer window then configure it now because
         // gtk_container_add() realizes the child widget.
         gtk_widget_set_has_window(container, drawToContainer);
 
         gtk_container_add(GTK_CONTAINER(mShell), container);
         gtk_widget_realize(container);
 
         // make sure this is the focus widget in the container