[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: filedlg95.c patch
From:       "Juergen Schmied" <juergen.schmied () debitel ! net>
Date:       2000-05-31 20:01:50
[Download RAW message or body]

I noticed modal windows are often not modal (-managed).
If running notepad and open a file I can click on the main window
and it gets the focus.

Maybe there is the real problem? 

juergen


> The common dialogs had a problem where they were not always being brought
> to the top when instantiated. This patch fixes that:
> 
> --- /devel/corelwineVirgin/corelwine/dlls/commdlg/filedlg95.c	Mon May 15
> 10:47:37 2000
> +++ filedlg95.c	Wed May 31 15:27:44 2000
> @@ -1005,13 +1005,16 @@
>    };
>    TBADDBITMAP tba = { HINST_COMMCTRL, IDB_VIEW_SMALL_COLOR };
>    RECT rectTB;
> -
> +
>    char lpstrSave[100], lpstrSaveIn[100];
> 
>    FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *)
> GetPropA(hwnd,FileOpenDlgInfosStr);
> 
>    TRACE("%p\n", fodInfos);
> 
> +  SetForegroundWindow(GetParent(GetParent(hwnd)));
> +  BringWindowToTop(GetParent(GetParent(hwnd)));
> +
>    /* Get the hwnd of the controls */
>    fodInfos->DlgInfos.hwndFileName = GetDlgItem(hwnd,IDC_FILENAME);
>    fodInfos->DlgInfos.hwndFileTypeCB = GetDlgItem(hwnd,IDC_FILETYPE);
> @@ -1116,6 +1119,7 @@
>            ERR("The required IDs (%04x ,%04x) are not found!\n", IDS_SAVE,
> IDS_SAVEIN);
>        }
>    }
> +
>    return 0;
>  }
> 
> 
> 
> 
> --- /devel/corelwineVirgin/corelwine/dlls/commdlg/filedlg.c	Mon May 15
> 10:47:36 2000
> +++ filedlg.c	Wed May 31 10:13:56 2000
> @@ -742,6 +742,11 @@
>    LPOPENFILENAME16 lpofn;
>    char tmpstr[512];
>    LPSTR pstr, old_pstr;
> +
> +  SetForegroundWindow(GetParent(GetParent(hWnd)));
> +  BringWindowToTop(GetParent(GetParent(hWnd)));
> +
> +
>    SetPropA(hWnd,OFN_PROP,lParam);
>    lpofn = (LPOPENFILENAME16)PTR_SEG_TO_LIN(lParam);
>    if (lpofn->lpstrTitle) SetWindowText16( hWnd, lpofn->lpstrTitle );
> @@ -823,6 +828,7 @@
>       return
> (BOOL16)FILEDLG_CallWindowProc(lpofn,hWnd,WM_INITDIALOG,wParam,lParam );
>    else
>       return TRUE;
> +
>  }
> 
>  /***********************************************************************
> 
> ___________________________________________________________________________
> Michael Cardenas
> http://www.fiu.edu/~mcarde02
> http://www.deneba.com/linux
> 
> 
> 
> 



---
juergen.schmied@debitel.net

... from sunny Berlin

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic