Print Page | Close Window

Lots of flashing with floating panes

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=23855
Printed Date: 29 March 2024 at 11:23am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Lots of flashing with floating panes
Posted By: rdhd
Subject: Lots of flashing with floating panes
Date Posted: 24 May 2019 at 3:45pm
When we call SetLayout, any panes we have in floating containers end up causing the floating containers to flash like crazy. We do have a lot of panes. The issue is that CXTPDockingPaneManager::SetLayout calls _DetachAll() and _DetachAll() loops thru each pane and calls Detach on the pane. In CXTPDockingPane::Detach(), a call is made right back to the manager to call _Redraw. Then after the manager _DetachAll returns, the manager calls _Redraw.

Can CJ modify the code to keep each pane Detach from causing _Redraw to be called (via a flag passed in to Detach) or, the manager could set a flag "I'm in _DetachAll" and when _Redraw is called, ignore the call. We have derived from the CJ manager so I would override those APIs but they are not virtual. If SetLayout were virtual, we could override it and implement our own _DetachAll and/or _Redraw.

Note that even if I have just one floating container, it gets redisplayed once for each pane in the pane manager's list as the pane manager _Redraw code redraws everything. Users are beating us up on this one. Especially users that float multiple panes in different containers.



Replies:
Posted By: rdhd
Date Posted: 24 May 2019 at 4:33pm
I added a flag to the manager and set it in SetLayout before calling _DetachAll. Checked the flag in _Redraw and exited. Cleared the flag in SetLayout after _DetachAll so the call to _Redraw would execute. So far, I have seen no ill side effects and all the flashing is gone. Nice, clean display.

If any CJ person reads this, let me know if there is something I might not have tested. I floated panes, I have multiple dock sites on the left and right side of the app. MDI tests where different panes are used by each document type. Pinned, unpinned ... Hope I didn't miss anything.

Would be great if CJ added code to stop the flashing so I don't have to edit each build we pull to add this code to that build before we compile the toolkit.


Posted By: rdhd
Date Posted: 28 May 2019 at 11:47am
For our purposes I also added a method to set that flag as it turns out we have cases where we have to detach objects and then issue a redraw call when we are done. So I set the flag to avoid redraws while we call Detach and clear it after detaching. Then we call the API to redraw (just a wrapper that calls _Redraw). I would have called an analogous API that wraps _DetachAll but it didn't exist. Would be nice to have an API that wraps _DetachAll that can be used to avoid all the drawing until all are detached.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net