[Git][wxwidgets/wxwidgets][master] 3 commits: Use native images for wxART_GO_UP/DOWN too in wxOSX

0 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Dec 20, 2025, 8:27:38 PM (2 days ago) Dec 20
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • 3035b169
    by Daniel Kulp at 2025-12-16T21:57:33+01:00
    Use native images for wxART_GO_UP/DOWN too in wxOSX
    
    These images really need to be consistent with those for
    wxART_GO_BACK/FORWARD which had been already changed to use system
    symbols in 20ff462703 (OSX make iOS and macOS share more drawing code
    (#25860), 2025-10-07).
    
    Closes #26034.
    
  • b1668ebc
    by Sean Maas at 2025-12-21T02:00:15+01:00
    Allow setting GL context on any thread in wxOSX too
    
    This already works in the other ports and can work under macOS too if we
    skip changing the view, which can only be done from the main thread.
    
    Closes #26036.
    
  • 1fd12d7b
    by Vadim Zeitlin at 2025-12-21T02:01:46+01:00
    Document that wxGLContext::SetCurrent() is MT-safe
    
    This is an exception rather than the rule, so explicitly mention that
    this is supposed to work.
    
    See #26036.
    

3 changed files:

Changes:

  • interface/wx/glcanvas.h
    ... ... @@ -533,6 +533,9 @@ public:
    533 533
                   an object of type wxGLContext, the statements
    
    534 534
                   @e "RC.SetCurrent(win);" and @e "win.SetCurrent(RC);" are
    
    535 535
                   equivalent, see wxGLCanvas::SetCurrent().
    
    536
    +
    
    537
    +        @note This function may be called from any thread, not only the main
    
    538
    +              one, provided that the context is not used by any other thread.
    
    536 539
         */
    
    537 540
         virtual bool SetCurrent(const wxGLCanvas& win) const;
    
    538 541
     
    

  • src/osx/artmac.cpp
    ... ... @@ -149,6 +149,8 @@ static wxBitmapBundle wxMacArtProvider_CreateBitmapBundle(const wxArtID& id, con
    149 149
     
    
    150 150
         ART_BITMAP(wxART_GO_BACK,        "arrow.backward.circle")
    
    151 151
         ART_BITMAP(wxART_GO_FORWARD,     "arrow.forward.circle")
    
    152
    +    ART_BITMAP(wxART_GO_UP,          "arrow.up.circle")
    
    153
    +    ART_BITMAP(wxART_GO_DOWN,        "arrow.down.circle")
    
    152 154
         ART_BITMAP(wxART_GO_HOME,        "house")
    
    153 155
     
    
    154 156
         ART_BITMAP(wxART_HELP_SETTINGS,  "gear.badge.questionmark")
    

  • src/osx/cocoa/glcanvas.mm
    ... ... @@ -199,8 +199,12 @@ bool wxGLContext::SetCurrent(const wxGLCanvas& win) const
    199 199
         if ( !m_glContext )
    
    200 200
             return false;
    
    201 201
     
    
    202
    -    [m_glContext setView: win.GetHandle() ];
    
    203
    -    [m_glContext update];
    
    202
    +    // View can only be set on the UI thread, but context can be set on any thread
    
    203
    +    if ( wxIsMainThread() )
    
    204
    +    {
    
    205
    +        [m_glContext setView: win.GetHandle() ];
    
    206
    +        [m_glContext update];
    
    207
    +    }
    
    204 208
     
    
    205 209
         [m_glContext makeCurrentContext];
    
    206 210
     
    

Reply all
Reply to author
Forward
0 new messages