terminal: add "Minimize" to context menu
Terminal is a nice app that support fullscreening. To be able to test
minimizing of a fullscreen app, add an entry to the context menu. That
is the only way to minimize, as window frame is not there when
fullscreen.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
diff --git a/clients/terminal.c b/clients/terminal.c
index 3e89bdf..739d1d4 100644
--- a/clients/terminal.c
+++ b/clients/terminal.c
@@ -2681,6 +2681,12 @@
}
static void
+terminal_minimize(struct terminal *terminal)
+{
+ window_set_minimized(terminal->window);
+}
+
+static void
menu_func(void *data, struct input *input, int index)
{
struct window *window = data;
@@ -2698,6 +2704,9 @@
case 2:
terminal_paste(terminal, input);
break;
+ case 3:
+ terminal_minimize(terminal);
+ break;
}
}
@@ -2706,7 +2715,7 @@
{
int32_t x, y;
static const char *entries[] = {
- "Open Terminal", "Copy", "Paste"
+ "Open Terminal", "Copy", "Paste", "Minimize"
};
input_get_position(input, &x, &y);