You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
im using avalondock to display multiple documents, that has buch of content to display. And when user start to drag this document to floating window (undock it from layout root), in many times drag didnt happens.
After few tries, i found out, that LayoutDocumentTabItem.cs -> OnMouseLeftButtonDown calls Model.IsActivate = true, that can block mainthread for some time, and then mouse can be out of LayoutDocumentTabItem header so LayoutDocumentTabItem.cs -> OnMouseMove, isnt called, because there is no MouseMove event.
I was able to reproduce this in MVVMTestApp from version 4.60.00 by just opening two large text documents (i have two 100MB text files) so there is a visible delay between switching from one document to another (after mousedown, tab switch take some time, before headers change their style). And when user moves mouse out of the header before switching is finished, no drag happens.
My attempt to fix this is to add
CaptureMouse() into OnMouseLeftButtonDown in LayoutDocumentTabItem.cs 109
And then i noticed, that when user is dragging window and is moving mouse when DockingManager.cs -> StartDraggingFloatingWindowForContent 1709 is in progress, mouse can be positioned outside of new LayoutFloatingWindowControl. In my opinion this is caused because new window is not synced to mousemove events yet, so i added another CaptureMouse() call to AttachDrag in LayoutFloatingWindowControl.cs 328
Which seems now ok to me, and mouse is always positioned to top left corner of new window. There is a little "bug" that mouse isnt positioned to same position on documentTabHeader when was clicked, but its minor issue for me.
So, what do you think about this solution? Is it something close to clear approach? Or there are some issues, that i missed?
The text was updated successfully, but these errors were encountered:
Muhahe
added a commit
to Muhahe/AvalonDock
that referenced
this issue
Oct 8, 2021
Hi there,
im using avalondock to display multiple documents, that has buch of content to display. And when user start to drag this document to floating window (undock it from layout root), in many times drag didnt happens.
After few tries, i found out, that LayoutDocumentTabItem.cs -> OnMouseLeftButtonDown calls Model.IsActivate = true, that can block mainthread for some time, and then mouse can be out of LayoutDocumentTabItem header so LayoutDocumentTabItem.cs -> OnMouseMove, isnt called, because there is no MouseMove event.
I was able to reproduce this in MVVMTestApp from version 4.60.00 by just opening two large text documents (i have two 100MB text files) so there is a visible delay between switching from one document to another (after mousedown, tab switch take some time, before headers change their style). And when user moves mouse out of the header before switching is finished, no drag happens.
My attempt to fix this is to add
CaptureMouse() into OnMouseLeftButtonDown in LayoutDocumentTabItem.cs 109
And then i noticed, that when user is dragging window and is moving mouse when DockingManager.cs -> StartDraggingFloatingWindowForContent 1709 is in progress, mouse can be positioned outside of new LayoutFloatingWindowControl. In my opinion this is caused because new window is not synced to mousemove events yet, so i added another CaptureMouse() call to AttachDrag in LayoutFloatingWindowControl.cs 328
Which seems now ok to me, and mouse is always positioned to top left corner of new window. There is a little "bug" that mouse isnt positioned to same position on documentTabHeader when was clicked, but its minor issue for me.
So, what do you think about this solution? Is it something close to clear approach? Or there are some issues, that i missed?
The text was updated successfully, but these errors were encountered: