[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeutils/klaptopdaemon
From: Paul Campbell <paul () taniwha ! com>
Date: 2004-03-09 23:07:21
Message-ID: 20040309230721.8B27C99AC () office ! kde ! org
[Download RAW message or body]
CVS commit by campbell:
Change to handle case where icon mask was missing (caused seg fault)
M +9 -5 daemondock.cpp 1.57
--- kdeutils/klaptopdaemon/daemondock.cpp #1.56:1.57
@@ -571,5 +571,8 @@ void laptop_dock::displayPixmap()
QImage image = pm.convertToImage();
- QImage mask = pm.mask()->convertToImage();
+ const QBitmap *bmmask = pm.mask();
+ QImage mask;
+ if (bmmask)
+ mask = bmmask->convertToImage();
int w = image.width();
@@ -580,5 +583,5 @@ void laptop_dock::displayPixmap()
for (x = 0; x < w; x++)
for (y = 0; y < h; y++)
- if (mask.pixelIndex(x, y) != 0){
+ if (!bmmask || mask.pixelIndex(x, y) != 0){
rgb = image.pixel(x, y);
if (qRed(rgb) == 0xff &&
@@ -609,5 +612,5 @@ void laptop_dock::displayPixmap()
for (y = h-1; y >= 0; y--)
for (x = 0; x < w; x++)
- if (mask.pixelIndex(x, y) != 0){
+ if (!bmmask || mask.pixelIndex(x, y) != 0){
rgb = image.pixel(x, y);
if (qRed(rgb) == 0xff &&
@@ -625,5 +628,6 @@ quit:
QPixmap q;
q.convertFromImage(image);
- q.setMask(*pm.mask());
+ if (bmmask)
+ q.setMask(*bmmask);
setPixmap(q);
adjustSize();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic