[PATCH] Fix for dialogs drifting downwards on Cygwin/X.
Cesar Strauss
cestrauss at gmail.com
Sun Sep 16 15:56:18 EDT 2007
On Cygwin/X, reopening a gschem dialog restores its original position,
but with a small vertical offset.
The workaround is to show the dialog before restoring its position.
The docs for gtk_window_move() offer a possible justification:
"Most window managers ignore requests for initial window positions
(instead using a user-defined placement algorithm) and honor requests
after the window has already been shown."
The downside is, if you have a slow system, you could see the dialog
appear briefly at the old position, I suppose.
---
gschem/src/gschem_dialog.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gschem/src/gschem_dialog.c b/gschem/src/gschem_dialog.c
index b4eefd0..bc5771b 100644
--- a/gschem/src/gschem_dialog.c
+++ b/gschem/src/gschem_dialog.c
@@ -220,6 +220,9 @@ static void show_handler (GtkWidget *widget)
gchar *group_name;
GschemDialog *dialog = GSCHEM_DIALOG( widget );
+ /* Let GTK show the window */
+ GTK_WIDGET_CLASS (gschem_dialog_parent_class)->show (widget);
+
group_name = dialog->settings_name;
if (group_name != NULL) {
@@ -230,9 +233,6 @@ static void show_handler (GtkWidget *widget)
dialog_geometry, group_name);
}
}
-
- /* Let GTK show the window */
- GTK_WIDGET_CLASS (gschem_dialog_parent_class)->show (widget);
}
--
1.5.3
--------------000007060406000406030607--
More information about the geda-user
mailing list