[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: dialogue boxes drifting each time they are opened (gschem 1.2.0)



Cesar Strauss wrote:
Ben Jackson wrote:
Duncan Drennan wrote:
This can be especially frustrating with attribute dialogues that keep
drifting off the bottom of the screen, and have to be dragged back to
a useable place.

I'm running gschem on cygwin.

Anyone else seeing this?
Yes, gschem on cygwin as well.


I think it's a bug in Cygwin/X multi-window mode, triggered by new code in gschem that restores the dialog positions.


The attached patch contains a workaround: show the dialog before restoring its position.

The patch is also available in the patch tracker:
[ 1795879 ] Fix for dialogs drifting downwards on Cygwin/X
http://sourceforge.net/tracker/index.php?func=detail&aid=1795879&group_id=161080&atid=818428

Regards,
Cesar


From 67ec59b69f10d82b7111fede109873e32b238439 Mon Sep 17 00:00:00 2001
From: Cesar Strauss <cestrauss@xxxxxxxxx>
Date: Sun, 16 Sep 2007 16:56:18 -0300
Subject: [PATCH] Fix for dialogs drifting downwards on Cygwin/X.

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


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user