diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-10-13 16:05:18 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-10-13 16:05:18 +0000 |
commit | dfaa362629d74a4f2a1e1683137df2267a0d003e (patch) | |
tree | 794aca645db8f388e76267c6c025db51e01c6f2f /sj2/source | |
parent | 9c677ed69bdae2ae18b8cc7b9126a404c9a373f2 (diff) |
INTEGRATION: CWS vcl44 (1.25.4); FILE MERGED
2005/10/05 10:58:07 pl 1.25.4.1: #b6255778# fix applet appearing in own frame with gtk plugin
Diffstat (limited to 'sj2/source')
-rw-r--r-- | sj2/source/jscpp/sjapplet_impl.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sj2/source/jscpp/sjapplet_impl.cxx b/sj2/source/jscpp/sjapplet_impl.cxx index 5e887aa490c2..8d169d75b5c7 100644 --- a/sj2/source/jscpp/sjapplet_impl.cxx +++ b/sj2/source/jscpp/sjapplet_impl.cxx @@ -4,9 +4,9 @@ * * $RCSfile: sjapplet_impl.cxx,v $ * - * $Revision: 1.25 $ + * $Revision: 1.26 $ * - * last change: $Author: rt $ $Date: 2005-09-07 20:14:11 $ + * last change: $Author: hr $ $Date: 2005-10-13 17:05:18 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -55,7 +55,7 @@ #include <vcl/sysdata.hxx> #include <com/sun/star/java/XJavaVM.hpp> -#ifdef LINUX +#ifdef UNX #define Time xlib_time #define Window xlib_window #define Font xlib_font @@ -125,6 +125,10 @@ struct EmbeddedWindow { EmbeddedWindow::EmbeddedWindow(JNIEnv * pEnv, SystemEnvData const * pEnvData) throw(com::sun::star::uno::RuntimeException) : _joWindow(0) { + // ensure that all operations for the window contained in pEnvData + // have been processed by the Xserver since java will access that + // window by a separate connection to the Xserver + XSync( (Display*)pEnvData->pDisplay, False); try { //java < 1.5 jclass jcToolkit = pEnv->FindClass("java/awt/Toolkit"); testJavaException(pEnv); @@ -178,9 +182,6 @@ EmbeddedWindow::EmbeddedWindow(JNIEnv * pEnv, SystemEnvData const * pEnvData) jobject joFrame = pEnv->AllocObject(jcFrame); testJavaException(pEnv); jmethodID jmFrame_rinit = pEnv->GetMethodID(jcFrame, "<init>", "(J)V" ); testJavaException(pEnv); - //When using GTK, for example on JDS, then the applet is not painted. Just calling XSync - //seems to fix this problem. - XSync( (Display*)pEnvData->pDisplay, False); pEnv->CallVoidMethod(joFrame, jmFrame_rinit, (jlong) pEnvData->aWindow); testJavaException(pEnv); _joWindow = pEnv->NewGlobalRef(joFrame); #endif |