Skip to content

Commit

Permalink
fix crashes when opening URLs or files from the help menu
Browse files Browse the repository at this point in the history
  • Loading branch information
matyalatte committed Jul 10, 2023
1 parent 65fba78 commit af25970
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
ver 0.5.1
- Fixed crashes when opening URLs or files via the help menu

ver 0.5.0
- Changed the json formats for "choice" and "check_array"
- Added command-line utils to embed json into exe.
Expand Down
4 changes: 4 additions & 0 deletions wx_fix/include/wx/gdicmn.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ enum wxStockCursor
wxCURSOR_RIGHT_ARROW,
wxCURSOR_BULLSEYE,
wxCURSOR_CHAR,
#endif
wxCURSOR_CROSS,
#if !wxUSE_ICON_MINIMAL
wxCURSOR_HAND,
#endif
wxCURSOR_IBEAM,
Expand All @@ -140,7 +142,9 @@ enum wxStockCursor
wxCURSOR_SIZEWE,
wxCURSOR_SIZING,
wxCURSOR_SPRAYCAN,
#endif
wxCURSOR_WAIT,
#if !wxUSE_ICON_MINIMAL
wxCURSOR_WATCH,
wxCURSOR_BLANK,
#ifdef __WXGTK__
Expand Down
2 changes: 0 additions & 2 deletions wx_fix/src/common/gdicmn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,14 +577,12 @@ const wxCursor* wxStockGDI::GetCursor(Item item)
{
switch (item)
{
#if !wxUSE_ICON_MINIMAL
case CURSOR_CROSS:
cursor = new wxCursor(wxCURSOR_CROSS);
break;
case CURSOR_HOURGLASS:
cursor = new wxCursor(wxCURSOR_WAIT);
break;
#endif
case CURSOR_STANDARD:
cursor = new wxCursor(wxCURSOR_ARROW);
break;
Expand Down
4 changes: 4 additions & 0 deletions wx_fix/src/msw/cursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,9 @@ void wxCursor::InitFromStock(wxStockCursor idCursor)
{ false, wxT("WXCURSOR_RIGHT_ARROW") }, // wxCURSOR_RIGHT_ARROW
{ false, wxT("WXCURSOR_BULLSEYE") }, // wxCURSOR_BULLSEYE
{ true, IDC_ARROW }, // WXCURSOR_CHAR
#endif
{ true, IDC_CROSS }, // WXCURSOR_CROSS
#if !wxUSE_ICON_MINIMAL
{ true, IDC_HAND }, // wxCURSOR_HAND
#endif
{ true, IDC_IBEAM }, // WXCURSOR_IBEAM
Expand All @@ -353,7 +355,9 @@ void wxCursor::InitFromStock(wxStockCursor idCursor)
{ true, IDC_SIZEWE }, // WXCURSOR_SIZEWE
{ true, IDC_SIZEALL }, // WXCURSOR_SIZING
{ false, wxT("WXCURSOR_PBRUSH") }, // wxCURSOR_SPRAYCAN
#endif
{ true, IDC_WAIT }, // WXCURSOR_WAIT
#if !wxUSE_ICON_MINIMAL
{ true, IDC_WAIT }, // WXCURSOR_WATCH
{ false, wxT("WXCURSOR_BLANK") }, // wxCURSOR_BLANK
{ true, IDC_APPSTARTING }, // wxCURSOR_ARROWWAIT
Expand Down
6 changes: 4 additions & 2 deletions wx_fix/src/osx/carbon/utilscocoa.mm
Original file line number Diff line number Diff line change
Expand Up @@ -467,22 +467,24 @@ WX_NSCursor wxMacCocoaCreateStockCursor( int cursor_type )

#if !wxUSE_ICON_MINIMAL
case wxCURSOR_WATCH:
#endif
case wxCURSOR_WAIT:
// an arrow should be displayed by the system when things are running
// according to the HIG
// cursor = [[NSCursor arrowCursor] retain];
// but for crossplatform compatibility we display a watch cursor
cursor = wxCreateStockCursor(kwxCursorWatch);
break;
#endif

case wxCURSOR_IBEAM:
cursor = [[NSCursor IBeamCursor] retain];
break;
#if !wxUSE_ICON_MINIMAL

case wxCURSOR_CROSS:
cursor = [[NSCursor crosshairCursor] retain];
break;

#if !wxUSE_ICON_MINIMAL
case wxCURSOR_SIZENWSE:
cursor = wxCreateStockCursor(kwxCursorSizeNWSE);
break;
Expand Down

0 comments on commit af25970

Please sign in to comment.