Do not register DrKonqui signal handler when launching Mozilla and Chromium

This resolves Bug 1497
pull/1/head
Timothy Pearson 10 years ago
parent 6446d3f46c
commit 82ccf2925e

@ -24,6 +24,7 @@
#include <tdeaboutdata.h>
#include <tdeconfig.h>
#include <tdeglobal.h>
#include <kcrash.h>
#include <kstandarddirs.h>
#undef signals
@ -99,6 +100,7 @@ int isPolyester;
int eclipseFix;
int openOfficeFix;
int mozillaFix;
int chromiumFix;
int gtkQtDebug;
Atom kipcCommAtom;
@ -334,6 +336,7 @@ void createTQApp()
#endif // USE_SOLARIS
TQString cmdlineAppName = "unknown-gtk-tqt-application";
TQString cmdlineCrashHandler = "--crashhandler";
TQStringList cmdlineArgs = TQStringList::split(" ", cmdLine, false);
if (cmdlineArgs.count() > 0) {
TQFileInfo fi(cmdlineArgs[0]);
@ -342,20 +345,9 @@ void createTQApp()
}
int cmdlineAppNameLength = cmdlineAppName.length() + 1;
// Create a new TDEApplication and supply it with fake data to keep its constructor happy
argv_fake = (char**) malloc(sizeof(char*));
argv_fake[0] = (char*) malloc(sizeof(char) * cmdlineAppNameLength);
strncpy(argv_fake[0], cmdlineAppName.ascii(), cmdlineAppNameLength);
aboutData.setAppName(cmdlineAppName.ascii());
aboutData.addAuthor("Timothy Pearson", I18N_NOOP("Maintainer"), "kb9vqf@pearsoncomputing.net", 0);
aboutData.addAuthor("David Sansome", I18N_NOOP("Original Author"), "me@davidsansome.com", 0);
TDECmdLineArgs::init(argc_fake, argv_fake, &aboutData);
TDEApplication::disableAutoDcopRegistration();
// Process hacks
mozillaFix = (cmdLine.contains("mozilla") || cmdLine.contains("firefox") || cmdLine.contains("iceweasel") || cmdLine.contains("thunderbird") || cmdLine.contains("icedove"));
chromiumFix = (cmdLine.contains("chromium-browser") || cmdLine.contains("chrome-browser"));
openOfficeFix = (cmdLine.endsWith("soffice.bin"))
| (cmdLine.endsWith("swriter.bin"))
@ -366,10 +358,32 @@ void createTQApp()
eclipseFix = cmdLine.contains("eclipse");
if (mozillaFix || chromiumFix) {
// Without these lines Firefox WILL crash in EnterBaseline on first startup
// Does baseline internally generate SIGSEGVs as part of normal operation?
cmdlineCrashHandler = "--nocrashhandler";
}
int cmdlineCrashHandlerLength = cmdlineCrashHandler.length() + 1;
// Create a new TDEApplication and supply it with fake data to keep its constructor happy
argv_fake = (char**) malloc(sizeof(char*));
argv_fake[0] = (char*) malloc(sizeof(char) * cmdlineAppNameLength);
argv_fake[1] = (char*) malloc(sizeof(char) * cmdlineCrashHandlerLength);
strncpy(argv_fake[0], cmdlineAppName.ascii(), cmdlineAppNameLength);
strncpy(argv_fake[1], cmdlineCrashHandler.ascii(), cmdlineCrashHandlerLength);
aboutData.setAppName(cmdlineAppName.ascii());
aboutData.addAuthor("Timothy Pearson", I18N_NOOP("Maintainer"), "kb9vqf@pearsoncomputing.net", 0);
aboutData.addAuthor("David Sansome", I18N_NOOP("Original Author"), "me@davidsansome.com", 0);
TDECmdLineArgs::init(argc_fake, argv_fake, &aboutData);
TDEApplication::disableAutoDcopRegistration();
gtkQtDebug = (getenv("GTK_TQT_ENGINE_DEBUG") != NULL) ? 1 : 0;
if (gtkQtDebug)
if (gtkQtDebug) {
printf("createTQApp()\n");
}
char* sessionEnv = getenv("SESSION_MANAGER");
if (TQString(sessionEnv).endsWith(TQString::number(getpid())) || cmdLine.contains("notification-daemon-tde") || cmdLine.contains("nspluginviewer") || cmdLine.contains("gnome-wm") || cmdLine.contains("metacity") || cmdLine.contains("xfwm4") || (getenv("GTK_TQT_ENGINE_DISABLE") != NULL))
@ -491,6 +505,7 @@ void destroyTQApp()
if (altBackGC != 0)
gtk_gc_release(altBackGC);
free(argv_fake[1]);
free(argv_fake[0]);
free(argv_fake);
}

@ -6,7 +6,6 @@
static void qtengine_rc_style_init (QtEngineRcStyle *style);
static void qtengine_rc_style_class_init (QtEngineRcStyleClass *klass);
static void qtengine_rc_style_finalize (GObject *object);
static guint qtengine_rc_style_parse (GtkRcStyle *rc_style,
GtkSettings *settings,
GScanner *scanner);
@ -45,7 +44,6 @@ static void qtengine_rc_style_init (QtEngineRcStyle *style)
static void qtengine_rc_style_class_init (QtEngineRcStyleClass *klass)
{
GtkRcStyleClass *rc_style_class = GTK_RC_STYLE_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);

Loading…
Cancel
Save