swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit a897e14068a184af1b41cc45ed2f2cece4c9a850
parent 3fd35d6378c1d500c5de30e9ec9e72b951f29074
Author: Michael Forney <mforney@mforney.org>
Date:   Fri, 29 Apr 2016 22:42:24 -0700

Don't change pointer focus when mouse buttons are pressed

Diffstat:
Mlibswc/compositor.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/libswc/compositor.c b/libswc/compositor.c @@ -689,6 +689,10 @@ handle_motion(struct pointer_handler *handler, uint32_t time, wl_fixed_t fx, wl_ int32_t x = wl_fixed_to_int(fx), y = wl_fixed_to_int(fy); struct swc_rectangle *geom; + /* If buttons are pressed, don't change pointer focus. */ + if (swc.seat->pointer->buttons.size > 0) + return false; + wl_list_for_each (view, &compositor.views, link) { if (!view->visible) continue;