freesci-develop
[Top][All Lists]
Advanced

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

[freesci-develop] r1585 - freesci/branches/glutton/src/engine


From: freesci
Subject: [freesci-develop] r1585 - freesci/branches/glutton/src/engine
Date: Sat, 25 Nov 2006 01:00:57 +0100

Author: skovmanden
Date: 2006-11-25 01:00:48 +0100 (Sat, 25 Nov 2006)
New Revision: 1585

Modified:
   freesci/branches/glutton/src/engine/game.c
   freesci/branches/glutton/src/engine/kgraphics.c
Log:
More fixes for the off-by-10 thing. Still not a complete fix, but better.  

Lars



Modified: freesci/branches/glutton/src/engine/game.c
===================================================================
--- freesci/branches/glutton/src/engine/game.c  2006-11-24 22:19:38 UTC (rev 
1584)
+++ freesci/branches/glutton/src/engine/game.c  2006-11-25 00:00:48 UTC (rev 
1585)
@@ -196,9 +196,6 @@
        /* FIXME: Not how it's supposed to be; good enough for release */
        s->wm_port = gfxw_new_port(s->visual, NULL, 
s->gfx_state->options->pic_port_bounds, s->ega_colors[0], transparent);
 
-       /* but this is correct */
-       s->picture_port = gfxw_new_port(s->visual, NULL, 
s->gfx_state->options->pic_port_bounds, s->ega_colors[0], transparent);
-
        if (s->resmgr->sci_version >= SCI_VERSION_01_VGA)
        {
                gfx_color_t fgcolor;
@@ -219,11 +216,14 @@
        s->titlebar_port->bgcolor.mask |= GFX_MASK_PRIORITY;
        s->titlebar_port->bgcolor.priority = 11;
 
+       /* but this is correct */
+       s->picture_port = gfxw_new_port(s->visual, NULL, 
s->gfx_state->options->pic_port_bounds, s->ega_colors[0], transparent);
+
        s->pics_drawn_nr = 0;
 
-       s->visual->add(GFXWC(s->visual), GFXW(s->picture_port));
        s->visual->add(GFXWC(s->visual), GFXW(s->wm_port));
        s->visual->add(GFXWC(s->visual), GFXW(s->titlebar_port));
+       s->visual->add(GFXWC(s->visual), GFXW(s->picture_port));
        /* Add ports to visual */
 
        s->port = s->picture_port; /* Currently using the picture port */

Modified: freesci/branches/glutton/src/engine/kgraphics.c
===================================================================
--- freesci/branches/glutton/src/engine/kgraphics.c     2006-11-24 22:19:38 UTC 
(rev 1584)
+++ freesci/branches/glutton/src/engine/kgraphics.c     2006-11-25 00:00:48 UTC 
(rev 1585)
@@ -2597,6 +2597,7 @@
        unsigned int goner_nr = SKPV(0);
        gfxw_port_t *goner;
        gfxw_port_t *pred;
+       int id = s->visual->port_refs_nr;
 
        gfxw_widget_kill_chrono(s->visual, goner_nr);
        goner = gfxw_find_port(s->visual, goner_nr);
@@ -2617,8 +2618,12 @@
        if (goner == s->port) /* Did we kill the active port? */
                s->port = pred;
 
-       s->port = s->wm_port;
+       while (!s->visual->port_refs[id] && id >= 0)
+               id--;
 
+       sciprintf("Activating port %d after disposing window %d\n", id, 
goner_nr);
+       s->port = s->visual->port_refs[id];
+
        if (!s->port)
                s->port = gfxw_find_default_port(s->visual);
 





reply via email to

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