From 0cb91fc3db938818af027f1d820e599759ff85c9 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Sun, 31 May 2009 16:46:05 +0200 Subject: [PATCH] Fix mouse click coordinates forwarded to the desktop window Signed-off-by: Brenden Matthews --- src/conky.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/conky.c b/src/conky.c index 1266298c..2d222578 100644 --- a/src/conky.c +++ b/src/conky.c @@ -6704,6 +6704,8 @@ static void main_loop(void) /* forward the click to the desktop window */ XUngrabPointer(display, ev.xbutton.time); ev.xbutton.window = window.desktop; + ev.xbutton.x = ev.xbutton.x_root; + ev.xbutton.y = ev.xbutton.y_root; XSendEvent(display, ev.xbutton.window, False, ButtonPressMask, &ev); XSetInputFocus(display, ev.xbutton.window, @@ -6723,6 +6725,8 @@ static void main_loop(void) } else { /* forward the release to the desktop window */ ev.xbutton.window = window.desktop; + ev.xbutton.x = ev.xbutton.x_root; + ev.xbutton.y = ev.xbutton.y_root; XSendEvent(display, ev.xbutton.window, False, ButtonReleaseMask, &ev); }