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
* 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#238937 - minor splash-screen bugs
-- 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 "connection.h"
#include "logger.h"
#include "booster.h"
#include <sys/socket.h>
#include <QtConcurrentRun>
#include <QApplication>
#include <MApplication>
#include "coverage.h"
int EventHandler::m_sighupFd[2];
struct sigaction EventHandler::m_oldSigAction;

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

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

@ -35,9 +35,11 @@
#include <cstring>
#include <sstream>
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#endif //Q_WS_X11
#include <sys/types.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 &pixmapId)
{
#ifdef Q_WS_X11
std::stringstream st;
st << pid;
std::string pidStr = st.str();
// set error handler for all Xlib calls
XErrorHandler oldHandler = XSetErrorHandler(Booster::handleXError);
Display * dpy = XOpenDisplay(NULL);
if (dpy)
{
@ -383,19 +390,35 @@ void Booster::requestSplash(const int pid, const std::string &wmclass,
Window compositorWindow = *reinterpret_cast<Window *>(prop);
const char* splashProperty = "_MEEGO_SPLASH_SCREEN";
Atom splashPropertyAtom = XInternAtom(dpy, splashProperty, False);
Atom stringAtom = XInternAtom(dpy, "STRING", False);
XChangeProperty(dpy, compositorWindow, splashPropertyAtom, stringAtom,
8, PropModeReplace, (unsigned char *)data,
len);
XChangeProperty(dpy, compositorWindow, splashPropertyAtom, XA_STRING,
8, PropModeReplace, (unsigned char*) data, len);
// Without flushing, the change seems to loiter in X's queue
XFlush(dpy);
delete[] data;
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()
{

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

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

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

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

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

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

Loading…
Cancel
Save