diff options
author | Quentin Glidic <sardemff7+git@sardemff7.net> | 2016-05-12 11:25:18 +0200 |
---|---|---|
committer | Quentin Glidic <sardemff7+git@sardemff7.net> | 2016-05-12 11:30:34 +0200 |
commit | 3bd41b9a419fcf01250d614d1e05c8a79576dcd8 (patch) | |
tree | 2b9fe2238775ab978858790ab9f16c0f94fbce9e | |
parent | 09437e3f0e22a0819cd841635f572dab88e644ad (diff) |
window: Kill the window on delete-entry
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
-rw-r--r-- | doc/rofi-manpage.markdown | 2 | ||||
-rw-r--r-- | doc/rofi.1 | 4 | ||||
-rw-r--r-- | source/dialogs/window.c | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/doc/rofi-manpage.markdown b/doc/rofi-manpage.markdown index 29c3cd39..31da0a27 100644 --- a/doc/rofi-manpage.markdown +++ b/doc/rofi-manpage.markdown @@ -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 @@ -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\. diff --git a/source/dialogs/window.c b/source/dialogs/window.c index 5b2fd249..2a9cedb0 100644 --- a/source/dialogs/window.c +++ b/source/dialogs/window.c @@ -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; } |