Fix IconView blank after cut/paste between parent-child folders#2806
Fix IconView blank after cut/paste between parent-child folders#2806Dipanshusinghh wants to merge 1 commit into
Conversation
…alls Fixes elementary#2801: When scrolling/resizing triggered freeze_child_notify() during a directory load (tree_frozen=true), thaw_child_notify() was skipped, leaving GTK's internal freeze counter unbalanced and the view permanently blank. Add child_notify_frozen boolean guard to ensure exactly one freeze/thaw pair per scroll event.
jeremypw
left a comment
There was a problem hiding this comment.
This does seem to fix the issue for me, I am afraid. According to the documentation I have found there is no need to pair freeze_child_notify and thaw_child_notify calls (unlike object.freeze_notify and object.thaw_notify). When testing, make sure that you move a file between a parent folder and a child folder and then undo.
|
Understod ! i will update this by today |
|
You are right that the calls to the child_notify functions are unbalanced though. This whole area of the code is rather ugly and is a hack to improve the performance of IconView. Whether it is worth spending a lot of time making it more elegant is questionable as it will go away once we switch to Gtk4 dynamic views (unless it causes an issue). |
|
Thnks. |
|
@Dipanshusinghh You need to identify and fix the root cause of #2801 to complete this PR. If you want to improve the code for other reasons it would be better to open a separate PR for that. The unpaired calls do not seem to be causing any actual issue do they? Note that the issue only occurs with parent - child source and destination folders so the cause must have something to do with that. The cause could be quite obscure so I would try to determine (for example) whether the model for the view is being filled and not displayed by adding debugging messages or otherwise. Or maybe its a race between the view being unthawed and being drawn. |
Fixes #2801
Added
child_notify_frozenboolean flag inIconView.valaandAbstractTreeView.valato ensurefreeze_child_notify()andthaw_child_notify()calls are always balanced, preventing IconViewfrom going permanently blank after cut/paste operations.