window: Kill the window on delete-entry

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
Quentin Glidic 2016-05-12 11:25:18 +02:00
parent 09437e3f0e
commit 3bd41b9a41
3 changed files with 9 additions and 2 deletions

View File

@ -712,10 +712,12 @@ A keybinding starting with `!` will act when all keys have been released.
### Window
Show a list of all the windows and allow switching between them.
Pressing the `delete-entry` binding (`shift-delete`) will kill the window.
### WindowCD
Shows a list of the windows on the current desktop and allows switching between them.
Pressing the `delete-entry` binding (`shift-delete`) will kill the window.
### Run

View File

@ -1166,10 +1166,10 @@ A keybinding starting with \fB!\fR will act when all keys have been released\.
.SH "Available Modi"
.
.SS "Window"
Show a list of all the windows and allow switching between them\.
Show a list of all the windows and allow switching between them\. Pressing the \fBdelete\-entry\fR binding (\fBshift\-delete\fR) will kill the window\.
.
.SS "WindowCD"
Shows a list of the windows on the current desktop and allows switching between them\.
Shows a list of the windows on the current desktop and allows switching between them\. Pressing the \fBdelete\-entry\fR binding (\fBshift\-delete\fR) will kill the window\.
.
.SS "Run"
Shows a list of executables in \fB$PATH\fR and can launch them (optional in a terminal)\. Pressing the \fBaccept\-custom\fR binding (\fBcontrol\-enter\fR or \fBshift\-enter\fR) will run the command in a terminal\.

View File

@ -590,6 +590,11 @@ static ModeMode window_mode_result ( Mode *sw, int mretv, G_GNUC_UNUSED char **i
xcb_flush ( xcb->connection );
}
}
else if ( ( mretv & ( MENU_ENTRY_DELETE ) ) == MENU_ENTRY_DELETE ) {
/* TODO: WM_DELETE_WINDOW support, see i3 */
xcb_destroy_window ( xcb->connection, rmpd->ids->array[selected_line] );
xcb_flush ( xcb->connection );
}
return retv;
}