--- a/javauis/lcdui_qt/src/javax/microedition/lcdui/CanvasBufferLinux.java Mon Aug 23 14:24:31 2010 +0300
+++ b/javauis/lcdui_qt/src/javax/microedition/lcdui/CanvasBufferLinux.java Thu Sep 02 13:22:59 2010 +0300
@@ -40,19 +40,22 @@
host = canvas;
}
- protected void init()
- {
- super.init();
- surface = Internal_PackageSupport.getWindowsurface(host.getShell());
- }
-
void bindToHost(GraphicsContext gc)
{
gc.bindTarget(surface);
}
+ void ensureWindowSurface()
+ {
+ if(surface == null)
+ {
+ surface = Internal_PackageSupport.getWindowsurface(host.getShell());
+ }
+ }
+
void beginPaint(int x, int y, int w, int h)
{
+ ensureWindowSurface();
paintX = x;
paintY = y;
paintW = w;