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>
This commit is contained in:
parent
dc1c3e49bb
commit
807f09c94f
|
@ -2680,6 +2680,12 @@ recompute_selection(struct terminal *terminal)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
terminal_minimize(struct terminal *terminal)
|
||||
{
|
||||
window_set_minimized(terminal->window);
|
||||
}
|
||||
|
||||
static void
|
||||
menu_func(void *data, struct input *input, int index)
|
||||
{
|
||||
|
@ -2698,6 +2704,9 @@ menu_func(void *data, struct input *input, int index)
|
|||
case 2:
|
||||
terminal_paste(terminal, input);
|
||||
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;
|
||||
static const char *entries[] = {
|
||||
"Open Terminal", "Copy", "Paste"
|
||||
"Open Terminal", "Copy", "Paste", "Minimize"
|
||||
};
|
||||
|
||||
input_get_position(input, &x, &y);
|
||||
|
|
Loading…
Reference in New Issue