aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormartynas2010-12-14 11:08:47 +0000
committermartynas2010-12-14 11:08:47 +0000
commit15e08ff549ea284d28acaac40400aabd7248d891 (patch)
treee7f16bc3fe71d668814fbf73b369ed00a76d5e47
parenta2e547562236c8458a92b1718194e5f9f93754b6 (diff)
downloadcwm-15e08ff549ea284d28acaac40400aabd7248d891.tar.gz
in MotionNotify geom.x, geom.y calculations take into account bwidth.
fixes the annoying bug where windows would go +bwidth pixels right, +bwidth pixels down. ok okan@
Diffstat (limited to '')
-rw-r--r--mousefunc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mousefunc.c b/mousefunc.c
index 559e526..cdc0e46 100644
--- a/mousefunc.c
+++ b/mousefunc.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: mousefunc.c,v 1.19 2009/12/15 04:10:42 okan Exp $
+ * $Id: mousefunc.c,v 1.20 2010/12/14 11:08:47 martynas Exp $
*/
#include <sys/param.h>
@@ -157,8 +157,8 @@ mousefunc_window_move(struct client_ctx *cc, void *arg)
client_draw_border(cc);
break;
case MotionNotify:
- cc->geom.x = ev.xmotion.x_root - px;
- cc->geom.y = ev.xmotion.y_root - py;
+ cc->geom.x = ev.xmotion.x_root - px - cc->bwidth;
+ cc->geom.y = ev.xmotion.y_root - py - cc->bwidth;
/* don't sync more than 60 times / second */
if ((ev.xmotion.time - time) > (1000 / 60)) {