diff --git a/deps/wxWidgets/0001-wxWidget-fix.patch b/deps/wxWidgets/0001-wxWidget-fix.patch index 6bf276b7c0..b29f3d88c7 100644 --- a/deps/wxWidgets/0001-wxWidget-fix.patch +++ b/deps/wxWidgets/0001-wxWidget-fix.patch @@ -1,60 +1,83 @@ diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake -index 0bc4f934b9..479431a69c 100644 +index 1931277f11c8..ad224512211e 100644 --- a/build/cmake/init.cmake +++ b/build/cmake/init.cmake -@@ -413,7 +413,11 @@ if(wxUSE_GUI) - else() - find_package(OpenGL) +@@ -418,13 +418,17 @@ if(wxUSE_GUI) + endforeach() + endif() if(WXGTK3 AND OpenGL_EGL_FOUND AND wxUSE_GLCANVAS_EGL) +- if(TARGET OpenGL::EGL) +- set(OPENGL_LIBRARIES OpenGL::EGL ${OPENGL_LIBRARIES}) + if(UNIX AND NOT APPLE) -+ set(OPENGL_LIBRARIES OpenGL EGL) -+ else() - set(OPENGL_LIBRARIES OpenGL::OpenGL OpenGL::EGL) -+ endif() ++ set(OPENGL_LIBRARIES OpenGL EGL) + else() +- # It's possible for OpenGL::EGL not to be set even when EGL +- # is found, at least under Cygwin (see #23673), so use the +- # library directly like this to avoid link problems. +- set(OPENGL_LIBRARIES ${OPENGL_egl_LIBRARY} ${OPENGL_LIBRARIES}) ++ if(TARGET OpenGL::EGL) ++ set(OPENGL_LIBRARIES OpenGL::EGL ${OPENGL_LIBRARIES}) ++ else() ++ # It's possible for OpenGL::EGL not to be set even when EGL ++ # is found, at least under Cygwin (see #23673), so use the ++ # library directly like this to avoid link problems. ++ set(OPENGL_LIBRARIES ${OPENGL_egl_LIBRARY} ${OPENGL_LIBRARIES}) ++ endif() + endif() + set(OPENGL_INCLUDE_DIR ${OPENGL_INCLUDE_DIR} ${OPENGL_EGL_INCLUDE_DIRS}) find_package(WAYLANDEGL) - if(WAYLANDEGL_FOUND AND wxHAVE_GDK_WAYLAND) - list(APPEND OPENGL_LIBRARIES ${WAYLANDEGL_LIBRARIES}) diff --git a/build/cmake/lib/webview/CMakeLists.txt b/build/cmake/lib/webview/CMakeLists.txt -index cc3298ff33..8adbeaea4f 100644 +index 47ce3b3af4c6..4e175275459c 100644 --- a/build/cmake/lib/webview/CMakeLists.txt +++ b/build/cmake/lib/webview/CMakeLists.txt -@@ -56,7 +56,7 @@ if(APPLE) +@@ -46,9 +46,9 @@ if(APPLE) elseif(WXMSW) if(wxUSE_WEBVIEW_EDGE) # Update the following variables if updating WebView2 SDK -- set(WEBVIEW2_VERSION "1.0.705.50") +- set(WEBVIEW2_VERSION "1.0.864.35") + set(WEBVIEW2_VERSION "1.0.1418.22") set(WEBVIEW2_URL "https://www.nuget.org/api/v2/package/Microsoft.Web.WebView2/${WEBVIEW2_VERSION}") -- set(WEBVIEW2_SHA256 "6a34bb553e18cfac7297b4031f3eac2558e439f8d16a45945c22945ac404105d") +- set(WEBVIEW2_SHA256 "542b271732b9d5435c33180eb4d5ea65fcb10aaf39f4d4be5953abe8d4bd1046") + set(WEBVIEW2_SHA256 "51d2ef56196e2a9d768a6843385bcb9c6baf9ed34b2603ddb074fb4995543a99") + set(WEBVIEW2_DEFAULT_PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/packages/Microsoft.Web.WebView2.${WEBVIEW2_VERSION}") + diff --git a/include/wx/fontutil.h b/include/wx/fontutil.h -index 09ad8c8ef3..3c0c2d8f7e 100644 +index 36f7e02757d2..b4f9d62a1a9a 100644 --- a/include/wx/fontutil.h +++ b/include/wx/fontutil.h -@@ -294,7 +294,11 @@ public: +@@ -115,7 +115,7 @@ public: + static double GetCTSlant( CTFontDescriptorRef font ); + + CTFontDescriptorRef GetCTFontDescriptor() const; +- ++ + void RealizeResource() const; + private: + // attributes for regenerating a CTFontDescriptor, stay close to native values +@@ -232,7 +232,11 @@ public: wxFontEncoding GetEncoding() const; void SetPointSize(int pointsize); - void SetFractionalPointSize(double pointsize); + void SetFractionalPointSize(double pointsize +#if defined(__WXMSW__) -+ , const wxWindow *window = nullptr ++ , const wxWindow *window = nullptr +#endif -+ ); ++ ); void SetPixelSize(const wxSize& pixelSize); void SetStyle(wxFontStyle style); void SetNumericWeight(int weight); -@@ -307,12 +311,19 @@ public: +@@ -245,12 +249,19 @@ public: // Helper used in many ports: use the normal font size if the input is // negative, as we handle -1 as meaning this for compatibility. - void SetSizeOrDefault(double size) + void SetSizeOrDefault(double size +#if defined(__WXMSW__) -+ , const wxWindow *window = nullptr ++ , const wxWindow *window = nullptr +#endif -+ ) ++ ) { SetFractionalPointSize ( @@ -67,10 +90,10 @@ index 09ad8c8ef3..3c0c2d8f7e 100644 } diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h -index e29a77627c..dc48cf9451 100644 +index 30a54326c2c8..0815192684ba 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h -@@ -38,6 +38,7 @@ class WXDLLIMPEXP_FWD_CORE wxRegion; +@@ -36,6 +36,7 @@ class WXDLLIMPEXP_FWD_CORE wxRegion; class WXDLLIMPEXP_FWD_BASE wxString; class WXDLLIMPEXP_FWD_CORE wxIconBundle; class WXDLLIMPEXP_FWD_CORE wxPoint; @@ -78,7 +101,7 @@ index e29a77627c..dc48cf9451 100644 // --------------------------------------------------------------------------- // constants -@@ -1092,7 +1093,9 @@ extern int WXDLLIMPEXP_CORE wxDisplayDepth(); +@@ -1128,7 +1129,9 @@ extern int WXDLLIMPEXP_CORE wxDisplayDepth(); // get the display size extern void WXDLLIMPEXP_CORE wxDisplaySize(int *width, int *height); @@ -89,14 +112,11 @@ index e29a77627c..dc48cf9451 100644 extern wxSize WXDLLIMPEXP_CORE wxGetDisplaySizeMM(); extern wxSize WXDLLIMPEXP_CORE wxGetDisplayPPI(); diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h -index d7a3890764..e4dee51d5a 100644 +index 047823e56eca..74b7ba6f305e 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h -@@ -2951,9 +2951,11 @@ private: - wxGridWindow* gridWindow); - - // Update the width/height of the column/row being drag-resized. -+ //BBS: add cursor mode for DoGridDragResize's paremeters +@@ -2879,7 +2879,8 @@ private: + // actually in progress. void DoGridDragResize(const wxPoint& position, const wxGridOperations& oper, - wxGridWindow* gridWindow); @@ -106,12 +126,12 @@ index d7a3890764..e4dee51d5a 100644 // process different clicks on grid cells void DoGridCellLeftDown(wxMouseEvent& event, diff --git a/include/wx/msw/font.h b/include/wx/msw/font.h -index 0f9768b44e..094d774918 100644 +index c2256808b329..69fd04fd6a37 100644 --- a/include/wx/msw/font.h +++ b/include/wx/msw/font.h -@@ -23,7 +23,7 @@ public: +@@ -22,7 +22,7 @@ public: // ctors and such - wxFont() { } + wxFont() = default; - wxFont(const wxFontInfo& info); + wxFont(const wxFontInfo& info, const wxWindow *window = nullptr); @@ -119,27 +139,26 @@ index 0f9768b44e..094d774918 100644 wxFont(int size, wxFontFamily family, diff --git a/include/wx/msw/tooltip.h b/include/wx/msw/tooltip.h -index 4c3be08cec..96fb378d01 100644 +index 8d05e29e56c2..8dd0f795b738 100644 --- a/include/wx/msw/tooltip.h +++ b/include/wx/msw/tooltip.h -@@ -91,10 +91,10 @@ private: - // the one and only one tooltip control we use - never access it directly +@@ -91,9 +91,11 @@ private: // but use GetToolTipCtrl() which will create it when needed static WXHWND ms_hwndTT; -- + +public: // create the tooltip ctrl if it doesn't exist yet and return its HWND static WXHWND GetToolTipCtrl(); -- + +private: // to be used in wxModule for deleting tooltip ctrl window when exiting mainloop static void DeleteToolTipCtrl(); diff --git a/include/wx/osx/app.h b/include/wx/osx/app.h -index 317a0ca96f..58014ec1d4 100644 +index e5b915f2ef50..3092a26bf0fe 100644 --- a/include/wx/osx/app.h +++ b/include/wx/osx/app.h -@@ -161,7 +161,7 @@ private: +@@ -160,7 +160,7 @@ private: public: bool OSXInitWasCalled() { return m_inited; } @@ -149,19 +168,19 @@ index 317a0ca96f..58014ec1d4 100644 void OSXStoreOpenURL(const wxString &url ) { m_getURL = url ; } #endif diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp -index b61aac35bf..d12b745e8c 100644 +index b294690b9f5e..c1ccc6e406e8 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp -@@ -2141,7 +2141,7 @@ void wxComboCtrlBase::CreatePopup() - #if !USES_GENERICTLW - m_winPopup = new wxComboPopupWindowBase2( this, wxNO_BORDER ); - #else -- int tlwFlags = wxNO_BORDER; -+ int tlwFlags = wxNO_BORDER | wxSTAY_ON_TOP; - #ifdef wxCC_GENERIC_TLW_IS_FRAME - tlwFlags |= wxFRAME_NO_TASKBAR; - #endif -@@ -2285,6 +2285,9 @@ void wxComboCtrlBase::ShowPopup() +@@ -1950,7 +1950,7 @@ void wxComboCtrlBase::CreatePopup() + + if ( !m_winPopup ) + { +- m_winPopup = new wxComboPopupWindow( this, wxNO_BORDER ); ++ m_winPopup = new wxComboPopupWindow( this, wxNO_BORDER | wxSTAY_ON_TOP ); + + m_winPopup->Bind(wxEVT_KEY_DOWN, &wxComboCtrlBase::OnPopupKey, this); + m_winPopup->Bind(wxEVT_CHAR, &wxComboCtrlBase::OnPopupKey, this); +@@ -2100,6 +2100,9 @@ void wxComboCtrlBase::ShowPopup() SetFocus(); @@ -171,14 +190,14 @@ index b61aac35bf..d12b745e8c 100644 // Space above and below int screenHeight; wxPoint scrPos; -@@ -2407,9 +2410,13 @@ void wxComboCtrlBase::ShowPopup() +@@ -2222,9 +2225,13 @@ void wxComboCtrlBase::ShowPopup() int showFlags = CanDeferShow; - if ( spaceBelow < szp.y ) + int anchorSideVertical = m_anchorSide & (wxUP | wxDOWN); + if (// Pop up as asked for by the library user. -+ (anchorSideVertical & wxUP) || ++ (anchorSideVertical & wxUP) || + // Automatic: Pop up if it does not fit down. + (anchorSideVertical == 0 && spaceBelow < szp.y )) { @@ -188,10 +207,10 @@ index b61aac35bf..d12b745e8c 100644 } diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp -index 1f5fd4d66b..14ea2f8ef1 100644 +index 0b57f8de4baf..62820397ea75 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp -@@ -1322,7 +1322,11 @@ wxDataViewItem wxDataViewCtrlBase::GetSelection() const +@@ -1335,7 +1335,11 @@ wxDataViewItem wxDataViewCtrlBase::GetSelection() const wxDataViewItemArray selections; GetSelections(selections); @@ -205,7 +224,7 @@ index 1f5fd4d66b..14ea2f8ef1 100644 namespace diff --git a/src/common/dcbufcmn.cpp b/src/common/dcbufcmn.cpp -index 74958fce10..59844f4526 100644 +index db0e001fba6c..7e08072af7cd 100644 --- a/src/common/dcbufcmn.cpp +++ b/src/common/dcbufcmn.cpp @@ -82,9 +82,15 @@ private: @@ -215,21 +234,21 @@ index 74958fce10..59844f4526 100644 +#if __WXMSW__ // we must always return a valid bitmap but creating a bitmap of // size 0 would fail, so create a 1*1 bitmap in this case -- buffer->CreateScaled(wxMax(w, 1), wxMax(h, 1), -1, scale); +- buffer->CreateWithDIPSize(wxMax(w, 1), wxMax(h, 1), scale); + buffer->Create(wxMax(w, 1), wxMax(h, 1), 24); +#else -+ // we must always return a valid bitmap but creating a bitmap of -+ // size 0 would fail, so create a 1*1 bitmap in this case -+ buffer->CreateScaled(wxMax(w, 1), wxMax(h, 1), -1, scale); ++ // we must always return a valid bitmap but creating a bitmap of ++ // size 0 would fail, so create a 1*1 bitmap in this case ++ buffer->CreateScaled(wxMax(w, 1), wxMax(h, 1), -1, scale); +#endif return buffer; } diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp -index 20442bbc73..9a24951ec7 100644 +index 8681170c10da..1afca63e51a4 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp -@@ -863,11 +863,25 @@ void wxDisplaySize(int *width, int *height) +@@ -923,11 +923,25 @@ void wxDisplaySize(int *width, int *height) *height = size.y; } @@ -239,7 +258,7 @@ index 20442bbc73..9a24951ec7 100644 + if ( width ) + *width = size.x; + if ( height ) -+ *height = size.y; ++ *height = size.y; +} + wxSize wxGetDisplaySize() @@ -255,81 +274,51 @@ index 20442bbc73..9a24951ec7 100644 void wxClientDisplayRect(int *x, int *y, int *width, int *height) { const wxRect rect = wxGetClientDisplayRect(); -diff --git a/src/common/intl.cpp b/src/common/intl.cpp -index 0b0d8798f4..7072fab18a 100644 ---- a/src/common/intl.cpp -+++ b/src/common/intl.cpp -@@ -1628,6 +1628,12 @@ GetInfoFromLCID(LCID lcid, - { - str = buf; - -+//FIXME Vojtech: We forcefully set the locales for a decimal point to "C", but this -+// is not possible for the Win32 locales, therefore there is a discrepancy. -+// It looks like we live with the discrepancy for at least half a year, so we will -+// suppress the assert until we fix Slic3r to properly switch to "C" locales just -+// for file import / export. -+#if 0 - // As we get our decimal point separator from Win32 and not the - // CRT there is a possibility of mismatch between them and this - // can easily happen if the user code called setlocale() -@@ -1641,6 +1647,7 @@ GetInfoFromLCID(LCID lcid, - "Decimal separator mismatch -- did you use setlocale()?" - "If so, use wxLocale to change the locale instead." - ); -+#endif - } - break; - diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp -index 41fd4524cf..f4a15cb839 100644 +index c19076c04bf6..e9f5440bf581 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp -@@ -3824,7 +3824,8 @@ void wxGrid::ProcessRowLabelMouseEvent( wxMouseEvent& event, wxGridRowLabelWindo +@@ -3979,7 +3979,8 @@ void wxGrid::ProcessRowColLabelMouseEvent( const wxGridOperations &oper, wxMouse + { + if ( m_cursorMode == oper.GetCursorModeResize() ) { - case WXGRID_CURSOR_RESIZE_ROW: - { -- DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow); -+ //BBS: add cursor mode for DoGridDragResize's paremeters -+ DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow, WXGRID_CURSOR_RESIZE_ROW); - } - break; - -@@ -4166,7 +4167,8 @@ void wxGrid::ProcessColLabelMouseEvent( wxMouseEvent& event, wxGridColLabelWindo - switch ( m_cursorMode ) +- DoGridDragResize(event.GetPosition(), oper, gridWindow); ++ //BBS: add cursor mode for DoGridDragResize's paremeters ++ DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow, WXGRID_CURSOR_RESIZE_ROW); + } + else if ( m_cursorMode == oper.GetCursorModeSelect() && line >=0 ) { - case WXGRID_CURSOR_RESIZE_COL: -- DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow); -+ //BBS: add cursor mode for DoGridDragResize's paremeters -+ DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow, WXGRID_CURSOR_RESIZE_COL); - break; - - case WXGRID_CURSOR_SELECT_COL: -@@ -4708,11 +4710,13 @@ bool wxGrid::DoGridDragEvent(wxMouseEvent& event, - return DoGridCellDrag(event, coords, isFirstDrag); +@@ -4602,12 +4603,18 @@ bool wxGrid::DoGridDragEvent(wxMouseEvent& event, case WXGRID_CURSOR_RESIZE_ROW: -- DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow); -+ //BBS: add cursor mode for DoGridDragResize's paremeters -+ DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow, WXGRID_CURSOR_RESIZE_ROW); + if ( m_dragRowOrCol != -1 ) +- DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow); ++ { ++ //BBS: add cursor mode for DoGridDragResize's paremeters ++ DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow, WXGRID_CURSOR_RESIZE_ROW); ++ } break; case WXGRID_CURSOR_RESIZE_COL: -- DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow); -+ //BBS: add cursor mode for DoGridDragResize's paremeters -+ DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow, WXGRID_CURSOR_RESIZE_COL); + if ( m_dragRowOrCol != -1 ) +- DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow); ++ { ++ //BBS: add cursor mode for DoGridDragResize's paremeters ++ DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow, WXGRID_CURSOR_RESIZE_COL); ++ } break; default: -@@ -4803,6 +4807,8 @@ wxGrid::DoGridCellLeftDown(wxMouseEvent& event, +@@ -4702,6 +4709,8 @@ wxGrid::DoGridCellLeftDown(wxMouseEvent& event, case wxGridSelectCells: case wxGridSelectRowsOrColumns: // nothing to do in these cases -+ //BBS: select this cell when first click ++ // BBS: select this cell when first click + m_selection->SelectBlock(coords.GetRow(), coords.GetCol(), coords.GetRow(), coords.GetCol(), event); break; case wxGridSelectRows: -@@ -5044,9 +5050,11 @@ void wxGrid::ProcessGridCellMouseEvent(wxMouseEvent& event, wxGridWindow *eventG +@@ -4966,9 +4975,11 @@ void wxGrid::ProcessGridCellMouseEvent(wxMouseEvent& event, wxGridWindow *eventG } } @@ -340,9 +329,9 @@ index 41fd4524cf..f4a15cb839 100644 + wxGridWindow* gridWindow, + CursorMode mode) { - // Get the logical position from the physical one we're passed. - const wxPoint -@@ -5056,10 +5064,28 @@ void wxGrid::DoGridDragResize(const wxPoint& position, + wxCHECK_RET( m_dragRowOrCol != -1, + "shouldn't be called when not drag resizing" ); +@@ -4981,10 +4992,28 @@ void wxGrid::DoGridDragResize(const wxPoint& position, // orthogonal direction. const int linePos = oper.Dual().Select(logicalPos); @@ -373,7 +362,7 @@ index 41fd4524cf..f4a15cb839 100644 // TODO: generate RESIZING event, see #10754, if the size has changed. } -@@ -5082,7 +5108,8 @@ wxPoint wxGrid::GetPositionForResizeEvent(int width) const +@@ -5007,7 +5036,8 @@ wxPoint wxGrid::GetPositionForResizeEvent(int width) const void wxGrid::DoEndDragResizeRow(const wxMouseEvent& event, wxGridWindow* gridWindow) { @@ -381,9 +370,9 @@ index 41fd4524cf..f4a15cb839 100644 + //BBS: add cursor mode for DoGridDragResize's paremeters + DoGridDragResize(event.GetPosition(), wxGridRowOperations(), gridWindow, WXGRID_CURSOR_RESIZE_ROW); - SendGridSizeEvent(wxEVT_GRID_ROW_SIZE, m_dragRowOrCol, -1, event); + SendGridSizeEvent(wxEVT_GRID_ROW_SIZE, m_dragRowOrCol, event); -@@ -5091,7 +5118,8 @@ void wxGrid::DoEndDragResizeRow(const wxMouseEvent& event, wxGridWindow* gridWin +@@ -5016,7 +5046,8 @@ void wxGrid::DoEndDragResizeRow(const wxMouseEvent& event, wxGridWindow* gridWin void wxGrid::DoEndDragResizeCol(const wxMouseEvent& event, wxGridWindow* gridWindow) { @@ -391,9 +380,9 @@ index 41fd4524cf..f4a15cb839 100644 + //BBS: add cursor mode for DoGridDragResize's paremeters + DoGridDragResize(event.GetPosition(), wxGridColumnOperations(), gridWindow, WXGRID_CURSOR_RESIZE_COL); - SendGridSizeEvent(wxEVT_GRID_COL_SIZE, -1, m_dragRowOrCol, event); + SendGridSizeEvent(wxEVT_GRID_COL_SIZE, m_dragRowOrCol, event); -@@ -5105,9 +5133,10 @@ void wxGrid::DoHeaderStartDragResizeCol(int col) +@@ -5030,9 +5061,10 @@ void wxGrid::DoHeaderStartDragResizeCol(int col) void wxGrid::DoHeaderDragResizeCol(int width) { @@ -405,10 +394,11 @@ index 41fd4524cf..f4a15cb839 100644 } void wxGrid::DoHeaderEndDragResizeCol(int width) -@@ -5891,6 +5920,10 @@ void wxGrid::OnKeyDown( wxKeyEvent& event ) +@@ -5891,7 +5923,10 @@ void wxGrid::OnKeyDown( wxKeyEvent& event ) + // cells in the last row or when using Shift-Enter). DisableCellEditControl(); - MoveCursorDown( event.ShiftDown() ); +- MoveCursorDown( event.ShiftDown() ); + //BBS: select this cell when first click + m_selection->SelectBlock(m_currentCellCoords.GetRow(), m_currentCellCoords.GetCol(), + m_currentCellCoords.GetRow(), m_currentCellCoords.GetCol(), @@ -416,37 +406,11 @@ index 41fd4524cf..f4a15cb839 100644 } break; -diff --git a/src/msw/bmpcbox.cpp b/src/msw/bmpcbox.cpp -index 0a2d167ad7..0aeba45ea9 100644 ---- a/src/msw/bmpcbox.cpp -+++ b/src/msw/bmpcbox.cpp -@@ -156,13 +156,20 @@ void wxBitmapComboBox::RecreateControl() - - wxComboBox::DoClear(); - -- HWND hwnd = GetHwnd(); -+ WNDPROC wndproc_edit = nullptr; -+ WinStruct combobox_info; -+ HWND hwnd = GetHwnd(); -+if (::GetComboBoxInfo(hwnd, &combobox_info)) -+ wndproc_edit = (WNDPROC)wxGetWindowProc(combobox_info.hwndItem); - DissociateHandle(); - ::DestroyWindow(hwnd); - - if ( !MSWCreateControl(wxT("COMBOBOX"), wxEmptyString, pos, size) ) - return; - -+if (::GetComboBoxInfo(GetHwnd(), &combobox_info)) -+ wxSetWindowProc(combobox_info.hwndItem, wndproc_edit); -+ - // initialize the controls contents - for ( i = 0; i < numItems; i++ ) - { diff --git a/src/msw/font.cpp b/src/msw/font.cpp -index 0bd240d79f..d38b1b00f5 100644 +index 44615ac9513a..7b2ce9c3cbc8 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp -@@ -54,7 +54,7 @@ static const int PITCH_MASK = FIXED_PITCH | VARIABLE_PITCH; +@@ -52,7 +52,7 @@ static const int PITCH_MASK = FIXED_PITCH | VARIABLE_PITCH; class WXDLLEXPORT wxFontRefData: public wxGDIRefData { public: @@ -455,16 +419,16 @@ index 0bd240d79f..d38b1b00f5 100644 wxFontRefData(const wxNativeFontInfo& info, WXHFONT hFont = 0) { -@@ -324,7 +324,7 @@ protected: +@@ -322,7 +322,7 @@ protected: // wxFontRefData // ---------------------------------------------------------------------------- -wxFontRefData::wxFontRefData(const wxFontInfo& info) +wxFontRefData::wxFontRefData(const wxFontInfo& info, const wxWindow *window) { - m_hFont = NULL; + m_hFont = nullptr; -@@ -335,7 +335,7 @@ wxFontRefData::wxFontRefData(const wxFontInfo& info) +@@ -333,7 +333,7 @@ wxFontRefData::wxFontRefData(const wxFontInfo& info) } else { @@ -473,7 +437,7 @@ index 0bd240d79f..d38b1b00f5 100644 } SetStyle(info.GetStyle()); -@@ -518,12 +518,12 @@ wxFontEncoding wxNativeFontInfo::GetEncoding() const +@@ -516,12 +516,12 @@ wxFontEncoding wxNativeFontInfo::GetEncoding() const return wxGetFontEncFromCharSet(lf.lfCharSet); } @@ -488,7 +452,7 @@ index 0bd240d79f..d38b1b00f5 100644 lf.lfHeight = GetLogFontHeightAtPPI(pointSizeNew, ppi); pointSize = pointSizeNew; -@@ -812,9 +812,9 @@ wxFont::wxFont(const wxString& fontdesc) +@@ -810,9 +810,9 @@ wxFont::wxFont(const wxString& fontdesc) (void)Create(info); } @@ -501,10 +465,10 @@ index 0bd240d79f..d38b1b00f5 100644 bool wxFont::Create(const wxNativeFontInfo& info, WXHFONT hFont) diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp -index 9bb397d472..30af7154a7 100644 +index 2bba1ec4a67c..cc409221b365 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp -@@ -368,6 +368,8 @@ void MenuDrawData::Init(wxWindow const* window) +@@ -355,6 +355,8 @@ void MenuDrawData::Init(wxWindow const* window) // native menu uses small top margin for separator if ( SeparatorMargin.cyTopHeight >= 2 ) SeparatorMargin.cyTopHeight -= 2; @@ -514,17 +478,16 @@ index 9bb397d472..30af7154a7 100644 else #endif // wxUSE_UXTHEME diff --git a/src/msw/window.cpp b/src/msw/window.cpp -index eadc2f5700..f64fea4446 100644 +index b3c813dae837..7ff22e130c5e 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp -@@ -4773,33 +4773,49 @@ static wxSize GetWindowDPI(HWND hwnd) +@@ -4853,28 +4853,44 @@ static wxSize GetWindowDPI(HWND hwnd) } /*extern*/ -int wxGetSystemMetrics(int nIndex, const wxWindow* window) +int wxGetSystemMetrics(int nIndex, const wxWindow* win) { - #if wxUSE_DYNLIB_CLASS - if ( !window ) - window = wxApp::GetMainTopWindow(); + const wxWindow* window = (!win && wxTheApp) ? wxTheApp->GetTopWindow() : win; @@ -533,7 +496,7 @@ index eadc2f5700..f64fea4446 100644 + if (window) { - typedef int (WINAPI * GetSystemMetricsForDpi_t)(int nIndex, UINT dpi); -- static GetSystemMetricsForDpi_t s_pfnGetSystemMetricsForDpi = NULL; +- static GetSystemMetricsForDpi_t s_pfnGetSystemMetricsForDpi = nullptr; - static bool s_initDone = false; - - if ( !s_initDone ) @@ -579,25 +542,12 @@ index eadc2f5700..f64fea4446 100644 + } } } - #else -- wxUnusedVar(window); -+ wxUnusedVar(win); - #endif // wxUSE_DYNLIB_CLASS - return ::GetSystemMetrics(nIndex); diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm -index 6ff0cc3088..4943f3ea38 100644 +index 37c82e49a256..db98e9b3af32 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm -@@ -1734,12 +1734,22 @@ outlineView:(NSOutlineView*)outlineView - if ( !dvc->GetEventHandler()->ProcessEvent(eventDV) ) - [super keyDown:event]; - } -- else -+ //FIXME Vojtech's hack to get the accelerators assigned to the wxDataViewControl working. -+ else if (! implementation->DoHandleKeyEvent(event)) - { - [super keyDown:event]; // all other keys +@@ -1649,6 +1649,16 @@ outlineView:(NSOutlineView*)outlineView } } @@ -609,14 +559,25 @@ index 6ff0cc3088..4943f3ea38 100644 +if (! implementation->DoHandleMouseEvent(event)) + [super mouseMoved:event]; +} ++ + // // contextual menus // -@@ -2672,12 +2682,22 @@ void wxCocoaDataViewControl::DoSetIndent(int indent) +@@ -2056,7 +2066,8 @@ void wxCocoaDataViewControl::keyEvent(WX_NSEvent event, WXWidget slf, void *_cmd + if ( !dvc->GetEventHandler()->ProcessEvent(eventDV) ) + wxWidgetCocoaImpl::keyEvent(event, slf, _cmd); + } +- else ++ //FIXME Vojtech's hack to get the accelerators assigned to the wxDataViewControl working. ++ else if (! implementation->DoHandleKeyEvent(event)) + { + wxWidgetCocoaImpl::keyEvent(event, slf, _cmd); // all other keys + } +@@ -2611,7 +2622,18 @@ void wxCocoaDataViewControl::HitTest(const wxPoint& point_, wxDataViewItem& item + point.x += visibleRect.origin.x; + point.y += visibleRect.origin.y; - void wxCocoaDataViewControl::HitTest(const wxPoint& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const - { - NSPoint const nativePoint = wxToNSPoint((NSScrollView*) GetWXWidget(),point); + NSTableHeaderView *headerView = [m_OutlineView headerView]; + if (headerView && point.y < headerView.visibleRect.size.height) { @@ -633,16 +594,20 @@ index 6ff0cc3088..4943f3ea38 100644 int indexColumn; int indexRow; - -- - indexColumn = [m_OutlineView columnAtPoint:nativePoint]; - indexRow = [m_OutlineView rowAtPoint: nativePoint]; - if ((indexColumn >= 0) && (indexRow >= 0)) diff --git a/src/osx/cocoa/settings.mm b/src/osx/cocoa/settings.mm -index de5f52860c..a9581174a4 100644 +index b60573b4cbd8..852f4104e411 100644 --- a/src/osx/cocoa/settings.mm +++ b/src/osx/cocoa/settings.mm -@@ -224,7 +224,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) +@@ -87,7 +87,7 @@ bool wxSystemAppearance::IsDark() const + wxColour wxSystemSettingsNative::GetColour(wxSystemColour index) + { + wxOSXEffectiveAppearanceSetter helper; +- ++ + NSColor* sysColor = nil; + switch( index ) + { +@@ -222,7 +222,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) // ---------------------------------------------------------------------------- // Get a system metric, e.g. scrollbar size @@ -651,17 +616,17 @@ index de5f52860c..a9581174a4 100644 { int value; -@@ -259,11 +259,11 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index, const wxWindow* WXUN +@@ -257,11 +257,11 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index, const wxWindow* WXUN // TODO case wxSYS_WINDOWMIN_Y: case wxSYS_SCREEN_X: -- wxDisplaySize(&value, NULL); -+ wxDisplaySize(win, &value, NULL); +- wxDisplaySize(&value, nullptr); ++ wxDisplaySize(win, &value, nullptr); return value; case wxSYS_SCREEN_Y: -- wxDisplaySize(NULL, &value); -+ wxDisplaySize(win, NULL, &value); +- wxDisplaySize(nullptr, &value); ++ wxDisplaySize(win, nullptr, &value); return value; // TODO case wxSYS_FRAMESIZE_X: diff --git a/deps/wxWidgets/wxWidgets.cmake b/deps/wxWidgets/wxWidgets.cmake index 5aebbceea3..0f9d734621 100644 --- a/deps/wxWidgets/wxWidgets.cmake +++ b/deps/wxWidgets/wxWidgets.cmake @@ -1,4 +1,4 @@ -set(_wx_git_tag v3.1.5) +set(_wx_git_tag v3.2.4) set(_wx_toolkit "") if(CMAKE_SYSTEM_NAME STREQUAL "Linux")