From e11c83a4a5ee9dab83755c8369edae16f86a7037 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 17 Aug 2024 09:41:51 +0100 Subject: [PATCH] Windows: add 'Copy' and 'Paste' to the window's system menu. These actions were already available in the Ctrl + right-click context menu (or just right-click, if you shifted the mouse-button actions into Windows mode). But a user might not know about Ctrl + right-click, and only know to look in the system menu. So it makes them easier to find if they're in that menu too. Also, I don't really see any reason why the two menus _should_ be different. --- windows/window.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/windows/window.c b/windows/window.c index 69cc3d3d..d5717138 100644 --- a/windows/window.c +++ b/windows/window.c @@ -700,10 +700,12 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) wgs->popup_menus[SYSMENU].menu = GetSystemMenu(wgs->term_hwnd, false); wgs->popup_menus[CTXMENU].menu = CreatePopupMenu(); - AppendMenu(wgs->popup_menus[CTXMENU].menu, MF_ENABLED, - IDM_COPY, "&Copy"); - AppendMenu(wgs->popup_menus[CTXMENU].menu, MF_ENABLED, - IDM_PASTE, "&Paste"); + + for (j = 0; j < lenof(wgs->popup_menus); j++) { + m = wgs->popup_menus[j].menu; + AppendMenu(m, MF_ENABLED, IDM_COPY, "&Copy"); + AppendMenu(m, MF_ENABLED, IDM_PASTE, "&Paste"); + } wgs->savedsess_menu = CreateMenu(); get_sesslist(&sesslist, true);