[PATCH v3 0/1] MR3667: comctl32: Invalidate entire statusbar on wm_size.
Fixes a bug where the statusbar doesn't correctly paint when the parent window is resized. This can be seen in wine notepad. -- v3: comdlg32: Add parent folder button to IFileDialog https://gitlab.winehq.org/wine/wine/-/merge_requests/3667
From: Jacob Czekalla <jacobczekalla(a)gmail.com> --- dlls/comdlg32/itemdlg.c | 24 +++++++++++++++++++++--- include/commctrl.h | 1 + 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c index 1feb1deda00..caf9547ba93 100644 --- a/dlls/comdlg32/itemdlg.c +++ b/dlls/comdlg32/itemdlg.c @@ -40,6 +40,7 @@ #define IDC_NAV_TOOLBAR 200 #define IDC_NAVBACK 201 #define IDC_NAVFORWARD 202 +#define IDC_NAVUP 203 #include <initguid.h> /* This seems to be another version of IID_IFileDialogCustomize. If @@ -1895,7 +1896,7 @@ static void init_toolbar(FileDialogImpl *This, HWND hwnd) { HWND htoolbar; TBADDBITMAP tbab; - TBBUTTON button[2]; + TBBUTTON button[3]; int height; htoolbar = CreateWindowExW(0, TOOLBARCLASSNAMEW, NULL, TBSTYLE_FLAT | WS_CHILD | WS_VISIBLE, @@ -1905,6 +1906,8 @@ static void init_toolbar(FileDialogImpl *This, HWND hwnd) tbab.hInst = HINST_COMMCTRL; tbab.nID = IDB_HIST_LARGE_COLOR; SendMessageW(htoolbar, TB_ADDBITMAP, 0, (LPARAM)&tbab); + tbab.nID = IDB_VIEW_LARGE_COLOR; + SendMessageW(htoolbar, TB_ADDBITMAP, 0, (LPARAM)&tbab); button[0].iBitmap = HIST_BACK; button[0].idCommand = IDC_NAVBACK; @@ -1920,7 +1923,14 @@ static void init_toolbar(FileDialogImpl *This, HWND hwnd) button[1].dwData = 0; button[1].iString = 0; - SendMessageW(htoolbar, TB_ADDBUTTONSW, 2, (LPARAM)button); + button[2].iBitmap = HIST_UP; + button[2].idCommand = IDC_NAVUP; + button[2].fsState = TBSTATE_ENABLED; + button[2].fsStyle = BTNS_BUTTON; + button[2].dwData = 0; + button[2].iString = 0; + + SendMessageW(htoolbar, TB_ADDBUTTONSW, 3, (LPARAM)button); height = MulDiv(24, This->dpi_y, USER_DEFAULT_SCREEN_DPI); SendMessageW(htoolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(height, height)); SendMessageW(htoolbar, TB_AUTOSIZE, 0, 0); @@ -2034,7 +2044,7 @@ static LRESULT on_wm_initdialog(HWND hwnd, LPARAM lParam) if(This->set_filename && (hitem = GetDlgItem(This->dlg_hwnd, IDC_FILENAME)) ) SendMessageW(hitem, WM_SETTEXT, 0, (LPARAM)This->set_filename); - + if(This->hmenu_opendropdown) { HWND dropdown_hwnd; @@ -2211,6 +2221,13 @@ static LRESULT on_command_filetype(FileDialogImpl *This, WPARAM wparam, LPARAM l return FALSE; } +static LRESULT on_browse_up(FileDialogImpl *This) +{ + TRACE("%p\n", This); + IExplorerBrowser_BrowseToIDList(This->peb, NULL, SBSP_PARENT); + return FALSE; +} + static LRESULT on_wm_command(FileDialogImpl *This, WPARAM wparam, LPARAM lparam) { switch(LOWORD(wparam)) @@ -2221,6 +2238,7 @@ static LRESULT on_wm_command(FileDialogImpl *This, WPARAM wparam, LPARAM lparam) case IDC_NAVBACK: return on_browse_back(This); case IDC_NAVFORWARD: return on_browse_forward(This); case IDC_FILETYPE: return on_command_filetype(This, wparam, lparam); + case IDC_NAVUP: return on_browse_up(This); default: TRACE("Unknown command.\n"); } return FALSE; diff --git a/include/commctrl.h b/include/commctrl.h index a54de13d8b2..b4653fa8fad 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -1472,6 +1472,7 @@ typedef struct tagTBADDBITMAP { #define HIST_FAVORITES 2 #define HIST_ADDTOFAVORITES 3 #define HIST_VIEWTREE 4 +#define HIST_UP 13 typedef struct tagTBSAVEPARAMSA { HKEY hkr; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3667
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=136857 Your paranoid android. === debian11 (build log) === error: patch failed: dlls/comdlg32/itemdlg.c:40 Task: Patch failed to apply === debian11b (build log) === error: patch failed: dlls/comdlg32/itemdlg.c:40 Task: Patch failed to apply
participants (3)
-
Jacob Czekalla -
Jacob Czekalla (@Maaka00524) -
Marvin