[Libreoffice-commits] .: Branch 'feature/android' - 2 commits - desktop/source vcl/android vcl/headless vcl/inc vcl/source

Michael Meeks michael at kemper.freedesktop.org
Sat Jan 28 01:55:34 PST 2012


 desktop/source/app/app.cxx    |   37 ++++++
 vcl/android/androidinst.cxx   |  240 ++++++++----------------------------------
 vcl/headless/svpframe.cxx     |    3 
 vcl/headless/svpinst.cxx      |    2 
 vcl/inc/headless/svpframe.hxx |    3 
 vcl/source/app/svmain.cxx     |    5 
 6 files changed, 97 insertions(+), 193 deletions(-)

New commits:
commit a6e06bdbd3d22ce995c2bc8e4d2dd82a3854f1c4
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Sat Jan 28 00:03:11 2012 +0000

    android: add debug hooks through app.cxx, comment chunks and add a dialog
    
    without the dialog, the main window never appears to get shown.

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 91c7531..6101827 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -102,6 +102,8 @@
 #include <sys/wait.h>
 #endif
 
+extern void VCL_DLLPUBLIC plasma_now(const char *msg);
+
 #define DEFINE_CONST_UNICODE(CONSTASCII)        UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
 #define U2S(STRING)                                ::rtl::OUStringToOString(STRING, RTL_TEXTENCODING_UTF8)
 
@@ -1503,12 +1505,16 @@ int Desktop::Main()
 
     ResMgr::SetReadStringHook( ReplaceStringHookProc );
 
+//    ::plasma_now("after desktoppy bits"); - fine to here ...
+
     // Startup screen
     RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main { OpenSplashScreen" );
     OpenSplashScreen();
     RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main } OpenSplashScreen" );
 
     SetSplashScreenProgress(10);
+
+//    ::plasma_now("after splash open");
     {
         UserInstall::UserInstallError instErr_fin = UserInstall::finalize();
         if ( instErr_fin != UserInstall::E_None)
@@ -1536,6 +1542,8 @@ int Desktop::Main()
     {
         RegisterServices( xSMgr );
 
+//        ::plasma_now("registered services");
+
         SetSplashScreenProgress(25);
 
 #ifndef UNX
@@ -1580,6 +1588,8 @@ int Desktop::Main()
         if ( !InitializeConfiguration() )
             return EXIT_FAILURE;
 
+//        ::plasma_now("init configuration");
+
         SetSplashScreenProgress(30);
 
         // set static variable to enabled/disable crash reporter
@@ -1597,6 +1607,8 @@ int Desktop::Main()
         String aTitle = pLabelResMgr ? String( ResId( RID_APPTITLE, *pLabelResMgr ) ) : String();
         delete pLabelResMgr;
 
+//        ::plasma_now("after title string");
+
 #ifdef DBG_UTIL
         //include version ID in non product builds
         ::rtl::OUString aDefault(RTL_CONSTASCII_USTRINGPARAM("development"));
@@ -1613,6 +1625,8 @@ int Desktop::Main()
         SetSplashScreenProgress(40);
         RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create SvtPathOptions and SvtLanguageOptions" );
 
+//        ::plasma_now("unrestricted folders"); -- got this.
+
         // Check special env variable
         std::vector< String > aUnrestrictedFolders;
         svt::getUnrestrictedFolders( aUnrestrictedFolders );
@@ -1633,6 +1647,8 @@ int Desktop::Main()
             ( xSMgr->createInstance(
             DEFINE_CONST_UNICODE( "com.sun.star.frame.GlobalEventBroadcaster" ) ), UNO_QUERY );
 
+        ::plasma_now("done global event broadcaster");
+
         /* ensure existance of a default window that messages can be dispatched to
            This is for the benefit of testtool which uses PostUserEvent extensively
            and else can deadlock while creating this window from another tread while
@@ -1640,6 +1656,7 @@ int Desktop::Main()
         */
         Application::GetDefaultDevice();
 
+#ifndef ANDROID
         // Check if bundled or shared extensions were added /removed
         // and process those extensions (has to be done before checking
         // the extension dependencies!
@@ -1657,6 +1674,7 @@ int Desktop::Main()
         pExecGlobals->bRestartRequested = ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
 
         Migration::migrateSettingsIfNecessary();
+#endif
 
         // keep a language options instance...
         pExecGlobals->pLanguageOptions.reset( new SvtLanguageOptions(sal_True));
@@ -1668,6 +1686,8 @@ int Desktop::Main()
             pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent);
         }
 
+        ::plasma_now("invoked OnStartupApp");
+
         SetSplashScreenProgress(50);
 
         // Backing Component
@@ -1697,6 +1717,8 @@ int Desktop::Main()
             aMiscOptions.SetUseSystemFileDialog( sal_False );
         }
 
+        ::plasma_now("nearly there !");
+
         if ( !pExecGlobals->bRestartRequested )
         {
             if ((!rCmdLineArgs.WantsToLoadDocument() && !rCmdLineArgs.IsInvisible() && !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsQuickstart()) &&
@@ -1766,6 +1788,8 @@ int Desktop::Main()
     aOptions.SetVCLSettings();
     SetSplashScreenProgress(60);
 
+    ::plasma_now("setup appearance !");
+
     if ( !pExecGlobals->bRestartRequested )
     {
         Application::SetFilterHdl( LINK( this, Desktop, ImplInitFilterHdl ) );
@@ -1799,6 +1823,8 @@ int Desktop::Main()
         // Release solar mutex just before we wait for our client to connect
         int nAcquireCount = Application::ReleaseSolarMutex();
 
+        ::plasma_now("wait client connect !");
+
         // Post user event to startup first application component window
         // We have to send this OpenClients message short before execute() to
         // minimize the risk that this message overtakes type detection contruction!!
@@ -1817,6 +1843,8 @@ int Desktop::Main()
         // call Application::Execute to process messages in vcl message loop
         RTL_LOGFILE_PRODUCT_TRACE( "PERFORMANCE - enter Application::Execute()" );
 
+        ::plasma_now("before java foo !");
+
         try
         {
             // The JavaContext contains an interaction handler which is used when
@@ -1832,6 +1860,15 @@ int Desktop::Main()
                 // if this run of the office is triggered by restart, some additional actions should be done
                 DoRestartActionsIfNecessary( !rCmdLineArgs.IsInvisible() && !rCmdLineArgs.IsNoQuickstart() );
 
+                ::plasma_now("pre hit execute!");
+
+                // For some reason we're not getting a desktop frame or component [odd]
+                ErrorBox aKickStartVCL( NULL, WB_OK, rtl::OUString::createFromAscii("Title!") );
+                aKickStartVCL.SetText( rtl::OUString::createFromAscii("Foo") );
+                aKickStartVCL.Execute();
+
+                ::plasma_now("hit execute!");
+
                 Execute();
             }
         }
commit f231418c5ba9bed32a4058ba0a9cdcfb16bb2ee4
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Sat Jan 28 00:02:35 2012 +0000

    android: unwind horrific event dispatching bug causing all the grief.

diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index cf93145..a12d7ac 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -32,15 +32,16 @@
 #include <jni.h>
 #include <android/log.h>
 #include <android/looper.h>
-#define EGL_EGLEXT_PROTOTYPES
-#include <EGL/eglext.h>
 #include <osl/detail/android-bootstrap.h>
 #include <osl/detail/android_native_app_glue.h>
 #include <rtl/strbuf.hxx>
 
-#define ANDROID_EGL
-#undef ANDROID_EGL_LOCK
-#undef ANDROID_PIXELS
+extern void VCL_DLLPUBLIC plasma_now(const char *msg);
+
+void plasma_now(const char *msg)
+{
+    fprintf (stderr, "Skipped plasma '%s' !\n", msg);
+}
 
 class AndroidSalData : public SalGenericData
 {
@@ -94,60 +95,6 @@ static void BlitFrameRegionToWindow(ANativeWindow_Buffer *pOutBuffer,
     sal_Int32 nStride = aDev->getScanlineStride();
     unsigned char *pSrc = aSrcData.get();
 
-#ifdef ANDROID_EGL
-    (void)pOutBuffer;
-    GLuint nTexture;
-    glGenTextures (1, &nTexture);
-    glBindTexture(GL_TEXTURE_2D,nTexture);
-    // Pixels to texture:
-    fprintf (stderr, "before create texure '%d'\n", glGetError());
-    glTexImage2D(GL_TEXTURE_2D, 0 /* level */, GL_RGB,
-                 nStride / 3, aDevSize.getY(),
-                 0 /* border */, GL_RGB, GL_UNSIGNED_BYTE,
-                 pSrc);
-    fprintf (stderr, "created texure '%d'\n", glGetError());
-
-    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
-    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
-    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE);
-    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE);
-
-    glEnable(GL_TEXTURE_2D);
-
-    glDisable(GL_DEPTH_TEST);
-    glEnable(GL_BLEND);
-    glBlendFunc(GL_ZERO, GL_SRC_COLOR);
-    glDisable(GL_LIGHTING);
-
-    glMatrixMode(GL_MODELVIEW);
-    glLoadIdentity();
-
-    glMatrixMode(GL_PROJECTION);
-    glLoadIdentity();
-
-    glViewport(0, 0, aDevSize.getX(), aDevSize.getY());
-
-    glBindTexture(GL_TEXTURE_2D,nTexture);
-
-    GLfloat aVertices[] = { 0, 0,
-                            0, aDevSize.getY(),
-                            aDevSize.getX(), aDevSize.getY(),
-                            aDevSize.getX(), 0 };
-    glVertexPointer(2, GL_FLOAT, 0, aVertices);
-    fprintf (stderr, "after set vertex '%d'\n", glGetError());
-    glEnableClientState(GL_VERTEX_ARRAY);
-	glColor4f(0.5f, 0.5f, 1.0f, 1.0f);
-    glDrawArrays (GL_TRIANGLE_STRIP, 0, 4);
-//    glTexCoordPointer(2, GL_FLOAT, 0, aVertices);
-    fprintf (stderr, "after draw arrays '%d'\n", glGetError());
-
-//    glDisable(GL_TEXTURE_2D);
-
-    // free the texture
-//    glDeleteTextures(1,&nTexture);
-#endif
-
-#ifdef ANDROID_PIXELS
     // FIXME: do some cropping goodness on aSrcRect to ensure no overflows etc.
     ARect aSrcRect = rSrcRect;
 
@@ -165,7 +112,6 @@ static void BlitFrameRegionToWindow(ANativeWindow_Buffer *pOutBuffer,
             unsigned char *dp = ( (unsigned char *)pOutBuffer->bits +
                                   pOutBuffer->stride * 4 * (y + nDestY) +
                                   nDestX * 4 /* dest pixel size */ );
-            fprintf (stderr, "y %d, sp %p dp %p\n", y, sp, dp);
             for (unsigned int x = 0; x < (unsigned int)(aSrcRect.right - aSrcRect.left); x++)
             {
                 dp[x*4 + 0] = sp[x*3 + 0]; // B
@@ -180,7 +126,6 @@ static void BlitFrameRegionToWindow(ANativeWindow_Buffer *pOutBuffer,
             unsigned char *dp = ( (unsigned char *)pOutBuffer->bits +
                                   pOutBuffer->stride * 2 * (y + nDestY) +
                                   nDestX * 2 /* dest pixel size */ );
-            fprintf (stderr, "y %d, sp %p dp %p\n", y, sp, dp);
             for (unsigned int x = 0; x < (unsigned int)(aSrcRect.right - aSrcRect.left); x++)
             {
                 unsigned char b = sp[x*3 + 0]; // B
@@ -196,7 +141,6 @@ static void BlitFrameRegionToWindow(ANativeWindow_Buffer *pOutBuffer,
             break;
         }
     }
-#endif // ANDROID_PIXELS
     fprintf (stderr, "done blit!\n");
 }
 
@@ -214,63 +158,16 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow)
     ANativeWindow_Buffer aOutBuffer;
     memset ((void *)&aOutBuffer, 0, sizeof (aOutBuffer));
 
-#ifdef ANDROID_EGL
-    if (mxDisplay == EGL_NO_DISPLAY)
-    {
-        fprintf (stderr, "wait for the setup\n");
-        return;
-    }
-
-    EGLBoolean nRet = eglMakeCurrent(mxDisplay, mxSurface, mxSurface, mxContext);
-    fprintf (stderr, "make current context %d\n", nRet);
-
-    // Just fill the screen with a color.
-    static int a = 0;
-    a++;
-    //    glClearColor((a & 0x1) ? 1.0 : 0.0, (a & 0x2) ? 1.0 : 0.0, 0.0, 1);
-    //    glClear(GL_COLOR_BUFFER_BIT);
-
-#ifdef ANDROID_EGL_LOCK // failed to do anything !
-    const EGLint aAttribs[] = {
-        EGL_MAP_PRESERVE_PIXELS_KHR, EGL_FALSE,
-        EGL_LOCK_USAGE_HINT_KHR, EGL_WRITE_SURFACE_BIT_KHR,
-        EGL_NONE
-    };
-    fprintf (stderr, "pre-egl-lock\n");
-    nRet = eglLockSurfaceKHR(mxDisplay, mxSurface, aAttribs);
-    fprintf (stderr, "eglLockSurface %d\n", nRet);
-    nRet = eglQuerySurface(mxDisplay, mxSurface,
-                           EGL_BITMAP_POINTER_KHR, (EGLint *)&aOutBuffer.bits);
-    fprintf (stderr, "get bytes %p : %d\n", aOutBuffer.bits, nRet);
-    EGLint nStride = 0;
-    nRet = eglQuerySurface(mxDisplay, mxSurface,
-                           EGL_BITMAP_PITCH_KHR, &nStride);
-    fprintf (stderr, "get stride %ld : %d\n", (long)nStride, nRet);
-
-    EGLint nWidth = 0, nHeight = 0;
-    eglQuerySurface(mxDisplay, mxSurface, EGL_WIDTH, &nWidth);
-    eglQuerySurface(mxDisplay, mxSurface, EGL_HEIGHT, &nHeight);
-    fprintf (stderr, "get width height %ld,%ld\n", (long)nWidth, (long)nHeight);
-
-    aOutBuffer.stride = nStride / 2; // FIXME - assuming 565
-    aOutBuffer.width = nWidth;
-    aOutBuffer.height = nHeight;
-#endif
-
-#endif // ANDROID_EGL
-
-#ifdef ANDROID_PIXELS
-    ARect aRect;
+//    ARect aRect;
     fprintf (stderr, "pre lock #3\n");
-    int32_t nRet = ANativeWindow_lock(pWindow, &aOutBuffer, &aRect);
-    fprintf (stderr, "locked window %d returned rect: %d,%d->%d,%d "
+    int32_t nRet = ANativeWindow_lock(pWindow, &aOutBuffer, NULL);
+    fprintf (stderr, "locked window %d returned " // rect:  %d,%d->%d,%d "
              "buffer: %dx%d stride %d, format %d, bits %p\n",
-             nRet, aRect.left, aRect.top, aRect.right, aRect.bottom,
+             nRet, // aRect.left, aRect.top, aRect.right, aRect.bottom,
              aOutBuffer.width, aOutBuffer.height, aOutBuffer.stride,
              aOutBuffer.format, aOutBuffer.bits);
     if (aOutBuffer.bits != NULL)
     {
-#endif // ANDROID_PIXELS
 
 #if 1 // pre-'clean' the buffer with cruft:
         // hard-code / guess at a format ...
@@ -286,26 +183,23 @@ void AndroidSalInstance::RedrawWindows(ANativeWindow *pWindow)
         for ( it = getFrames().begin(); it != getFrames().end(); it++ )
         {
             SvpSalFrame *pFrame = static_cast<SvpSalFrame *>(*it);
-            BlitFrameToWindow (&aOutBuffer, pFrame->getDevice());
-        }
 
-#ifdef ANDROID_PIXELS
+            if (pFrame->IsVisible())
+            {
+                // FIXME: force a re-draw - this appears not to happen much otherwis
+                pFrame->PostPaint(true);
+                BlitFrameToWindow (&aOutBuffer, pFrame->getDevice());
+            }
+            else // Sucky the frame is invisible - why !?
+                fprintf (stderr, "invisible frame\n");
+        }
     }
     else
         fprintf (stderr, "no buffer for locked window\n");
     ANativeWindow_unlockAndPost(pWindow);
-#endif
-
-#ifdef ANDROID_EGL
-#ifdef ANDROID_EGL_LOCK
-    nRet = eglUnlockSurfaceKHR(mxDisplay, mxSurface);
-    fprintf (stderr, "eGL unlock %d\n", nRet);
-#endif
-    eglSwapBuffers(mxDisplay, mxSurface);
-#endif
 
     fprintf (stderr, "done render!\n");
-    mbQueueReDraw = false;
+    mbQueueReDraw = true; // keep at it ! false;
 }
 
 static const char *app_cmd_name(int cmd)
@@ -348,60 +242,6 @@ void AndroidSalInstance::onAppCmd (struct android_app* app, int32_t cmd)
                      pWindow, aRect.right, aRect.bottom,
                      ANativeWindow_getFormat(pWindow));
 
-#ifdef ANDROID_EGL
-            const EGLint attribs[] = {
-                EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
-                EGL_BLUE_SIZE, 8,
-                EGL_GREEN_SIZE, 8,
-                EGL_RED_SIZE, 8,
-                EGL_NONE
-            };
-            EGLint w, h, format;
-            EGLint numConfigs;
-            EGLConfig config;
-            EGLSurface surface;
-            EGLContext context;
-
-            EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
-
-            eglInitialize(display, 0, 0);
-
-            /* Here, the application chooses the configuration it desires. In this
-             * sample, we have a very simplified selection process, where we pick
-             * the first EGLConfig that matches our criteria */
-            eglChooseConfig(display, attribs, &config, 1, &numConfigs);
-
-            /* EGL_NATIVE_VISUAL_ID is an attribute of the EGLConfig that is
-             * guaranteed to be accepted by ANativeWindow_setBuffersGeometry().
-             * As soon as we picked a EGLConfig, we can safely reconfigure the
-             * ANativeWindow buffers to match, using EGL_NATIVE_VISUAL_ID. */
-            eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &format);
-
-            ANativeWindow_setBuffersGeometry(mpApp->window, 0, 0, format);
-
-            surface = eglCreateWindowSurface(display, config, mpApp->window, NULL);
-            context = eglCreateContext(display, config, NULL, NULL);
-
-            if (eglMakeCurrent(display, surface, surface, context) == EGL_FALSE) {
-                fprintf(stderr, "Unable to eglMakeCurrent");
-                break;
-            }
-
-            eglQuerySurface(display, surface, EGL_WIDTH, &w);
-            eglQuerySurface(display, surface, EGL_HEIGHT, &h);
-
-            mxDisplay = display;
-            mxContext = context;
-            mxSurface = surface;
-
-            // Initialize GL state:
-            // FIXME: surely all this glContext - **per-thread** - !
-
-            glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
-            glEnable(GL_CULL_FACE);
-            glShadeModel(GL_SMOOTH);
-            glDisable(GL_DEPTH_TEST);
-#endif
             break;
         }
         case APP_CMD_WINDOW_RESIZED:
@@ -418,7 +258,7 @@ void AndroidSalInstance::onAppCmd (struct android_app* app, int32_t cmd)
         case APP_CMD_WINDOW_REDRAW_NEEDED:
         {
             fprintf (stderr, "redraw needed\n");
-            AndroidSalInstance::getInstance()->RedrawWindows (pWindow);
+            mbQueueReDraw = true;
             break;
         }
 
@@ -536,24 +376,43 @@ void AndroidSalInstance::DoReleaseYield (int nTimeoutMS)
 
     fprintf (stderr, "DoReleaseYield #2 %d thread: %d ms\n",
              nTimeoutMS, (int)pthread_self());
-    void *outData = NULL;
+#ifndef PLASMA
+
+    struct android_poll_source *pSource = NULL;
     int outFd = 0, outEvents = 0;
 
     if (mbQueueReDraw)
         nTimeoutMS = 0;
 
-    int nRet = ALooper_pollAll(nTimeoutMS, &outFd, &outEvents, &outData);
-    fprintf (stderr, "ret #3 %d %d %d %p\n", nRet, outFd, outEvents, outData);
+    int nRet;
+    while ((nRet = ALooper_pollAll (nTimeoutMS, &outFd, &outEvents, (void**)&pSource)) >= 0)
+    {
+        fprintf (stderr, "ret #5 %d %d %d %p\n", nRet, outFd, outEvents, pSource);
+        // acquire yield mutex again
+        AcquireYieldMutex(nAcquireCount);
+
+        // Process this event.
+        if (pSource != NULL)
+            pSource->process(mpApp, pSource);
+
+        nAcquireCount = ReleaseYieldMutex();
+    }
 
     // acquire yield mutex again
     AcquireYieldMutex(nAcquireCount);
 
-    // FIXME: this is more or less deranged: why can we not
-    // set a callback in the native app glue's ALooper_addFd ?
-    if (nRet == LOOPER_ID_MAIN)
-        mpApp->cmdPollSource.process(mpApp, &mpApp->cmdPollSource);
-    else if (nRet == LOOPER_ID_INPUT)
-        mpApp->inputPollSource.process(mpApp, &mpApp->inputPollSource);
+    if (mbQueueReDraw)
+        AndroidSalInstance::getInstance()->RedrawWindows (mpApp->window);
+
+#else
+    static int nPlasma = 0;
+    char buffer[128];
+    sprintf (buffer, "yield %d", nPlasma++);
+    plasma_now(buffer);
+
+    // acquire yield mutex again
+    AcquireYieldMutex(nAcquireCount);
+#endif
 }
 
 bool AndroidSalInstance::AnyInput( sal_uInt16 nType )
@@ -667,4 +526,5 @@ int AndroidSalSystem::ShowNativeDialog( const rtl::OUString& rTitle,
     return 0;
 }
 
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index 56869c2..89744ae 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -150,11 +150,12 @@ sal_Bool SvpSalFrame::PostEvent( void* pData )
     return sal_True;
 }
 
-void SvpSalFrame::PostPaint() const
+void SvpSalFrame::PostPaint(bool bImmediate) const
 {
     if( m_bVisible )
     {
         SalPaintEvent aPEvt(0, 0, maGeometry.nWidth, maGeometry.nHeight);
+        aPEvt.mbImmediateUpdate = bImmediate;
         CallCallback( SALEVENT_PAINT, &aPEvt );
     }
 }
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 56ea818..e330dcb 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -301,7 +301,7 @@ void SvpSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
                 {
                     // this would be a good time to post a paint
                     const SvpSalFrame* pSvpFrame = static_cast<const SvpSalFrame*>(it->m_pFrame);
-                    pSvpFrame->PostPaint();
+                    pSvpFrame->PostPaint(false);
                 }
             }
         }
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index 37e0ae9..8de4054 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -65,7 +65,7 @@ public:
 
     void GetFocus();
     void LoseFocus();
-    void PostPaint() const;
+    void PostPaint(bool bImmediate) const;
 
     // SvpElement
     virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aFrame; }
@@ -126,6 +126,7 @@ public:
     /*TODO: functional implementation */
     virtual void                SetScreenNumber( unsigned int nScreen ) { (void)nScreen; }
     virtual void                SetApplicationID(const rtl::OUString &rApplicationID) { (void) rApplicationID; }
+    bool IsVisible() { return m_bVisible; }
 };
 #endif // _SVP_SVPFRAME_HXX
 
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index cf98fb8..4db7b12 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -155,12 +155,16 @@ oslSignalAction SAL_CALL VCLExceptionSignal_impl( void* /*pData*/, oslSignalInfo
 
 }
 
+extern void VCL_DLLPUBLIC plasma_now(const char *msg);
+
 // =======================================================================
 int ImplSVMain()
 {
     // The 'real' SVMain()
     RTL_LOGFILE_CONTEXT( aLog, "vcl (ss112471) ::SVMain" );
 
+//    plasma_now("top"); - works here
+
     ImplSVData* pSVData = ImplGetSVData();
 
     DBG_ASSERT( pSVData->mpApp, "no instance of class Application" );
@@ -175,6 +179,7 @@ int ImplSVMain()
     {
         // Application-Main rufen
         pSVData->maAppData.mbInAppMain = sal_True;
+//        plasma_now("after vcl init"); - works here
         nReturn = pSVData->mpApp->Main();
         pSVData->maAppData.mbInAppMain = sal_False;
     }


More information about the Libreoffice-commits mailing list