forward ButtonRelease too
authorPhilip Kovacs <pkovacs@users.sourceforge.net>
Wed, 8 Mar 2006 23:02:28 +0000 (23:02 +0000)
committerPhilip Kovacs <pkovacs@users.sourceforge.net>
Wed, 8 Mar 2006 23:02:28 +0000 (23:02 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@569 7f574dfc-610e-0410-a909-a81674777703

src/conky.c
src/x11.c

index b9cc06a..c3a5089 100644 (file)
@@ -4581,6 +4581,16 @@ static void main_loop()
                                    XSendEvent(display, ev.xbutton.window, False, ButtonPressMask, &ev);
                                }
                                break;
+
+                       case ButtonRelease:
+                                if (own_window)
+                                {
+                                    /* forward the release to the desktop window */
+                                    ev.xbutton.window = window.desktop;
+                                    XSendEvent(display, ev.xbutton.window, False, ButtonReleaseMask, &ev);
+                                }
+                                break;
+
 #endif
 
                        default:
index 93bc1f4..24f1d5f 100644 (file)
--- a/src/x11.c
+++ b/src/x11.c
@@ -208,7 +208,7 @@ void init_window(int own_window, int w, int h, int set_trans, int back_colour, c
                         * events are now explicitly forwarded to the desktop window. */
                        XSetWindowAttributes attrs = {
                                ParentRelative,0L,0,0L,0,0,Always,0L,0L,False,
-                               StructureNotifyMask|ExposureMask|ButtonPressMask,
+                               StructureNotifyMask|ExposureMask|ButtonPressMask|ButtonReleaseMask,
                                0L,False,0,0 };
 
                        XClassHint classHint;
@@ -454,7 +454,8 @@ void init_window(int own_window, int w, int h, int set_trans, int back_colour, c
        XSelectInput(display, window.window, ExposureMask
 #ifdef OWN_WINDOW
                     | (own_window
-                       ? (StructureNotifyMask | PropertyChangeMask | ButtonPressMask) : 0)
+                       ? (StructureNotifyMask | PropertyChangeMask | 
+                          ButtonPressMask | ButtonReleaseMask) : 0)
 #endif
            );
 }