From 321c3e93b1efebedae9a7dc44fd222ff8c8ab93b Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Mon, 15 May 2006 21:22:18 +0000 Subject: [PATCH] #326273 r=mkaply, sr=mkaply (OS/2 only) OS/2 changes from threading checkin - build bustage After this change, OS/2 appears to work... git-svn-id: svn://10.0.0.236/trunk@196599 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/os2/nsAppShell.cpp | 10 +++++----- mozilla/widget/src/os2/nsWidgetFactory.cpp | 10 ++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/mozilla/widget/src/os2/nsAppShell.cpp b/mozilla/widget/src/os2/nsAppShell.cpp index 306149ccb2f..24ea6a9d898 100644 --- a/mozilla/widget/src/os2/nsAppShell.cpp +++ b/mozilla/widget/src/os2/nsAppShell.cpp @@ -41,7 +41,7 @@ #include "nsToolkit.h" #include "nsThreadUtils.h" -static UINT sMsgId = WM_USER + 0x77; +static UINT sMsgId; //------------------------------------------------------------------------- @@ -69,10 +69,11 @@ nsAppShell::~nsAppShell() nsresult nsAppShell::Init() { -// if (!sMsgId) -// sMsgId = RegisterWindowMessage("nsAppShell:EventID"); + if (!sMsgId) { + sMsgId = WinAddAtom( WinQuerySystemAtomTable(), "nsAppShell:EventID"); + WinRegisterClass((HAB)0, "nsAppShell:EventWindowClass", EventWindowProc, NULL, 0); + } - WinRegisterClass((HAB)0, "nsAppShell:EventWindowClass", EventWindowProc, NULL, 0); mEventWnd = ::WinCreateWindow(HWND_DESKTOP, "nsAppShell:EventWindowClass", "nsAppShell:EventWindow", @@ -82,7 +83,6 @@ nsAppShell::Init() HWND_DESKTOP, HWND_BOTTOM, 0, 0, 0); -printf("hwnd = %d\n", mEventWnd); NS_ENSURE_STATE(mEventWnd); return nsBaseAppShell::Init(); diff --git a/mozilla/widget/src/os2/nsWidgetFactory.cpp b/mozilla/widget/src/os2/nsWidgetFactory.cpp index 8e13eeed77b..34e3378190f 100644 --- a/mozilla/widget/src/os2/nsWidgetFactory.cpp +++ b/mozilla/widget/src/os2/nsWidgetFactory.cpp @@ -63,6 +63,7 @@ // class definition headers #include "nsAppShell.h" +#include "nsAppShellSingleton.h" #include "nsBidiKeyboard.h" #include "nsWindow.h" #include "nsDragService.h" @@ -94,7 +95,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindow) NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard) NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper) NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePicker) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppShell) NS_GENERIC_FACTORY_CONSTRUCTOR(nsFrameWindow) NS_GENERIC_FACTORY_CONSTRUCTOR(nsLookAndFeel) NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound) @@ -200,8 +200,10 @@ nsWidgetOS2ModuleDtor(nsIModule *self) { nsWindow::ReleaseGlobals(); nsFilePicker::ReleaseGlobals(); + nsAppShellShutdown(self); } -NS_IMPL_NSGETMODULE_WITH_DTOR(nsWidgetOS2Module, - components, - nsWidgetOS2ModuleDtor) +NS_IMPL_NSGETMODULE_WITH_CTOR_DTOR(nsWidgetOS2Module, + components, + nsAppShellInit, + nsWidgetOS2ModuleDtor)