Linux: Flush display after showing window (issue #1946)

This commit is contained in:
Marshall Greenblatt 2016-08-17 07:56:35 -07:00
parent 4f0ba755c6
commit 2e1d960f3f
1 changed files with 6 additions and 0 deletions

View File

@ -150,6 +150,12 @@ void RootWindowGtk::Show(ShowMode mode) {
MinimizeWindow(GTK_WINDOW(window_)); MinimizeWindow(GTK_WINDOW(window_));
else if (mode == ShowMaximized) else if (mode == ShowMaximized)
MaximizeWindow(GTK_WINDOW(window_)); MaximizeWindow(GTK_WINDOW(window_));
// Flush the display to make sure the underlying X11 window gets created
// immediately.
GdkWindow* gdk_window = gtk_widget_get_window(window_);
GdkDisplay* display = gdk_window_get_display(gdk_window);
gdk_display_flush(display);
} }
void RootWindowGtk::Hide() { void RootWindowGtk::Hide() {