]> code.delx.au - spectrwm/commitdiff
Fix segfault when loading "layout" with non-zero parameters.
authorReginald Kennedy <rk@rejii.com>
Thu, 20 Mar 2014 16:51:32 +0000 (00:51 +0800)
committerReginald Kennedy <rk@rejii.com>
Thu, 20 Mar 2014 17:48:06 +0000 (01:48 +0800)
This affected multi-region. stack() must be called after the region bars
are created.

Fix layout entry in man page.

Fixes #38

spectrwm.1
spectrwm.c

index 54b8123ec5cc86a2186ed8e2a7389cba85eb4647..c4f71699ebd1b2b293ee71fcee00a420529a83a7 100644 (file)
@@ -287,7 +287,7 @@ section below for a list of keyboard mapping files that have been provided
 for several keyboard layouts.
 .It Ic layout
 Select layout to use at start-of-day. Defined in the format
-ws[idx]:master_grow:master_add:stack_inc:layout:always_raise:stack_mode, e.g.
+ws[idx]:master_grow:master_add:stack_inc:always_raise:stack_mode, e.g.
 ws[2]:-4:0:1:0:horizontal sets worskspace 2 to the horizontal stack mode and
 shrinks the master area by 4 ticks and adds one window to the stack, while
 maintaining default floating window behavior.
index 2a809ad4a47e41d6b5bcc05618c4954bd66a8fe2..317d4b74587551294bc92d14e70941c3a932d099 100644 (file)
@@ -8311,32 +8311,26 @@ setlayout(const char *selector, const char *value, int flags)
                        ws[ws_id].cur_layout->l_config(&ws[ws_id],
                            mg >= 0 ?  SWM_ARG_ID_MASTERGROW :
                            SWM_ARG_ID_MASTERSHRINK);
-                       stack();
                }
                /* master add */
                for (x = 0; x < abs(ma); x++) {
                        ws[ws_id].cur_layout->l_config(&ws[ws_id],
                            ma >= 0 ?  SWM_ARG_ID_MASTERADD :
                            SWM_ARG_ID_MASTERDEL);
-                       stack();
                }
                /* stack inc */
                for (x = 0; x < abs(si); x++) {
                        ws[ws_id].cur_layout->l_config(&ws[ws_id],
                            si >= 0 ?  SWM_ARG_ID_STACKINC :
                            SWM_ARG_ID_STACKDEC);
-                       stack();
                }
                /* Apply flip */
                if (f) {
                        ws[ws_id].cur_layout->l_config(&ws[ws_id],
                            SWM_ARG_ID_FLIPLAYOUT);
-                       stack();
                }
        }
 
-       focus_flush();
-
        return (0);
 }