summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdiel Janulgue <abdiel.janulgue@nokia.com>2010-03-02 19:02:48 +0200
committerAbdiel Janulgue <abdiel.janulgue@nokia.com>2010-03-02 19:02:48 +0200
commitb04fb347bddfe081267abcb1c0dfdf3796de78c9 (patch)
treee2887e22e7a16c6b2484ec628c8b67a246eb62ee
parent8265850aaae669051d5bb7dec64607a244e6d153 (diff)
Changes: minor fixes in ping handling. fix compile error in gles20.3.3rc1
RevBy: TrustMe
-rw-r--r--src/duicompositemanager.cpp17
-rw-r--r--src/duicompositewindow.cpp3
-rw-r--r--src/duitexturepixmapitem_p.cpp2
-rw-r--r--src/texturepixmapshaders.h4
4 files changed, 13 insertions, 13 deletions
diff --git a/src/duicompositemanager.cpp b/src/duicompositemanager.cpp
index 768531a..9240582 100644
--- a/src/duicompositemanager.cpp
+++ b/src/duicompositemanager.cpp
@@ -1619,6 +1619,9 @@ void DuiCompositeManagerPrivate::sendPing(DuiCompositeWindow *w)
void DuiCompositeManagerPrivate::gotHungWindow(DuiCompositeWindow *w)
{
Window window = w->window();
+ if (!DuiDecoratorFrame::instance()->decoratorItem())
+ return;
+
enableCompositing(true);
// own the window so we could kill it if we want to.
@@ -1627,16 +1630,14 @@ void DuiCompositeManagerPrivate::gotHungWindow(DuiCompositeWindow *w)
DuiDecoratorFrame::instance()->setManagedWindow(window);
DuiDecoratorFrame::instance()->raise();
DuiCompositeWindow *p = DuiDecoratorFrame::instance()->decoratorItem();
- if (p) {
- int z = atom->windowType(window);
- w->setZValue(z);
- p->setZValue(z);
+ int z = atom->windowType(window);
+ w->setZValue(z);
+ p->setZValue(z);
#if (QT_VERSION >= 0x040600)
- w->stackBefore(p);
+ w->stackBefore(p);
#endif
-
- w->updateWindowPixmap();
- }
+
+ w->updateWindowPixmap();
}
void DuiCompositeManagerPrivate::showLaunchIndicator(int timeout)
diff --git a/src/duicompositewindow.cpp b/src/duicompositewindow.cpp
index c49c7dc..74fad61 100644
--- a/src/duicompositewindow.cpp
+++ b/src/duicompositewindow.cpp
@@ -310,8 +310,7 @@ void DuiCompositeWindow::pingWindow()
{
process_hung = true;
- // 1s delay, if we dont get anything, means window is dead!
- QTimer::singleShot(1000, this, SLOT(pingTimeout()));
+ QTimer::singleShot(5000, this, SLOT(pingTimeout()));
emit pingTriggered(this);
}
diff --git a/src/duitexturepixmapitem_p.cpp b/src/duitexturepixmapitem_p.cpp
index 0e8ce4e..15e1f74 100644
--- a/src/duitexturepixmapitem_p.cpp
+++ b/src/duitexturepixmapitem_p.cpp
@@ -213,7 +213,7 @@ void DuiTexturePixmapPrivate::init()
XGetWindowAttributes(QX11Info::display(), item->window(), &a);
XRenderPictFormat *format = XRenderFindVisualFormat(QX11Info::display(), a.visual);
- has_alpha = (format->type == PictTypeDirect && format->direct.alphaMask);
+ has_alpha = (format && format->type == PictTypeDirect && format->direct.alphaMask);
if (a.map_state != IsViewable)
viewable = false;
diff --git a/src/texturepixmapshaders.h b/src/texturepixmapshaders.h
index 9c52a7c..9b4a648 100644
--- a/src/texturepixmapshaders.h
+++ b/src/texturepixmapshaders.h
@@ -57,10 +57,10 @@ static const char *AlphaTestFragShaderSource = "\
static const char *blurshader = "\
varying lowp vec2 fragTexCoord;\
uniform sampler2D texture0;\
-uniform float blurstep;\
+uniform mediump float blurstep;\
void main(void)\
{\
-vec4 sample0,\
+mediump vec4 sample0,\
sample1,\
sample2,\
sample3;\