From b6df0940fafd9b9e28b86ceeb802557fa56e01a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Sun, 30 Sep 2001 20:29:21 +0000 Subject: [PATCH] This is a quick hack to get kwmthemes working in the upcoming alpha release. - Temporarily disabled use of the stretchPixmap() function because it loses the pixmap mask, causing KWin to segfault. (This will just make some themes a bit slower) - Fixed the border drawing problem reported by Vadim Plessky on kde-devel. - Fixed a titlebar shade/un-shade flicker problem. - Made the client compile when QT_NO_COMPAT is defined. svn path=/trunk/kdebase/kwin/; revision=115973 --- clients/kwmtheme/kwmthemeclient.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/clients/kwmtheme/kwmthemeclient.cpp b/clients/kwmtheme/kwmthemeclient.cpp index 9ce6de25b5..585c8e6c6a 100644 --- a/clients/kwmtheme/kwmthemeclient.cpp +++ b/clients/kwmtheme/kwmthemeclient.cpp @@ -94,12 +94,12 @@ static void create_pixmaps() if(framePixmaps[i]->isNull()) qWarning("Unable to load frame pixmap for %s", keys[i]); } - +/* *framePixmaps[FrameTop] = stretchPixmap(*framePixmaps[FrameTop], false); *framePixmaps[FrameBottom] = stretchPixmap(*framePixmaps[FrameBottom], false); *framePixmaps[FrameLeft] = stretchPixmap(*framePixmaps[FrameLeft], true); *framePixmaps[FrameRight] = stretchPixmap(*framePixmaps[FrameRight], true); - +*/ maxExtent = framePixmaps[FrameTop]->height(); if(framePixmaps[FrameBottom]->height() > maxExtent) maxExtent = framePixmaps[FrameBottom]->height(); @@ -108,6 +108,8 @@ static void create_pixmaps() if(framePixmaps[FrameRight]->width() > maxExtent) maxExtent = framePixmaps[FrameRight]->width(); + maxExtent++; + menuPix = new QPixmap(locate("appdata", "pics/"+config->readEntry("menu", " "))); iconifyPix = new QPixmap(locate("appdata", @@ -247,7 +249,7 @@ void MyButton::drawButtonLabel(QPainter *p) KWMThemeClient::KWMThemeClient( Workspace *ws, WId w, QWidget *parent, const char *name ) - : Client( ws, w, parent, name, WResizeNoErase | WNorthWestGravity) + : Client( ws, w, parent, name, WResizeNoErase | WStaticContents ) { stickyBtn = maxBtn = mnuBtn = 0; connect(options, SIGNAL(resetClients()), this, SLOT(slotReset())); @@ -732,7 +734,6 @@ void KWMThemeClient::mouseDoubleClickEvent( QMouseEvent * e ) { if (titlebar->geometry().contains( e->pos() ) ) setShade( !isShade() ); - workspace()->requestFocus( this ); } void KWMThemeClient::stickyChange(bool on)