]> khamidou — GitHub mirrors - electron.git/commitdiff
gtk: Fix crash when calling GetSize() for hidden window.
authorCheng Zhao <zcbenz@gmail.com>
Sat, 29 Mar 2014 06:08:25 +0000 (14:08 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sat, 29 Mar 2014 06:08:25 +0000 (14:08 +0800)
atom/browser/native_window_gtk.cc

index e1b7bddb057c567b3720847a0ee6c85bb4f783d0..0e257d57868e611e121405879447edf7c9995926 100644 (file)
@@ -58,6 +58,9 @@ NativeWindowGtk::NativeWindowGtk(content::WebContents* web_contents,
   gtk_widget_show_all(vbox_);
   gtk_widget_size_allocate(GTK_WIDGET(window_), &size);
 
+  // Create the underlying gdk window.
+  gtk_widget_realize(GTK_WIDGET(window_));
+
   if (!icon_.IsEmpty())
     gtk_window_set_icon(window_, icon_.ToGdkPixbuf());