From 5fb89cb86e6cc82d19caf2a91a8f89b1bfa5746d Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Mon, 14 Nov 2016 10:39:58 -0800 Subject: [PATCH] Support setting initial position for TLW with GTK3 --- src/gtk/toplevel.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 5c173ab8dd..52cc6a0eba 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -661,10 +661,17 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent, PostCreation(); -#ifndef __WXGTK3__ - if (pos != wxDefaultPosition) + if (pos.IsFullySpecified()) + { +#ifdef __WXGTK3__ + GtkWindowPosition windowPos; + g_object_get(m_widget, "window-position", &windowPos, NULL); + if (windowPos == GTK_WIN_POS_NONE) + gtk_window_move(GTK_WINDOW(m_widget), m_x, m_y); +#else gtk_widget_set_uposition( m_widget, m_x, m_y ); #endif + } // for some reported size corrections g_signal_connect (m_widget, "map_event",