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

List:       kde-core-devel
Subject:    Annoyance in kmix [PATCH]
From:       Ilya Konstantinov <kde-core-devel () future ! galanet ! net>
Date:       2001-08-02 20:49:43
[Download RAW message or body]

Hi,

This patch fixes a bug in Kmix' code which takes care of placing that
small "Master Volume" popup you get by clicking Kmix' dock icon.
The code tries to place the popup to the left of the cursor, if
there isn't enough space to the right of the cursor, and vice versa
(so the popup won't go out of the screen).

(The bug exhibits if kmix is the rightest icon in the dock, assuming
the dock is right-aligned)

Please review it and merge if possible.

["kmix_applet_placement.patch" (text/plain)]

--- kdemultimedia/kmix/kmixdockwidget.cpp	2001/06/10 13:06:26	1.9
+++ kdemultimedia/kmix/kmixdockwidget.cpp	2001/08/02 20:37:19
@@ -106,13 +106,13 @@ void KMixDockWidget::mouseReleaseEvent(Q
             int h = masterVol->height();
 
             if (x+w > sw)
-                x = me->pos().x()-w;
+                x = me->globalPos().x()-w;
             if (y+h > sh)
-                y = me->pos().y()-h;
+                y = me->globalPos().y()-h;
             if (x < sx)
-                x = me->pos().x();
+                x = me->globalPos().x();
             if (y < sy)
-                y = me->pos().y();
+                y = me->globalPos().y();
 
 	masterVol->move(x, y);
 	masterVol->show();


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

Configure | About | News | Add a list | Sponsored by KoreLogic