PATCH: winpos - Restore iconified window

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch is essentially the same as
http://www.winehq.com/hypermail/wine-patches/2002/08/0094.html

I'm not entirely sure the procedure here, but Duane Clark(the author)
said it wasn't accepted, so I cleaned out some of the 'cruft' from the
original, and here it is.

Below is his original text.  This patch also fixes the 'refresh' issues
with Pegasus Mail when it's 'Do not display in taskbar when minimized'
option is selected.

> A repost...
> 
> Fpga_editor would not restore correctly after being iconified. All
> that showed up was the border, without the contents being painted. And
> nothing would restore the window at that point. I could only Ctrl-C
> out of it.
> 
> Unlike most other apps, when iconified fpga_editor triggers
> X11DRV_ShowWindow() with a cmd==SW_HIDE, to hide the window. When
> X11DRV_MapNotify() was subsequently called, it did nothing because
> WS_VISIBLE was not set. This patch fixes that.
>
> I've been using this patch with everything I run for about 5 months
> now.
>
> Log message:
> Fix restoring of windows that were iconified with SW_HIDE.

Could you send me an email if this isn't acceptable?

Thanks,

Rick
Index: winpos.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/winpos.c,v
retrieving revision 1.60
diff -u -r1.60 winpos.c
--- winpos.c	14 Nov 2002 22:30:20 -0000	1.60
+++ winpos.c	20 Nov 2002 18:30:18 -0000
@@ -1345,9 +1345,8 @@
     WND *win;
 
     if (!(win = WIN_GetPtr( hwnd ))) return;
-
-    if ((win->dwStyle & WS_VISIBLE) &&
-        (win->dwStyle & WS_MINIMIZE) &&
+    
+    if ((win->dwStyle & WS_MINIMIZE) &&
         (win->dwExStyle & WS_EX_MANAGED))
     {
         int x, y;
@@ -1373,9 +1372,8 @@
         if (win->flags & WIN_RESTORE_MAX) style |= WS_MAXIMIZE;
         WIN_SetStyle( hwnd, style );
         WIN_ReleasePtr( win );
-
-        SendMessageA( hwnd, WM_SHOWWINDOW, SW_RESTORE, 0 );
-        SetWindowPos( hwnd, 0, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top,
+        SendMessageA( hwnd, WM_SHOWWINDOW, SW_RESTORE, SW_SHOW );
+	SetWindowPos( hwnd, 0, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top,
                       SWP_NOZORDER | SWP_WINE_NOHOSTMOVE );
     }
     else WIN_ReleasePtr( win );

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux