Bugfix for a segfault when creating assigned and to be moved windows

(upstream git commit 138e04fd4d50e5f80d445761de86c0c9617916b3)

While here, do not mention '--shmlog-size' in the i3 manpage: we
don't have this option due to lack of POSIX shared memory support.
This commit is contained in:
dcoppa 2013-01-11 09:44:12 +00:00
parent de1a79ce07
commit fb144545be
3 changed files with 43 additions and 9 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.56 2013/01/10 08:20:52 dcoppa Exp $
# $OpenBSD: Makefile,v 1.57 2013/01/11 09:44:12 dcoppa Exp $
COMMENT = improved dynamic tiling window manager
DISTNAME = i3-4.4
REVISION = 2
REVISION = 3
CATEGORIES = x11
EXTRACT_SUFX = .tar.bz2

View File

@ -1,7 +1,19 @@
$OpenBSD: patch-man_i3_1,v 1.4 2012/09/21 17:16:14 dcoppa Exp $
--- man/i3.1.orig Wed Sep 19 18:08:20 2012
+++ man/i3.1 Thu Sep 20 14:12:10 2012
@@ -240,7 +240,7 @@ When starting, i3 looks for configuration files in the
$OpenBSD: patch-man_i3_1,v 1.5 2013/01/11 09:44:12 dcoppa Exp $
--- man/i3.1.orig Wed Dec 12 00:08:28 2012
+++ man/i3.1 Fri Jan 11 10:05:35 2013
@@ -75,11 +75,6 @@ Use Xinerama instead of RandR\&. This option should on
.RS 4
Retrieve the i3 IPC socket path from X11, print it, then exit\&.
.RE
-.PP
-\-\-shmlog\-size <limit>
-.RS 4
-Limits the size of the i3 SHM log to <limit> bytes\&. Setting this to 0 disables SHM logging entirely\&. The default is 0 bytes\&.
-.RE
.SH "DESCRIPTION"
.SS "INTRODUCTION"
.sp
@@ -240,7 +235,7 @@ When starting, i3 looks for configuration files in the
.sp -1
.IP " 2." 4.2
.\}
@ -10,7 +22,7 @@ $OpenBSD: patch-man_i3_1,v 1.4 2012/09/21 17:16:14 dcoppa Exp $
.RE
.sp
.RS 4
@@ -262,7 +262,7 @@ When starting, i3 looks for configuration files in the
@@ -262,7 +257,7 @@ When starting, i3 looks for configuration files in the
.sp -1
.IP " 4." 4.2
.\}
@ -19,7 +31,7 @@ $OpenBSD: patch-man_i3_1,v 1.4 2012/09/21 17:16:14 dcoppa Exp $
.RE
.sp
You can specify a custom path using the \-c option\&.
@@ -282,13 +282,13 @@ font \-misc\-fixed\-medium\-r\-normal\-\-13\-120\-75\-
@@ -282,13 +277,13 @@ font \-misc\-fixed\-medium\-r\-normal\-\-13\-120\-75\-
floating_modifier Mod1
# start a terminal
@ -35,7 +47,7 @@ $OpenBSD: patch-man_i3_1,v 1.4 2012/09/21 17:16:14 dcoppa Exp $
# change focus
bindsym Mod1+j focus left
@@ -407,7 +407,7 @@ ulimit \-c unlimited
@@ -407,7 +402,7 @@ ulimit \-c unlimited
# Start i3 and log to ~/\&.i3/logfile
echo "Starting at $(date)" >> ~/\&.i3/logfile

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-src_manage_c,v 1.11 2013/01/11 09:44:12 dcoppa Exp $
From 138e04fd4d50e5f80d445761de86c0c9617916b3 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael@stapelberg.de>
Date: Tue, 01 Jan 2013 15:31:08 +0000
Subject: Bugfix: Fix for_window moving of assigned windows (Thanks bafain)
This fixes a segfault when creating assigned and to be moved windows
--- src/manage.c.orig Wed Dec 12 00:08:17 2012
+++ src/manage.c Fri Jan 11 09:58:48 2013
@@ -402,6 +402,10 @@ void manage_window(xcb_window_t window, xcb_get_window
/* Check if any assignments match */
run_assignments(cwindow);
+ /* 'ws' may be invalid because of the assignments, e.g. when the user uses
+ * "move window to workspace 1", but had it assigned to workspace 2. */
+ ws = con_get_workspace(nc);
+
/* If this window was put onto an invisible workspace (via assignments), we
* render this workspace. It wouldnt be rendered in our normal code path
* because only the visible workspaces get rendered.