Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2007-02-19 20:29:19 +0000
committerAndrew Niefer2007-02-19 20:29:19 +0000
commit921891c12dd66a3f3c0bd8ecc2b5005b1f9c51ec (patch)
tree201e786207fe1607dd6c2dc2da16f716130c4d70 /bundles/org.eclipse.equinox.executable/library/motif
parentf5b0797e719a28a38a5ce013578fa5f1e5ef9d4d (diff)
downloadrt.equinox.framework-921891c12dd66a3f3c0bd8ecc2b5005b1f9c51ec.tar.gz
rt.equinox.framework-921891c12dd66a3f3c0bd8ecc2b5005b1f9c51ec.tar.xz
rt.equinox.framework-921891c12dd66a3f3c0bd8ecc2b5005b1f9c51ec.zip
bug 171093
Diffstat (limited to 'bundles/org.eclipse.equinox.executable/library/motif')
-rw-r--r--bundles/org.eclipse.equinox.executable/library/motif/eclipseMotif.c16
-rw-r--r--bundles/org.eclipse.equinox.executable/library/motif/eclipseMotifCommon.c8
2 files changed, 13 insertions, 11 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotif.c b/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotif.c
index 5d29042cc..3e6d781bc 100644
--- a/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotif.c
+++ b/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotif.c
@@ -69,13 +69,17 @@ extern void centreShell( Widget widget, Widget expose );
static void fixEnvForNetscape();
#endif /* NETSCAPE_FIX */
+void takeDownSplashCB( Widget shell, XtPointer app_data, XtPointer widget_data ) {
+ shellHandle = NULL;
+}
+
/* Show the Splash Window
*
* Create the splash window, load the pixmap and display the splash window.
*/
int showSplash( const char* featureImage )
{
- int argc [] = {0};
+ int argc = 0;
int x, y;
unsigned int width, height, depth, border;
ArgList args;
@@ -86,12 +90,8 @@ int showSplash( const char* featureImage )
Screen* screen;
Widget scrolledHandle, drawingHandle, image;
- /* bug 171093, No splash on Motif for now */
- return -1;
-
initWindowSystem(&initialArgc, initialArgv, 1);
-
- xDisplay = XtOpenDisplay(appContext, NULL, NULL, NULL, 0, 0, argc, 0);
+ xDisplay = XtDisplay(topWindow);
screen = XDefaultScreenOfDisplay( xDisplay );
if (featureImage != NULL)
{
@@ -114,6 +114,7 @@ int showSplash( const char* featureImage )
XtSetArg(args[nArgs], XmNwidth, width); nArgs++;
XtSetArg(args[nArgs], XmNheight, height); nArgs++;
shellHandle = XtAppCreateShell(getOfficialName(), "", applicationShellWidgetClass, xDisplay, args, nArgs);
+ XtAddCallback(shellHandle, XmNdestroyCallback, (XtCallbackProc) takeDownSplashCB, NULL);
nArgs = 0;
XtSetArg(args[nArgs++], XmNancestorSensitive, 1);
@@ -209,8 +210,9 @@ void takeDownSplash()
{
if (shellHandle != 0)
{
- XtUnrealizeWidget( shellHandle );
+ XtDestroyWidget( shellHandle );
XFlush( XtDisplay( shellHandle ) );
+ shellHandle = NULL;
}
}
diff --git a/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotifCommon.c b/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotifCommon.c
index 791f9d0af..b9a50d02c 100644
--- a/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotifCommon.c
+++ b/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotifCommon.c
@@ -108,12 +108,12 @@ void initWindowSystem( int* pArgc, char* argv[], int showSplash )
saveArgc = *pArgc;
saveArgv = argv;
}
-
+
/* Create the top level shell that will not be used other than
to initialize the application. */
- XtSetLanguageProc (NULL, NULL, NULL);
- topWindow = XtAppInitialize( &appContext, getOfficialName(), NULL, 0,
- pArgc, argv, NULL, NULL, 0 );
+ topWindow = XtInitialize(NULL, getOfficialName(), NULL, 0, pArgc, argv);
+ appContext = XtWidgetToApplicationContext(topWindow);
+ XtSetLanguageProc (appContext, NULL, NULL);
XtSetArg( arg[ 0 ], XmNmappedWhenManaged, False );
XtSetValues( topWindow, arg, 1 );
XtRealizeWidget( topWindow );

Back to the top