From 59aa5317e6280e58f9543b60e1f3f0660eb86d0e Mon Sep 17 00:00:00 2001 From: "sergei_d%fi.tartu.ee" Date: Thu, 10 Feb 2005 18:55:32 +0000 Subject: [PATCH] *** empty log message *** --- widget/src/beos/nsWindow.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/widget/src/beos/nsWindow.cpp b/widget/src/beos/nsWindow.cpp index a6f7dd5f635..0417efa7ab5 100644 --- a/widget/src/beos/nsWindow.cpp +++ b/widget/src/beos/nsWindow.cpp @@ -84,8 +84,6 @@ static NS_DEFINE_IID(kIWidgetIID, NS_IWIDGET_IID); static nsIRollupListener * gRollupListener = nsnull; static nsIWidget * gRollupWidget = nsnull; static PRBool gRollupConsumeRollupEvent = PR_FALSE; -// Preserve Mozilla's shortcut for closing -static PRBool gGotQuitShortcut = PR_FALSE; // Tracking last activated BWindow static BWindow * gLastActiveWindow = NULL; @@ -1726,11 +1724,6 @@ bool nsWindow::CallMethod(MethodInfo *info) case nsWindow::CLOSEWINDOW : NS_ASSERTION(info->nArgs == 0, "Wrong number of arguments to CallMethod"); - if (gGotQuitShortcut == PR_TRUE) - { - gGotQuitShortcut = PR_FALSE; - return false; - } if (eWindowType_popup != mWindowType && eWindowType_child != mWindowType) DealWithPopups(CLOSEWINDOW,nsPoint(0,0)); DispatchStandardEvent(NS_DESTROY); @@ -2162,10 +2155,6 @@ PRBool nsWindow::OnKeyDown(PRUint32 aEventType, const char *bytes, mIsAltDown = ((mod & B_COMMAND_KEY) && !(mod & B_RIGHT_OPTION_KEY))? PR_TRUE : PR_FALSE; mIsMetaDown = (mod & B_LEFT_OPTION_KEY) ? PR_TRUE : PR_FALSE; bool IsNumLocked = ((mod & B_NUM_LOCK) != 0); - if(B_COMMAND_KEY && (rawcode == 'w' || rawcode == 'W')) - gGotQuitShortcut = PR_TRUE; - else - gGotQuitShortcut = PR_FALSE; aTranslatedKeyCode = TranslateBeOSKeyCode(bekeycode, IsNumLocked); @@ -2629,8 +2618,11 @@ void nsWindowBeOS::DispatchMessage(BMessage *msg, BHandler *handler) if (view) view->KeyDown(bytes.String(), bytes.Length()); } + if(strcmp(bytes.String(),"w") && strcmp(bytes.String(),"W")) + BWindow::DispatchMessage(msg, handler); } - BWindow::DispatchMessage(msg, handler); + else + BWindow::DispatchMessage(msg, handler); } //This method serves single purpose here - allows Mozilla to save current window position,