javauis/lcdui_qt/src/javax/microedition/lcdui/Canvas.java
changeset 56 abc41079b313
parent 50 023eef975703
child 57 59b3b4473dc8
--- a/javauis/lcdui_qt/src/javax/microedition/lcdui/Canvas.java	Fri Jul 09 16:35:45 2010 +0300
+++ b/javauis/lcdui_qt/src/javax/microedition/lcdui/Canvas.java	Fri Jul 23 12:27:20 2010 +0300
@@ -754,25 +754,6 @@
     {
         return KeyTable.getKeyName(keyCode);
     }
-    /**
-     * Gets height.
-     *
-     * @return Height of the Displayable in pixels.
-     */
-    public int getHeight()
-    {
-        if(onScreenkeypad != null)
-        {
-            ESWTUIThreadRunner.syncExec(new Runnable()
-            {
-                public void run()
-                {
-                    oskHeight = onScreenkeypad.getHeight();
-                }
-            });
-        }
-        return (super.getHeight() - oskHeight);
-    }
 
     /**
      * Callback to be implemented by the application to render the
@@ -1563,9 +1544,11 @@
     class CanvasShellVisibilityListener implements SymbianWindowVisibilityListener
     {
         public void handleSymbianWindowVisibilityChange(Widget widget, boolean visible) {
-            if (javax.microedition.lcdui.Canvas.this.getShell() == widget)
+            if (javax.microedition.lcdui.Canvas.this.getShell() == widget && graphicsBuffer != null)
             {
-                graphicsBuffer.getWindowSurface().handleSymbianWindowVisibilityChange(visible);
+                WindowSurface surface = graphicsBuffer.getWindowSurface();
+                if (surface != null)
+                    surface.handleSymbianWindowVisibilityChange(visible);
             }
         }
     }