From 91cf58652e9db5b27be5320e649dfdeaa727a539 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 4 Jun 2004 11:39:45 +0000 Subject: [PATCH] be good citizen, don't force window position; instead, set transiency relation so that the WM can do better job of positioning the window git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/fontdlg.cpp | 6 +++--- src/gtk1/fontdlg.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gtk/fontdlg.cpp b/src/gtk/fontdlg.cpp index df4b0eae8a..1bab264b82 100644 --- a/src/gtk/fontdlg.cpp +++ b/src/gtk/fontdlg.cpp @@ -127,9 +127,9 @@ bool wxFontDialog::DoCreate(wxWindow *parent) wxString m_message( _("Choose font") ); m_widget = gtk_font_selection_dialog_new( wxGTK_CONV( m_message ) ); - int x = (gdk_screen_width () - 400) / 2; - int y = (gdk_screen_height () - 400) / 2; - gtk_widget_set_uposition( m_widget, x, y ); + if (parent) + gtk_window_set_transient_for(GTK_WINDOW(m_widget), + GTK_WINDOW(parent->m_widget)); GtkFontSelectionDialog *sel = GTK_FONT_SELECTION_DIALOG(m_widget); diff --git a/src/gtk1/fontdlg.cpp b/src/gtk1/fontdlg.cpp index df4b0eae8a..1bab264b82 100644 --- a/src/gtk1/fontdlg.cpp +++ b/src/gtk1/fontdlg.cpp @@ -127,9 +127,9 @@ bool wxFontDialog::DoCreate(wxWindow *parent) wxString m_message( _("Choose font") ); m_widget = gtk_font_selection_dialog_new( wxGTK_CONV( m_message ) ); - int x = (gdk_screen_width () - 400) / 2; - int y = (gdk_screen_height () - 400) / 2; - gtk_widget_set_uposition( m_widget, x, y ); + if (parent) + gtk_window_set_transient_for(GTK_WINDOW(m_widget), + GTK_WINDOW(parent->m_widget)); GtkFontSelectionDialog *sel = GTK_FONT_SELECTION_DIALOG(m_widget); -- 2.45.2