[Debian-med-packaging] Bug#815176: staden: Gap4 contig editor does not show sequences

James Bonfield jkb at sanger.ac.uk
Mon Feb 22 17:42:38 UTC 2016


On Mon, Feb 22, 2016 at 04:34:13PM +0100, Andreas Tille wrote:
> if I understand you correctly you are suggesting a further change.  Could
> you please confirm that this patch
> 
>     https://anonscm.debian.org/viewvc/debian-med/trunk/packages/staden/trunk/debian/patches/cope_with_modern_windowmanager.patch?view=markup

Yes that's it.

The other change was an improvement to resizing. 

This is long and tedious so feel free to ignore, but if you're curious
then here are the details.  Typically window managers treat windows as
one of two flavours:

1) The program set the size, so it's permitted to change it again
itself.

2) The user resized the window, so the application request to resize
it will be ignored.

Tk wm geometry command allows you to programatically change the size
of window or with the blank size (wm geometry . {} {}) it'll reset the
window to case 1 - governed by the program rather than the user.

This is all very ICKY and it gets worse.  Gap4's contig editor is
"courageously" setting the Y dimension itself based on how many rows
of sequences it wants to display.  The X dimension can be controlled
by the user, but as the user increases the size in X, more sequences
can become visible causing the Y dimension to be resized.  In the past
this caused massive fights between various parts of tcl/tk and window
managers, sometimes triggering event loops with oscillating window
dimensions.  The workaround for this was to have a 1 second delay
between resizing the window and asking the program to recompute the
size.

That in turn though broke all modern window managers.  Basically if
you resized quickly and let go it'd just snap back - you had to
resize, hold and wait for 1 sec, and then release. Bizantine...  Try
hard as I may I couldn't recreate the strange oscillations so this
change basically pushes it back to how it used to be with instant
recomputation.  It seems to work much better in general, but still
isn't perfect.

Perfection isn't possible when you start with the premise of X being
user controlled and Y being program controlled!  With Gap5 fortunately
we had an attack of sanity and chose a more traditional strategy.

James

PS. Kerstin if you're still reading this, if set -x doesn't work then
just editing the first #! line to be "#!/bin/sh -x" (without the
quotes) should do the same thing, or simpler still typing in

  sh -x `which pregap4`

-- 
James Bonfield (jkb at sanger.ac.uk) | Hora aderat briligi. Nunc et Slythia Tova
                                  | Plurima gyrabant gymbolitare vabo;
  A Staden Package developer:     | Et Borogovorum mimzebant undique formae,
https://sf.net/projects/staden/   | Momiferique omnes exgrabure Rathi. 


-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 



More information about the Debian-med-packaging mailing list