AUI inconsistency with wxCursor between macOS and Windows (PR #25813)

51 views
Skip to first unread message

Tommy Krul

unread,
Sep 18, 2025, 3:13:14 PM (7 days ago) Sep 18
to wx-...@googlegroups.com, Subscribed

Fix for resetting the cursor back to default when not over a gripper. Solves an inconsistency between macOS and Windows

issue #25811


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/25813

Commit Summary

  • 3c1db45 AUI inconsistency with wxCursor between macOS and Windows

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25813@github.com>

VZ

unread,
Sep 18, 2025, 4:03:14 PM (7 days ago) Sep 18
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#25813)

I've created #25814 which would be a better fix, if it works for you — I didn't have time to test it, could you please do it? TIA!


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25813/c3309468379@github.com>

Tommy Krul

unread,
Sep 18, 2025, 10:55:29 PM (6 days ago) Sep 18
to wx-...@googlegroups.com, Subscribed
Tommykrul left a comment (wxWidgets/wxWidgets#25813)

Great! Will give it a try tomorrow and let you know


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25813/c3310335355@github.com>

Tommy Krul

unread,
Sep 22, 2025, 8:01:11 PM (3 days ago) Sep 22
to wx-...@googlegroups.com, Subscribed
Tommykrul left a comment (wxWidgets/wxWidgets#25813)

Tried the patch but the behavior seems unchanged. I plan to do some more test, but I build wx offline, so I can't easily inspect the issue in a debugger. Will follow up.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25813/c3321934281@github.com>

Tommy Krul

unread,
Sep 22, 2025, 8:18:20 PM (2 days ago) Sep 22
to wx-...@googlegroups.com, Subscribed
Tommykrul left a comment (wxWidgets/wxWidgets#25813)

Just as a test, I put a assert(false); at the top of the new wxWindowMac::WXUpdateCursor() and it seems like it never gets triggered when the cursor is changed by aui on macOS.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25813/c3321961719@github.com>

VZ

unread,
Sep 23, 2025, 8:59:20 AM (2 days ago) Sep 23
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#25813)

Oh, I had somehow assumed that the cursor was set via SetCursor() but this is not the case here, it's set implicitly by processing wxEVT_SET_CURSOR and the code for handling this is in a different place.

Moreover, I'm much less sure about what returning a null cursor from this event handler supposed to mean. It seems that doing this is actually illegal, at least this is what the documentation for wxSetCursorEvent::HasCursor() implies. So maybe the correct fix is actually this:

diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp
index 0b368b7110..148495a1cb 100644
--- a/src/aui/framemanager.cpp
+++ b/src/aui/framemanager.cpp
@@ -3979,6 +3979,9 @@ void wxAuiManager::OnFindManager(wxAuiManagerEvent& evt)
 
 void wxAuiManager::OnSetCursor(wxSetCursorEvent& event)
 {
+    // Don't set any cursor by default.
+    event.Skip();
+
     // determine cursor
     wxAuiDockUIPart* part = HitTest(event.GetX(), event.GetY());
     wxCursor cursor;
@@ -4010,7 +4013,13 @@ void wxAuiManager::OnSetCursor(wxSetCursorEvent& event)
         }
     }
 
-    event.SetCursor(cursor);
+    if ( cursor.IsOk() )
+    {
+        event.SetCursor(cursor);
+
+        // Undo Skip() done above.
+        event.Skip(false);
+    }
 }
 
 

Does this work for you?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25813/c3323911468@github.com>

Tommy Krul

unread,
Sep 23, 2025, 11:26:59 AM (2 days ago) Sep 23
to wx-...@googlegroups.com, Subscribed
Tommykrul left a comment (wxWidgets/wxWidgets#25813)

I tried this change and this does indeed fix the issue I was seeing on macOS


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25813/c3324512000@github.com>

VZ

unread,
Sep 24, 2025, 11:27:50 AM (21 hours ago) Sep 24
to wx-...@googlegroups.com, Subscribed

Closed #25813.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25813/issue_event/19895823523@github.com>

VZ

unread,
Sep 24, 2025, 11:27:52 AM (21 hours ago) Sep 24
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#25813)

Thanks for testing, I'm closing this one then and will push this change to fix the bug soon.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25813/c3329401003@github.com>

Reply all
Reply to author
Forward
0 new messages