[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: =?iso-8859-1?Q?Re=3A=20=5BPATCH=5D=20b2client=20does=20not=20close=20on=20dbl=20click?=
From: mikelima () virgilio ! it
Date: 2002-03-31 15:27:27
[Download RAW message or body]
This other patch appears to work, and it should not leak anything.
KdeDefaultClient should be changed the same way, by the way.
-------------------------------------------
--- b2client.cpp.orig Sat Nov 3 02:21:40 2001
+++ b2client.cpp Sun Mar 31 17:17:19 2002
@@ -778,16 +778,25 @@
void B2Client::menuButtonPressed()
{
- workspace()->clientPopup(this)->
- popup(button[BtnMenu]->mapToGlobal(button[BtnMenu]->
- rect().bottomLeft()));
+ static QTime t;
+ static B2Client* tc = 0;
+
+ if (tc != this || t.elapsed() > QApplication::doubleClickInterval())
{
+ workspace()->clientPopup(this)->popup(
+ button[BtnMenu]->mapToGlobal(
+ button[BtnMenu]->rect().bottomLeft()));
+ } else {
+ closeWindow();
+ }
+ t.start();
+ tc = this;
}
void B2Client::slotReset()
{
redraw_pixmaps();
- QColor c = options->colorGroup(Options::TitleBar, isActive()).
- color(QColorGroup::Button);
+ QColor c = options->colorGroup(Options::TitleBar,
+ isActive()).color(QColorGroup::Button);
for(int i = 0; i < BtnCount; i++)
if (button[i]) {
--------------------------
Luciano
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic