Author: titmuss
Date: Fri Jul  4 09:46:48 2008
New Revision: 2664

URL: http://svn.slimdevices.com?rev=2664&root=Jive&view=rev
Log:
Bug: N/A
Description:
If a window was transparent then visability and inactivity window events were 
not being correctly sent to lower windows during 
show() and hide().

This stopped the screensaver working after a Problem Connecting popup was 
disabled.


Modified:
    7.1/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Window.lua

Modified: 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Window.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Window.lua?rev=2664&root=Jive&r1=2663&r2=2664&view=diff
==============================================================================
--- 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Window.lua (original)
+++ 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Window.lua Fri Jul  4 
09:46:48 2008
@@ -50,6 +50,7 @@
 local Event                   = require("jive.ui.Event")
 local Surface                 = require("jive.ui.Surface")
 
+local debug                   = require("jive.utils.debug")
 local log                     = require("jive.utils.log").logger("ui")
 
 local max                     = math.max
@@ -182,11 +183,16 @@
                Framework:_startTransition(_newTransition(transition, 
topwindow, self))
 
                if not self.transparent then
-                       -- the old window and widgets are no longer visible
-                       topwindow:dispatchNewEvent(EVENT_HIDE)
-
-                       -- the old window is inactive
-                       topwindow:dispatchNewEvent(EVENT_WINDOW_INACTIVE)
+                       -- top window is no longer visiable and it is inactive,
+                       -- if the top window is transparent also dispatch 
+                       -- events to the lower window(s)
+                       local window = topwindow
+                       while window do
+                               window:dispatchNewEvent(EVENT_HIDE)
+                               window:dispatchNewEvent(EVENT_WINDOW_INACTIVE)
+
+                               window = window.transparent and 
window:getLowerWindow() or nil
+                       end
                end
        end
 
@@ -352,11 +358,16 @@
        end
 
        if wasVisible and topwindow then
-               -- top window is now active
-               topwindow:dispatchNewEvent(EVENT_WINDOW_ACTIVE)
-
-               -- top window and widgets are now visible
-               topwindow:dispatchNewEvent(EVENT_SHOW)
+               -- top window is now active and visible, if the top window
+               -- is transparent also dispatch events to the lower window(s)
+               local window = topwindow
+               while window do
+                       window:dispatchNewEvent(EVENT_WINDOW_ACTIVE)
+                       window:dispatchNewEvent(EVENT_SHOW)
+
+                       window = window.transparent and window:getLowerWindow() 
or nil
+               end
+
                topwindow:reDraw()
 
                -- push transitions

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

Reply via email to