summaryrefslogtreecommitdiff
path: root/hw/xwin/winshadgdi.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xwin/winshadgdi.c')
-rw-r--r--hw/xwin/winshadgdi.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c
index d2f72f20d..16b1969d7 100644
--- a/hw/xwin/winshadgdi.c
+++ b/hw/xwin/winshadgdi.c
@@ -27,7 +27,7 @@
*
* Authors: Harold L Hunt II
*/
-/* $XFree86: xc/programs/Xserver/hw/xwin/winshadgdi.c,v 1.22 2003/02/12 15:01:38 alanh Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xwin/winshadgdi.c,v 1.23 2003/07/29 21:25:18 dawes Exp $ */
#include "win.h"
@@ -216,7 +216,7 @@ winRedrawAllProcShadowGDI (HWND hwnd, LPARAM lParam)
if (GetClassName (hwnd, strClassName, 100))
{
- if(strcmp (WINDOW_CLASS_X, strClassName) == 0)
+ if (strncmp (WINDOW_CLASS_X, strClassName, strlen (WINDOW_CLASS_X)) == 0)
{
InvalidateRect (hwnd, NULL, FALSE);
UpdateWindow (hwnd);
@@ -323,6 +323,17 @@ winAllocateFBShadowGDI (ScreenPtr pScreen)
return FALSE;
}
+ /* Look for height weirdness */
+ if (dibsection.dsBmih.biHeight < 0)
+ {
+ /* FIXME: Figure out why biHeight is sometimes negative */
+ ErrorF ("winAllocateFBShadowGDI - WEIRDNESS - biHeight "
+ "still negative: %d\n"
+ "winAllocateFBShadowGDI - WEIRDNESS - Flipping biHeight sign\n",
+ dibsection.dsBmih.biHeight);
+ dibsection.dsBmih.biHeight = -dibsection.dsBmih.biHeight;
+ }
+
/* Set screeninfo stride */
pScreenInfo->dwStride = ((dibsection.dsBmih.biSizeImage
/ dibsection.dsBmih.biHeight)
@@ -515,6 +526,17 @@ winCloseScreenShadowGDI (int nIndex, ScreenPtr pScreen)
/* Free the screen DC */
ReleaseDC (pScreenPriv->hwndScreen, pScreenPriv->hdcScreen);
+ /* Delete tray icon, if we have one */
+ if (!pScreenInfo->fNoTrayIcon)
+ winDeleteNotifyIcon (pScreenPriv);
+
+ /* Free the exit confirmation dialog box, if it exists */
+ if (g_hDlgExit != NULL)
+ {
+ DestroyWindow (g_hDlgExit);
+ g_hDlgExit = NULL;
+ }
+
/* Kill our window */
if (pScreenPriv->hwndScreen)
{