Fixes: NB#238937 - minor splash-screen bugs

RevBy: Jussi Lind
pull/1/head
Alexey Shilov 15 years ago
parent 5f7cb5a36b
commit 2fedc24bde

1
debian/changelog vendored

@ -4,6 +4,7 @@ applauncherd (0.27.0) unstable; urgency=low
* Implemented: SWP#DUI-5199 * Implemented: SWP#DUI-5199
* Fixes: NB#244103 - Device hangs on closing application in connecting view while configuring MFE account * Fixes: NB#244103 - Device hangs on closing application in connecting view while configuring MFE account
* Fixes: NB#243857 - Mismatched new[] - delete in applauncherd * Fixes: NB#243857 - Mismatched new[] - delete in applauncherd
* Fixes: NB#238937 - minor splash-screen bugs
-- Olli Leppanen <olli.leppanen@nokia.com> Fri, 08 Apr 2011 15:08:24 +0300 -- Olli Leppanen <olli.leppanen@nokia.com> Fri, 08 Apr 2011 15:08:24 +0300

@ -1,12 +1,13 @@
#include <QtConcurrentRun>
#include <QApplication>
#include <MApplication>
#include "coverage.h"
#include "eventhandler.h" #include "eventhandler.h"
#include "connection.h" #include "connection.h"
#include "logger.h" #include "logger.h"
#include "booster.h" #include "booster.h"
#include <sys/socket.h> #include <sys/socket.h>
#include <QtConcurrentRun>
#include <QApplication>
#include <MApplication>
#include "coverage.h"
int EventHandler::m_sighupFd[2]; int EventHandler::m_sighupFd[2];
struct sigaction EventHandler::m_oldSigAction; struct sigaction EventHandler::m_oldSigAction;

@ -1,8 +1,8 @@
#include <QObject> #include <QObject>
#include <MGConfItem> #include <QSocketNotifier>
#include <signal.h> #include <signal.h>
#include <tr1/memory> #include <tr1/memory>
#include <QSocketNotifier> #include <MGConfItem>
using std::tr1::shared_ptr; using std::tr1::shared_ptr;

@ -17,8 +17,8 @@
** **
****************************************************************************/ ****************************************************************************/
#include "ebooster.h"
#include <QtCore> #include <QtCore>
#include "ebooster.h"
extern "C" extern "C"
{ {

@ -35,9 +35,11 @@
#include <cstring> #include <cstring>
#include <sstream> #include <sstream>
#ifdef Q_WS_X11
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
#endif //Q_WS_X11
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
@ -338,10 +340,15 @@ void Booster::requestSplash(const int pid, const std::string &wmclass,
const std::string &portraitSplash, const std::string &landscapeSplash, const std::string &portraitSplash, const std::string &landscapeSplash,
const std::string &pixmapId) const std::string &pixmapId)
{ {
#ifdef Q_WS_X11
std::stringstream st; std::stringstream st;
st << pid; st << pid;
std::string pidStr = st.str(); std::string pidStr = st.str();
// set error handler for all Xlib calls
XErrorHandler oldHandler = XSetErrorHandler(Booster::handleXError);
Display * dpy = XOpenDisplay(NULL); Display * dpy = XOpenDisplay(NULL);
if (dpy) if (dpy)
{ {
@ -383,19 +390,35 @@ void Booster::requestSplash(const int pid, const std::string &wmclass,
Window compositorWindow = *reinterpret_cast<Window *>(prop); Window compositorWindow = *reinterpret_cast<Window *>(prop);
const char* splashProperty = "_MEEGO_SPLASH_SCREEN"; const char* splashProperty = "_MEEGO_SPLASH_SCREEN";
Atom splashPropertyAtom = XInternAtom(dpy, splashProperty, False); Atom splashPropertyAtom = XInternAtom(dpy, splashProperty, False);
Atom stringAtom = XInternAtom(dpy, "STRING", False);
XChangeProperty(dpy, compositorWindow, splashPropertyAtom, stringAtom, XChangeProperty(dpy, compositorWindow, splashPropertyAtom, XA_STRING,
8, PropModeReplace, (unsigned char *)data, 8, PropModeReplace, (unsigned char*) data, len);
len);
// Without flushing, the change seems to loiter in X's queue // Without flushing, the change seems to loiter in X's queue
XFlush(dpy); XFlush(dpy);
delete[] data; delete[] data;
XFree(prop); XFree(prop);
} }
// close connection to X server
XCloseDisplay(dpy);
XSetErrorHandler(oldHandler);
}
#else //Q_WS_X11
// prevent compilation warnings
(void) pid;
(void) wmclass;
(void) portraitSplash;
(void) landscapeSplash;
(void) pixmapId;
#endif //Q_WS_X11
} }
#ifdef Q_WS_X11
int Booster::handleXError(Display *, XErrorEvent *)
{
return 0;
} }
#endif //Q_WS_X11
void Booster::setEnvironmentBeforeLaunch() void Booster::setEnvironmentBeforeLaunch()
{ {

@ -20,6 +20,8 @@
#ifndef BOOSTER_H #ifndef BOOSTER_H
#define BOOSTER_H #define BOOSTER_H
#include <QX11Info>
#include <cstdlib> #include <cstdlib>
#include <string> #include <string>
@ -27,6 +29,10 @@ using std::string;
#include "appdata.h" #include "appdata.h"
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#endif //Q_WS_X11
class Connection; class Connection;
class SocketManager; class SocketManager;
class SingleInstance; class SingleInstance;
@ -145,6 +151,12 @@ public:
//! Return true, if in boot mode. //! Return true, if in boot mode.
bool bootMode() const; bool bootMode() const;
#ifdef Q_WS_X11
//! Error handler for Xlib calls
static int handleXError(Display *display, XErrorEvent *event);
#endif
protected: protected:
/*! /*!

@ -20,8 +20,8 @@
#ifndef MBOOSTER_H #ifndef MBOOSTER_H
#define MBOOSTER_H #define MBOOSTER_H
#include "booster.h"
#include "eventhandler.h" #include "eventhandler.h"
#include "booster.h"
#include <signal.h> #include <signal.h>

@ -17,8 +17,8 @@
** **
****************************************************************************/ ****************************************************************************/
#include "mbooster.h"
#include <QtCore> #include <QtCore>
#include "mbooster.h"
extern "C" extern "C"
{ {

@ -17,8 +17,8 @@
** **
****************************************************************************/ ****************************************************************************/
#include "qdeclarativebooster.h"
#include <QtCore> #include <QtCore>
#include "qdeclarativebooster.h"
extern "C" extern "C"
{ {

@ -20,8 +20,8 @@
#ifndef QDECLARATIVEBOOSTER_H #ifndef QDECLARATIVEBOOSTER_H
#define QDECLARATIVEBOOSTER_H #define QDECLARATIVEBOOSTER_H
#include "booster.h"
#include "eventhandler.h" #include "eventhandler.h"
#include "booster.h"
/*! /*!
* \class QDeclarativeBooster. * \class QDeclarativeBooster.

@ -17,8 +17,8 @@
** **
****************************************************************************/ ****************************************************************************/
#include "qtbooster.h"
#include <QtCore> #include <QtCore>
#include "qtbooster.h"
extern "C" extern "C"
{ {

Loading…
Cancel
Save