From 136f98c24ec04d7ed546198abcbc3e22890f0cda Mon Sep 17 00:00:00 2001 From: Luciano Montanaro Date: Sun, 26 Sep 2004 10:29:23 +0000 Subject: [PATCH] Fixed glitch on first uresizable window opening. svn path=/trunk/kdebase/kwin/; revision=349364 --- clients/b2/b2client.cpp | 7 +++++-- clients/b2/b2client.h | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/clients/b2/b2client.cpp b/clients/b2/b2client.cpp index c79febf628..d1f839a7b0 100644 --- a/clients/b2/b2client.cpp +++ b/clients/b2/b2client.cpp @@ -77,6 +77,7 @@ static DblClickOperation menu_dbl_click_op = NoOp; static bool pixmaps_created = false; static bool colored_frame = false; static bool do_draw_handle = true; +static bool drawSmallBorders = false; // ===================================== @@ -105,6 +106,8 @@ static void read_config(B2ClientFactory *f) conf.setGroup("General"); colored_frame = conf.readBoolEntry("UseTitleBarBorderColors", false); do_draw_handle = conf.readBoolEntry("DrawGrabHandle", true); + drawSmallBorders = !options()->moveResizeMaximizedWindows(); + QString opString = conf.readEntry("MenuButtonDoubleClickOperation", "NoOp"); if (opString == "Close") { menu_dbl_click_op = B2::CloseOp; @@ -498,11 +501,10 @@ void B2Client::addButtons(const QString& s, const QString tips[], bool B2Client::mustDrawHandle() const { - bool drawSmallBorders = !options()->moveResizeMaximizedWindows(); if (drawSmallBorders && (maximizeMode() & MaximizeVertical)) { return false; } else { - return draw_handle && isResizable(); + return do_draw_handle && isResizable(); } } @@ -694,6 +696,7 @@ void B2Client::doShape() mask -= QRect(0, height() - 4, width() - 40, 4); //bottom left } else { mask -= QRect(0, height() - 1, 1, 1); // bottom left point + mask -= QRect(width() - 1, height() - 1, 1, 1); //bottom right point } setMask(mask); diff --git a/clients/b2/b2client.h b/clients/b2/b2client.h index e9bbebbcc5..2f2f0f4f81 100644 --- a/clients/b2/b2client.h +++ b/clients/b2/b2client.h @@ -144,7 +144,6 @@ private: int bar_x_ofs; int in_unobs; QTime time; - bool draw_handle; }; class B2ClientFactory : public QObject, public KDecorationFactory