openbsd-ports/x11/i3/patches/patch-src_manage_c
dcoppa fb144545be 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.
2013-01-11 09:44:12 +00:00

23 lines
1.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

$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.