Author: fmueller
Date: Mon Mar  1 01:52:50 2010
New Revision: 8602

URL: http://svn.slimdevices.com/jive?rev=8602&view=rev
Log:
Bug: 15557 
Description: Remove not so clever fix. 

Modified:
    7.5/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua
    7.5/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c

Modified: 7.5/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua
URL: 
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua?rev=8602&r1=8601&r2=8602&view=diff
==============================================================================
--- 7.5/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua (original)
+++ 7.5/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua Mon Mar  1 
01:52:50 2010
@@ -38,7 +38,6 @@
                            
 local table                = require("jive.utils.table")
 local Framework            = require("jive.ui.Framework")
-local System               = require("jive.System")
 local Event                = require("jive.ui.Event")
 local Widget               = require("jive.ui.Widget")
 local Label                = require("jive.ui.Label")
@@ -1285,11 +1284,6 @@
 
 function setPixelOffsetY(self, value)
        self.pixelOffsetY = value
-       -- Bug: 15557 - If objects are not snapped to grid (smooth scroll on 
Fab4)
-       --  dirty areas of labels with scrolling text are not always correct.
-       if System:getMachine() == "fab4" then
-               Framework:setPixelOffsetY( value)
-       end
 end
 
 

Modified: 7.5/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c
URL: 
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c?rev=8602&r1=8601&r2=8602&view=diff
==============================================================================
--- 7.5/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c (original)
+++ 7.5/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c Mon Mar  1 
01:52:50 2010
@@ -127,9 +127,6 @@
        { SDLK_UNKNOWN,  0x0        },
 };
 
-// Bug: 15557 - If objects are not snapped to grid (smooth scroll on Fab4)
-//  dirty areas of labels with scrolling text are not always correct.
-static int pixel_offset_y = 0;
 
 static int process_event(lua_State *L, SDL_Event *event);
 static void process_timers(lua_State *L);
@@ -420,9 +417,6 @@
        Uint32 t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0;
        clock_t c0 = 0, c1 = 0;
        bool_t standalone_draw, drawn = false;
-       // Bug: 15557 - If objects are not snapped to grid (smooth scroll on 
Fab4)
-       //  dirty areas of labels with scrolling text are not always correct.
-       int item_h = 0;
 
 
        JIVEL_STACK_CHECK_BEGIN(L);
@@ -484,33 +478,6 @@
                                frame = lua_tointeger(L, -1) - 1;
                                
                                if (frame == 0) {
-
-                                       // Bug: 15557 - If objects are not 
snapped to grid (smooth scroll on Fab4)
-                                       //  dirty areas of labels with 
scrolling text are not always correct.
-                                       // Find parent of parent of widget to 
test if it's a menu to get item height
-                                       lua_getfield(L, -5, "parent");
-                                       if (lua_isnil(L, -1)) {
-                                               lua_pop(L, 1);
-                                       } else {
-                                               lua_getfield(L, -1, "parent");
-                                               if (lua_isnil(L, -1)) {
-                                                       lua_pop(L, 2);
-                                               } else {
-                                                       lua_getglobal(L, 
"tostring");
-                                                       lua_pushvalue(L, -2);
-                                                       lua_call(L, 1, 1);
-                                                       if( 
(strncmp(lua_tostring(L, -1), "Menu(", 5) == 0)
-                                                        || 
(strncmp(lua_tostring(L, -1), "SimpleMenu(", 11) == 0)
-                                                       ) {
-                                                               lua_getfield(L, 
-2, "itemHeight");
-                                                               item_h = 
lua_tointeger(L, -1);
-                                                               lua_pop(L, 1);
-                                                       }
-                                                       lua_pop(L, 1);
-                                                       lua_pop(L, 2);
-                                               }
-                                       }
-
                                        lua_rawgeti(L, -2, 1); // function
                                        lua_pushvalue(L, -6); // widget
                                        lua_call(L, 1, 0);
@@ -555,23 +522,6 @@
 
                /* only redraw dirty region for non standalone draws */
                if (!standalone_draw) {
-                       // Bug: 15557 - If objects are not snapped to grid 
(smooth scroll on Fab4)
-                       //  dirty areas of labels with scrolling text are not 
always correct.
-                       // My efforts to fix the dirty area failed on Fab4 (ok 
on Desktop) due to
-                       //  double buffering. So right now, when this situation 
occurs then redraw
-                       //  the complete screen to make sure everything gets 
redrawn properly.
-                       // FIXME: Only redraw necessary areas, i.e. calculate 
dirty area correctly
-                       // Redraw complete screen when:
-                       // - item_h is bigger than 0 - most likely a SimpleMenu 
or Menu item
-                       // - item_h has the same hight as dirty_region.h
-                       // - pixel_offser_y is not 0 - menu items not snapped 
to grid
-                       if ((item_h > 0) && (jive_dirty_region.h == item_h) && 
(pixel_offset_y != 0)) {
-                               last_dirty_region.x = 0;
-                               last_dirty_region.y = 0;
-                               last_dirty_region.w = screen_w;
-                               last_dirty_region.h = screen_h;
-                       }
-
                        jive_rect_union(&jive_dirty_region, &last_dirty_region, 
&dirty);
                        jive_surface_set_clip(srf, &dirty);
                }
@@ -723,21 +673,6 @@
        lua_pop(L, 1);
 
        jive_redraw(&r);
-
-       return 0;
-}
-
-
-// Bug: 15557 - If objects are not snapped to grid (smooth scroll on Fab4)
-//  dirty areas of labels with scrolling text are not always correct.
-int jiveL_set_pixel_offset_y(lua_State *L) {
-       /* stack is:
-        * 1: framework
-        * 2: pixel offset y
-        */
-
-       pixel_offset_y = lua_tointeger(L, -1);
-       lua_pop(L, 1);
 
        return 0;
 }
@@ -1540,9 +1475,6 @@
        { "draw", jiveL_draw },
        { "updateScreen", jiveL_update_screen },
        { "reDraw", jiveL_redraw },
-       // Bug: 15557 - If objects are not snapped to grid (smooth scroll on 
Fab4)
-       //  dirty areas of labels with scrolling text are not always correct.
-       { "setPixelOffsetY", jiveL_set_pixel_offset_y },
        { "pushEvent", jiveL_push_event },
        { "dispatchEvent", jiveL_dispatch_event },
        { "getTicks", jiveL_get_ticks },

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins

Reply via email to