]> git.lizzy.rs Git - bspwm.git/blobdiff - messages.c
Automatically check for sockets without screen name.
[bspwm.git] / messages.c
index 74f45ad2aaf85d91cbb3c493ab9e1fdf86bd5beb..d859a3f8d91fba99ebee71fb055f92717c200397 100644 (file)
@@ -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 <errno.h>
@@ -991,6 +987,7 @@ int set_setting(coordinates_t loc, char *name, char *value)
                        return MSG_FAILURE;
                SETBOOL(borderless_monocle)
                SETBOOL(gapless_monocle)
+               SETBOOL(pointer_follows_focus)
                SETBOOL(pointer_follows_monitor)
                SETBOOL(apply_floating_atom)
                SETBOOL(auto_alternate)
@@ -998,10 +995,17 @@ int set_setting(coordinates_t loc, char *name, char *value)
                SETBOOL(history_aware_focus)
                SETBOOL(focus_by_distance)
                SETBOOL(ignore_ewmh_focus)
-               SETBOOL(remove_disabled_monitors)
-               SETBOOL(remove_unplugged_monitors)
-               SETBOOL(merge_overlapping_monitors)
 #undef SETBOOL
+#define SETMONBOOL(s) \
+       } else if (streq(#s, name)) { \
+               if (!parse_bool(value, &s)) \
+                       return MSG_FAILURE; \
+               if (s) \
+                       update_monitors();
+               SETMONBOOL(remove_disabled_monitors)
+               SETMONBOOL(remove_unplugged_monitors)
+               SETMONBOOL(merge_overlapping_monitors)
+#undef SETMONBOOL
        } else {
                return MSG_FAILURE;
        }
@@ -1067,6 +1071,7 @@ int get_setting(coordinates_t loc, char *name, FILE* rsp)
        GETBOOL(borderless_monocle)
        GETBOOL(gapless_monocle)
        GETBOOL(focus_follows_pointer)
+       GETBOOL(pointer_follows_focus)
        GETBOOL(pointer_follows_monitor)
        GETBOOL(apply_floating_atom)
        GETBOOL(auto_alternate)