Bug 1400238 - Notify TabParent when the GTK client offset changes. r=karlt draft
authorBotond Ballo <botond@mozilla.com>
Wed, 18 Oct 2017 13:29:47 -0400
changeset 682750 5641d417a6245cc2f8027fd91032119f1b36d461
parent 677214 77a4c52e9987d2359969d7c478183b438b464744
child 736412 e98ad95a5cc0249a08069bc5803167ea97cf75b5
push id85125
push userbballo@mozilla.com
push dateWed, 18 Oct 2017 17:32:04 +0000
reviewerskarlt
bugs1400238
milestone58.0a1
Bug 1400238 - Notify TabParent when the GTK client offset changes. r=karlt MozReview-Commit-ID: 1TacAhl6c2M
widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -1562,16 +1562,21 @@ nsWindow::GetClientOffset()
 }
 
 gboolean
 nsWindow::OnPropertyNotifyEvent(GtkWidget* aWidget, GdkEventProperty* aEvent)
 
 {
   if (aEvent->atom == gdk_atom_intern("_NET_FRAME_EXTENTS", FALSE)) {
     UpdateClientOffset();
+
+    // Send a WindowMoved notification. This ensures that TabParent
+    // picks up the new client offset and sends it to the child process
+    // if appropriate.
+    NotifyWindowMoved(mBounds.x, mBounds.y);
     return FALSE;
   }
 
   if (GetCurrentTimeGetter()->PropertyNotifyHandler(aWidget, aEvent)) {
     return TRUE;
   }
 
   return FALSE;