Bugfix: ipc window event crash with no window
Patch status: merged
Patch by Tony Crisci
Long description:
The log message at the top of ipc_send_window_event would segfault when no xcb window is present, such as for a split container. The log now shows the con id which is more relevant anyway.
To apply this patch, use:
curl http://cr.i3wm.org/patch/520/raw.patch | git am
b/src/ipc.c
17 |
@@ -1067,7 +1067,8 @@ void ipc_send_workspace_focus_event(Con *current, Con *old) { |
18 |
* also the window container, in "container". |
19 |
*/ |
20 |
void ipc_send_window_event(const char *property, Con *con) { |
21 |
- DLOG("Issue IPC window %s event for X11 window 0x%08x\n", property, con->window->id); |
22 |
+ DLOG("Issue IPC window %s event (con = %p, window = 0x%08x)\n", |
23 |
+ property, con, (con->window ? con->window->id : XCB_WINDOW_NONE)); |
24 |
|
25 |
setlocale(LC_NUMERIC, "C"); |
26 |
yajl_gen gen = ygenalloc(); |