-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
42Bastian schrieb:
> Hi
> I noticed a strange behavior when using left resize handle on windows
> with a minimum size: As soon as the size gets smaller, the window is
> moved to the right, because the x value is not held fix.
>
> A little modification in AG_WindowSetGeometryRect() fixes this:
>
> - if (nw < wMin) { nw = wMin; }
> + if (nw < wMin) {
> + if ( ox < r.x ) { r.x -= wMin - nw; }
> + nw = wMin;
> +}
Sorry, I did not post every modification, needed because r.x could be
- -1, here now the full modified code:
if ( r.x == -1 ) r.x = WIDGET(win)->x;
if ( r.y == -1 ) r.y = WIDGET(win)->y;
if (win->flags & AG_WINDOW_MINSIZEPCT) {
wMin = win->minPct*win->wReq/100;
hMin = win->minPct*win->hReq/100;
} else {
wMin = win->wMin;
hMin = win->hMin;
}
if (nw < wMin) {
if ( ox < r.x ) { r.x -= wMin - nw; }
nw = wMin;
}
if (nh < hMin) { nh = hMin; }
/* Limit the window to the view boundaries. */
aWin.x = r.x;
aWin.y = r.y;
Cheers,
- --
42Bastian Schick
/--------------------------------\
| Bastian Schick |
| Sciopta Systems GmbH |
| Hauptstr. 293 |
| 79576 Weil am Rhein |
| Deutschland/Allemange/Germany |
| Geschäftsführer: Roland Lips |
| Handelsregister: |
| Amtsgericht Lörrach HRB3430 |
| UStIdNr.: DE227227729 |
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
| Public Key GnuPG |
| www.monlynx.de/key_sciopta.txt |
\--------------------------------/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAksX2qIACgkQFWZB6fqVPuIyzgCaAyng+91bvAbrWWASw2NTbnPz
6MUAnixrZ0WOYbO6qYh+DNa0qQ8QlRH/
=Etu+
-----END PGP SIGNATURE-----
_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html