From 1e651d5b4fad69b34d84bde88962f18a1f82ec5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 3 Jun 2007 20:33:56 +0000 Subject: [PATCH] Modal windows no longer install the 'Q' shortcut anymore. This fixes bug #1256. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21311 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Window.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index 85586cdb0e..20d87b78b6 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -2379,8 +2379,9 @@ BWindow::_InitData(BRect frame, const char* title, window_look look, fDefaultButton = NULL; // Shortcut 'Q' is handled in _HandleKeyDown() directly, as its message - // get sent to the application, and not one of our handlers - fNoQuitShortcut = false; + // get sent to the application, and not one of our handlers. + // It is only installed for non-modal windows, though. + fNoQuitShortcut = IsModal(); if ((fFlags & B_NOT_CLOSABLE) == 0 && !IsModal()) { // Modal windows default to non-closable, but you can add the shortcut manually,