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.
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.
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.
| ... | ... | @@ -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 |
| ... | ... | @@ -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")
|
| ... | ... | @@ -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 |
—
View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help