Fix/aui resize capture (PR #27025)

24 views
Skip to first unread message

Gunter Königsman

unread,
Sep 19, 2026, 1:15:05 AM (3 days ago) Sep 19
to wx-...@googlegroups.com, Subscribed

Ever since I let AI write the GTK4 port of wxWidgets I use it for my development work. I was told to leave AUI drag-and-drop alone, but since resizing panes is broken at least on GTK3, on wayland, as well, I asked the AI to fix this. The answer was:

Dragging an AUI pane sizer sometimes left the application with the resize cursor and with keyboard input going nowhere useful: the frame still had the mouse capture.

wxAUI_MGR_LIVE_RESIZE is part of wxAUI_MGR_DEFAULT, so OnMotion() calls DoEndResizeAction() on every motion event of the drag. That function returns early when it cannot work out a new proportion — a dock measuring zero pixels, every resizable pane in it at proportion zero, or no non-fixed pane after the one being resized to take the space from — and it also set m_action to actionNone on the way out. The drag was then over as far as the manager was concerned while the button was still down and the capture still held, so none of the branches in OnLeftUp() matched and nothing released it.

The last of those three conditions is reachable from an ordinary layout: a resizable pane followed in its dock by a fixed one, a toolbar pane for instance, has nothing after it to borrow from. That is why it only happens for some sashes.

Two commits, either of which fixes the reported case on its own: the first stops ending the action in that early return — the assignment was redundant in the OnLeftUp() path, which clears m_action itself, and wrong in the OnMotion() one, where the user is still dragging; the second releases the capture at the end of OnLeftUp() if it is still held, covering any other way an action could be cancelled while holding it. Happy to drop the second if you would rather keep the change minimal.


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

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

Commit Summary

  • 45eabff Don't end the AUI resize action when the new size can't be computed
  • 515c313 Always release the mouse capture in wxAuiManager::OnLeftUp()

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/27025@github.com>

VZ

unread,
Sep 19, 2026, 6:09:17 AM (3 days ago) Sep 19
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#27025)

Could you please explain how to reproduce the original problem if you still see it with the latest master, notably including c63787b (Stop releasing and recapturing mouse while dragging AUI sash, 2026-09-08)?


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

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

Gunter Königsman

unread,
Sep 19, 2026, 7:31:11 AM (2 days ago) Sep 19
to wx-...@googlegroups.com, Subscribed
gunterkoenigsmann left a comment (wxWidgets/wxWidgets#27025)

In wxMaxima I have a worksheet in the middle (layer 0) and sidebars left and right. The trigger is resizing the sidebars to the right.

If you want on Monday I can try to compile a minimal sample.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

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

VZ

unread,
Sep 20, 2026, 1:28:04 PM (yesterday) Sep 20
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#27025)

OK, the problem can be actually reproduced in the aui sample without any changes: it's enough to use "Perspective » All panes" menu item and then drag the sash between "Text Pane with Hide Prompt" and "Fixed Pane" sideways — the mouse will remain captured forever (and the sash won't move).

I'll apply the first commit with the test checking that this is fixed, thanks.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

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

VZ

unread,
Sep 20, 2026, 4:59:06 PM (yesterday) Sep 20
to wx-...@googlegroups.com, Subscribed

Closed #27025 via 9992152.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

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

Reply all
Reply to author
Forward
0 new messages