static char *crash_text[] = {
"i3 just crashed.",
"To debug this problem, either attach gdb now",
- "or press 'e' to exit and get a core-dump.",
- "If you want to keep your session,",
- "press 'r' to restart i3 in-place."
+ "or press",
+ "- 'e' to exit and get a core-dump,",
+ "- 'r' to restart i3 in-place or",
+ "- 'f' to forget the current layout and restart"
};
-static int crash_text_longest = 1;
+static int crash_text_longest = 5;
/*
* Draw the window containing the info text
}
if (sym == 'r')
- i3_restart();
+ i3_restart(false);
+
+ if (sym == 'f')
+ i3_restart(true);
return 1;
}
* appends -a to argument list to disable autostart
*
*/
-void i3_restart() {
- char *restart_filename = store_restart_layout();
+void i3_restart(bool forget_layout) {
+ char *restart_filename = forget_layout ? NULL : store_restart_layout();
+
restore_geometry();
ipc_shutdown();