freesci-develop
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freesci-develop] r1582 - in freesci/branches/glutton: . src/gfx src/sfx


From: freesci
Subject: [freesci-develop] r1582 - in freesci/branches/glutton: . src/gfx src/sfx
Date: Fri, 10 Nov 2006 22:58:38 +0100

Author: skovmanden
Date: 2006-11-10 22:58:29 +0100 (Fri, 10 Nov 2006)
New Revision: 1582

Modified:
   freesci/branches/glutton/ChangeLog
   freesci/branches/glutton/src/gfx/sci_widgets.c
   freesci/branches/glutton/src/sfx/iterator.c
Log:
Fix text box placement in LSL5 intro.
Also remove some debug code I accidentally committed.

Lars



Modified: freesci/branches/glutton/ChangeLog
===================================================================
--- freesci/branches/glutton/ChangeLog  2006-11-06 09:29:34 UTC (rev 1581)
+++ freesci/branches/glutton/ChangeLog  2006-11-10 21:58:29 UTC (rev 1582)
@@ -1,3 +1,8 @@
+2006-11-10  Lars Skovlund  <address@hidden>
+
+       * src/gfx/sci_widgets.c (sciw_new_window): Sanitize window
+       coordinates.
+
 2006-11-06  Lars Skovlund  <address@hidden>
 
        * src/gfx/gfx_tools.c (gfx_pixmap_alloc_index_data): Initialize

Modified: freesci/branches/glutton/src/gfx/sci_widgets.c
===================================================================
--- freesci/branches/glutton/src/gfx/sci_widgets.c      2006-11-06 09:29:34 UTC 
(rev 1581)
+++ freesci/branches/glutton/src/gfx/sci_widgets.c      2006-11-10 21:58:29 UTC 
(rev 1582)
@@ -137,7 +137,19 @@
        gfx_color_t black       = {0};
        gfxw_port_t *win;
        gfxw_list_t *decorations;
+       int xextra = !(flags & WINDOW_FLAG_NOFRAME) ? 1 : 0;
+       int yextra = !(flags & WINDOW_FLAG_NOFRAME) ? 2 : 0;
 
+       if (area.y + area.yl > visual->bounds.y + visual->bounds.yl)
+       {
+               area.y -= (area.y + area.yl) - (visual->bounds.y + 
visual->bounds.yl) + yextra;
+       }
+
+       if (area.x + area.xl > visual->bounds.x + visual->bounds.xl)
+       {
+               area.x -= (area.x + area.xl) - (visual->bounds.x + 
visual->bounds.xl) + xextra;
+       }
+
        if (!(flags & (WINDOW_FLAG_TITLE | WINDOW_FLAG_NOFRAME)))
                area.yl -= 1; /* Normal windows are drawn one pixel too small. 
*/
 

Modified: freesci/branches/glutton/src/sfx/iterator.c
===================================================================
--- freesci/branches/glutton/src/sfx/iterator.c 2006-11-06 09:29:34 UTC (rev 
1581)
+++ freesci/branches/glutton/src/sfx/iterator.c 2006-11-10 21:58:29 UTC (rev 
1582)
@@ -260,8 +260,6 @@
                        break;
 
                case SCI_MIDI_SET_VELOCITY:
-                       BREAKPOINT();
-                       printf("%d is setting velocity to %d\n", self->ID, 
buf[2]);
                        break;
 
                case SCI_MIDI_HOLD:





reply via email to

[Prev in Thread] Current Thread [Next in Thread]