summaryrefslogtreecommitdiffstats
path: root/src/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/qapplication.cpp3
-rw-r--r--src/kernel/qapplication_x11.cpp7
2 files changed, 8 insertions, 2 deletions
diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp
index 591fc8d..620f5df 100644
--- a/src/kernel/qapplication.cpp
+++ b/src/kernel/qapplication.cpp
@@ -321,6 +321,7 @@ void qt_init( int *, char **, QApplication::Type );
void qt_cleanup();
#if defined(Q_WS_X11)
void qt_init( Display* dpy, Qt::HANDLE, Qt::HANDLE );
+void qt_init( int *, char **, Display* dpy, Qt::HANDLE, Qt::HANDLE );
#endif
Q_EXPORT bool qt_tryModalHelper( QWidget *widget, QWidget **rettop );
@@ -962,7 +963,7 @@ QApplication::QApplication(Display *dpy, int argc, char **argv,
qt_init( &argc, argv, GuiClient );
} else {
- qt_init(dpy, visual, colormap);
+ qt_init( &argc, argv, dpy, visual, colormap );
}
process_cmdline( &argc, argv );
diff --git a/src/kernel/qapplication_x11.cpp b/src/kernel/qapplication_x11.cpp
index 2875228..121d633 100644
--- a/src/kernel/qapplication_x11.cpp
+++ b/src/kernel/qapplication_x11.cpp
@@ -1652,7 +1652,7 @@ void qt_init_internal( int *argcptr, char **argv,
}
#endif
- if ( display ) {
+ if ( display && ((!argcptr) || (!argv)) ) {
// Qt part of other application
appForeignDpy = TRUE;
@@ -2465,6 +2465,11 @@ void qt_init( Display *display, Qt::HANDLE visual, Qt::HANDLE colormap )
qt_init_internal( 0, 0, display, visual, colormap );
}
+void qt_init( int *argcptr, char **argv, Display *display, Qt::HANDLE visual, Qt::HANDLE colormap )
+{
+ qt_init_internal( argcptr, argv, display, visual, colormap );
+}
+
/*****************************************************************************
qt_cleanup() - cleans up when the application is finished