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>
dev
Pekka Paalanen 10 years ago
parent dc1c3e49bb
commit 807f09c94f
  1. 11
      clients/terminal.c

@ -2680,6 +2680,12 @@ recompute_selection(struct terminal *terminal)
return 1; return 1;
} }
static void
terminal_minimize(struct terminal *terminal)
{
window_set_minimized(terminal->window);
}
static void static void
menu_func(void *data, struct input *input, int index) menu_func(void *data, struct input *input, int index)
{ {
@ -2698,6 +2704,9 @@ menu_func(void *data, struct input *input, int index)
case 2: case 2:
terminal_paste(terminal, input); terminal_paste(terminal, input);
break; break;
case 3:
terminal_minimize(terminal);
break;
} }
} }
@ -2706,7 +2715,7 @@ show_menu(struct terminal *terminal, struct input *input, uint32_t time)
{ {
int32_t x, y; int32_t x, y;
static const char *entries[] = { static const char *entries[] = {
"Open Terminal", "Copy", "Paste" "Open Terminal", "Copy", "Paste", "Minimize"
}; };
input_get_position(input, &x, &y); input_get_position(input, &x, &y);

Loading…
Cancel
Save