Fix toggle splith/splitv from upstream
ok dcoppa@ (maintainer)
This commit is contained in:
parent
c49841f46d
commit
0e2c1d50a8
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.110 2017/10/21 19:22:04 tb Exp $
|
||||
# $OpenBSD: Makefile,v 1.111 2017/11/08 21:14:27 danj Exp $
|
||||
|
||||
COMMENT = improved dynamic tiling window manager
|
||||
|
||||
DISTNAME = i3-4.14.1
|
||||
REVISION = 0
|
||||
REVISION = 1
|
||||
CATEGORIES = x11
|
||||
|
||||
EXTRACT_SUFX = .tar.bz2
|
||||
|
28
x11/i3/patches/patch-src_con_c
Normal file
28
x11/i3/patches/patch-src_con_c
Normal file
@ -0,0 +1,28 @@
|
||||
$OpenBSD: patch-src_con_c,v 1.20 2017/11/08 21:14:27 danj Exp $
|
||||
|
||||
backport https://github.com/i3/i3/pull/2849/commits/c028f0cb173ebc4c7033c758c7f942adfbc224af
|
||||
and https://github.com/i3/i3/pull/2849/commits/26014ca1a22c1b862c782f4dfa3d40a5ab629627
|
||||
|
||||
Index: src/con.c
|
||||
--- src/con.c.orig
|
||||
+++ src/con.c
|
||||
@@ -1735,7 +1756,7 @@ void con_set_layout(Con *con, layout_t layout) {
|
||||
con->workspace_layout = ws_layout;
|
||||
DLOG("Setting layout to %d\n", layout);
|
||||
con->layout = layout;
|
||||
- } else if (layout == L_STACKED || layout == L_TABBED) {
|
||||
+ } else if (layout == L_STACKED || layout == L_TABBED || layout == L_SPLITV || layout == L_SPLITH) {
|
||||
DLOG("Creating new split container\n");
|
||||
/* 1: create a new split container */
|
||||
Con *new = con_new(NULL, NULL);
|
||||
@@ -1827,6 +1848,10 @@ void con_toggle_layout(Con *con, const char *toggle_mo
|
||||
* change to the opposite split layout. */
|
||||
if (parent->layout != L_SPLITH && parent->layout != L_SPLITV) {
|
||||
layout = parent->last_split_layout;
|
||||
+ /* In case last_split_layout was not initialized… */
|
||||
+ if (layout == L_DEFAULT) {
|
||||
+ layout = L_SPLITH;
|
||||
+ }
|
||||
} else {
|
||||
layout = (parent->layout == L_SPLITH) ? L_SPLITV : L_SPLITH;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user