changeset 4830:922bb2496c20

[RT-32476] - WindowEvent.RESTORE wrongly sent by setBoundsImpl The event was removed and was replaced with a log print that states there is nothing to do. Also WindowEvent.RESTORE was removed from setVisible(true) as there is no need to inform glass window is actually visible Tested on device using SnakeLadders application that the original problem was detected on.
author Assaf Yavani
date Tue, 27 Aug 2013 13:58:42 +0300
parents fe20dd490f3a
children 0a2b318d5698
files modules/graphics/src/main/native-glass/lens/wm/LensWindowManager.c
diffstat 1 files changed, 3 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/native-glass/lens/wm/LensWindowManager.c	Tue Aug 27 13:58:42 2013 +0300
+++ b/modules/graphics/src/main/native-glass/lens/wm/LensWindowManager.c	Tue Aug 27 13:58:42 2013 +0300
@@ -523,16 +523,7 @@
     }
 
     if (!windowHasBeenUpdated) {
-        //if this function input params are equal to the window current params,
-        // it means that window have been restored.
-        //happens when swapping stages with same params, for example.
-        GLASS_LOG_FINE("Notifying window %d[%p] its been restored",
-                       window->id,
-                       window);
-        glass_application_notifyWindowEvent_resize(env,window,
-                                                   com_sun_glass_events_WindowEvent_RESTORE,
-                                                   window->currentBounds.width,
-                                                   window->currentBounds.height);
+        GLASS_LOG_FINE("Nothing to do");
     }
 }
 
@@ -560,14 +551,9 @@
             //window become visible, grant it the focus if not a pop-up
             lens_wm_setFocusedWindow(env, window);
         }
+    }
 
-        GLASS_LOG_FINE("notify window it has been restored");
-        glass_application_notifyWindowEvent_resize(env,
-                                                   window,
-                                                   com_sun_glass_events_WindowEvent_RESTORE,
-                                                   window->currentBounds.width,
-                                                   window->currentBounds.height);
-    }
+    //no need to send an event to confirm window is visible
 
     return JNI_TRUE;
 }