From 07851890e79bacdb2a12ea87adac235dfcca00d6 Mon Sep 17 00:00:00 2001 From: "kmcclusk%netscape.com" Date: Wed, 6 Oct 1999 21:54:49 +0000 Subject: [PATCH] r=rods; bug=15478; Added WS_EX_TOOLWINDOW extended style for popup windows to prevent popups from creating empty task bar buttons. bug=6061; NS_DISPLAYCHANGE event is now generated when the display depth changes on WIN32. --- widget/public/nsGUIEvent.h | 3 +++ widget/src/windows/nsWindow.cpp | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/widget/public/nsGUIEvent.h b/widget/public/nsGUIEvent.h index 6cde82a18fb..e940d7518fa 100644 --- a/widget/public/nsGUIEvent.h +++ b/widget/public/nsGUIEvent.h @@ -266,6 +266,9 @@ enum nsDragDropEventStatus { // directly to a mouse click or a key press. #define NS_CONTROL_CHANGE (NS_WINDOW_START + 39) +// Indicates the display has changed depth +#define NS_DISPLAYCHANGED (NS_WINDOW_START + 40) + #define NS_MOUSE_MESSAGE_START 300 #define NS_MOUSE_MOVE (NS_MOUSE_MESSAGE_START) diff --git a/widget/src/windows/nsWindow.cpp b/widget/src/windows/nsWindow.cpp index 308fe84cb91..35c195423af 100644 --- a/widget/src/windows/nsWindow.cpp +++ b/widget/src/windows/nsWindow.cpp @@ -624,6 +624,9 @@ nsresult nsWindow::StandardWindowCreate(nsIWidget *aParent, mBorderlessParent = parent; // Don't set the parent of a popup window. parent = NULL; + // WS_EX_TOOLWINDOW prevents a button from being placed on + // the taskbar for the popup window. + extendedStyle |= WS_EX_TOOLWINDOW; } if (aInitData->mBorderStyle == eBorderStyle_default) { @@ -2358,6 +2361,10 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT } break; + case WM_DISPLAYCHANGE: + DispatchStandardEvent(NS_DISPLAYCHANGED); + break; + case WM_NOTIFY: // TAB change