From 9319c7b88fe1beb6b2065aa70b74a0f6cb604530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 7 Aug 2006 21:34:07 +0000 Subject: [PATCH] We don't add the Alt-w shortcut to modal windows anymore by default, thanks to Darkwyrm for pointing to this. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18450 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Window.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index 3db7251a4b..81bace21d9 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -2306,8 +2306,11 @@ BWindow::_InitData(BRect frame, const char* title, window_look look, // get sent to the application, and not one of our handlers fNoQuitShortcut = false; - if ((fFlags & B_NOT_CLOSABLE) == 0) + if ((fFlags & B_NOT_CLOSABLE) == 0 && !IsModal()) { + // Modal windows default to non-closable, but you can add the shortcut manually, + // if a different behaviour is wanted AddShortcut('W', B_COMMAND_KEY, new BMessage(B_QUIT_REQUESTED)); + } AddShortcut('X', B_COMMAND_KEY, new BMessage(B_CUT), NULL); AddShortcut('C', B_COMMAND_KEY, new BMessage(B_COPY), NULL);