Mercurial > audlegacy-plugins
changeset 587:289c08270c7b trunk
[svn] - aosd: prevent user from setting an excessively large max_width
author | giacomo |
---|---|
date | Wed, 31 Jan 2007 08:59:20 -0800 |
parents | 26519231a4f4 |
children | 1e2792ece36b |
files | ChangeLog src/aosd/aosd_osd.c |
diffstat | 2 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Jan 31 08:42:04 2007 -0800 +++ b/ChangeLog Wed Jan 31 08:59:20 2007 -0800 @@ -1,3 +1,14 @@ +2007-01-31 16:42:04 +0000 Giacomo Lozito <james@develia.org> + revision [1258] + - aosd: added experimental multiple monitor support, plus max_width setting + trunk/src/aosd/aosd_cfg.c | 18 ++++++++++ + trunk/src/aosd/aosd_cfg.h | 2 + + trunk/src/aosd/aosd_common.h | 2 - + trunk/src/aosd/aosd_osd.c | 74 ++++++++++++++++++++++++++++++------------- + trunk/src/aosd/aosd_ui.c | 58 ++++++++++++++++++++++++++++++++- + 5 files changed, 129 insertions(+), 25 deletions(-) + + 2007-01-31 07:14:02 +0000 Yoshiki Yazawa <yaz@cc.rim.or.jp> revision [1256] tweak xspf plugin to conform xspf specification version 1.
--- a/src/aosd/aosd_osd.c Wed Jan 31 08:42:04 2007 -0800 +++ b/src/aosd/aosd_osd.c Wed Jan 31 08:59:20 2007 -0800 @@ -134,9 +134,11 @@ if ( cfg_osd->position.maxsize_width > 0 ) { + gint max_width_default = screen_width - pad_left - pad_right - abs(cfg_osd->position.offset_x); max_width = cfg_osd->position.maxsize_width - pad_left - pad_right; - if ( max_width < 1 ) /* ignore user-defined max_width if it is too small */ - max_width = screen_width - pad_left - pad_right - abs(cfg_osd->position.offset_x); + /* ignore user-defined max_width if it is too small or too large */ + if ( max_width < 1 ) || ( max_width > max_width_default ) + max_width = max_width_default; } else {