]> git.lizzy.rs Git - bspwm.git/blobdiff - events.c
Fix code block formatting
[bspwm.git] / events.c
index 2c9cacb7f3b40a1dbefe253608e4e7db48ea6414..1e8c8292a5da29d9285b55e36ce6e55af79c8848 100644 (file)
--- a/events.c
+++ b/events.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2014, Bastien Dejean
+/* Copyright (c) 2012, Bastien Dejean
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are those
- * of the authors and should not be interpreted as representing official policies,
- * either expressed or implied, of the FreeBSD Project.
  */
 
 #include <stdlib.h>
@@ -351,15 +347,18 @@ void motion_notify(xcb_generic_event_t *evt)
        xcb_point_t pt = {e->root_x, e->root_y};
        query_pointer(&win, NULL);
 
-       bool backup = pointer_follows_monitor;
+       bool pfm_backup = pointer_follows_monitor;
+       bool pff_backup = pointer_follows_focus;
        auto_raise = false;
        pointer_follows_monitor = false;
+       pointer_follows_focus = false;
        if (!window_focus(win)) {
                monitor_t *m = monitor_from_point(pt);
                if (m != NULL && m != mon)
                        focus_node(m, m->desk, m->desk->focus);
        }
-       pointer_follows_monitor = backup;
+       pointer_follows_monitor = pfm_backup;
+       pointer_follows_focus = pff_backup;
        auto_raise = true;
 }