[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    =?iso-8859-1?Q?=5BPATCH=5D=20b2client=20does=20not=20close=20on=20dbl=20click?=
From:       mikelima () virgilio ! it
Date:       2002-03-31 9:29:51
[Download RAW message or body]

Hello,
I am in the currently toying with the b2 kwin client.
I would like it to turn off the maximize button on unresizable
windows, and to turn off the resize handle accordingly.
My first attempts are not really usable(Maximizing the
window turns it non-resizable, and the border is badly rendered),
however, I added an option I have been missing:
most kwin clients close the window when double clicking on the
window menu button. This is consistent e.g. with what motif
does. the B2 window decoration did not.
the attached path corrects this (stolen from kdedefault client).
Can someone commit this, if it is found useful?



=====
--- b2client.cpp.orig   Sat Nov  3 02:21:40 2001
+++ b2client.cpp        Sat Mar 30 22:58:33 2002
@@ -778,9 +778,20 @@

 void B2Client::menuButtonPressed()
 {
-    workspace()->clientPopup(this)->
-        popup(button[BtnMenu]->mapToGlobal(button[BtnMenu]->
-                                           rect().bottomLeft()));
+    static QTime* t = 0;
+    static B2Client* tc = 0;
+
+    if (!t) t = new QTime;
+
+    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()

=====
thank you,

--
Luciano Montanaro//
               \x/ mikelima@virgilio.it





>> 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