View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004109 | JEDI VCL | 00 JVCL Components | public | 2007-04-17 18:29 | 2007-06-24 07:22 |
Reporter | Kiriakos | Assigned To | remkobonte | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | ||||
Summary | 0004109: Resolution to long standing JvDocking bug in JvDockVSNet style | ||||
Description | To reproduce: - Run the advanced demo of JvDokcing using the VSNet style. - Create two windows and dock both of them tabbed in one side of the form. - Save the layout to an ini file - Load the layout from the ini file - Autohide the tabbed forms by clicking on the autohide button - Place the cursor on the name of the first autohidden form name so that it pops up and notice that it is not displayed properly (no frame) Solution: In JvDockControlForm replace ReshowAllVisibleWindow with the following: procedure ReshowAllVisibleWindow; var I: Integer; begin if IsWinXP then for I := 0 to Screen.FormCount - 1 do if Assigned(FindDockClient(Screen.Forms[I])) then Screen.Forms[I].Perform(CM_SHOWINGCHANGED, 0, 0); end; Explanations: While Loading layouts JvDocking undocks and shows all forms and then docks them again in their new positions. To hide the flicker it calls JvDockLockWindow which then calls LockWindowUpdate(GetDeskTopWindow). In Windows XP (and Vista) the LockWindowUpdate(GetDeskTopWindow) is not working. This is why the IsWinXP flag was introduced in JvDockControlForm. If you see where and how this flag is used it suspends the processing of CM_SHOWINGCHANGED while loading docking layouts (TJvDockClient.WindowProc) and then when the loading of the layout is finished ReshowAllVisibleWindow is called. Currently ReshowAllVisibleWindow just calls Windows.ShowWindow, but this is not equivalent to the full processing that takes place in the default processing of CM_SHOWINGCHANGED. The bug reported here is just one manifastation of the problem. In some cases AVs can occur. The suggested change resolves all such problems. | ||||
Additional Information | See also report 4108 | ||||
Tags | No tags attached. | ||||
|
I can't reproduce it with the steps you provided (XP,D7) but I remember I saw something similar when I added your code ('KV to avoid flickering in Vista') in TJvDockInfoZone.SetDockInfoFromNodeToControl. Nonetheless I changed the code, because your comments make sense. I changed it a bit though; the code now only sends the CM_SHOWINGCHANGED message to forms that ignored that same message during 'loading': Sending CM_SHOWINGCHANGED has some side-effect, such as triggering OnShow or OnHide events, thus I think it is best to minimize sending it. This is in Rev. 11274; I also changed the advanced demo a bit, this is in Rev. 11275. Some questions: * Does the changed code work for you? * Is your code in TJvDockInfoZone.SetDockInfoFromNodeToControl still necessary? * Do you suggest removing the LockWindowUpdate calls for XP and Vista? |
|
Thanks for implementing the fix. It works fine. The code in TJvDockInfoZone.SetDockInfoFromNodeToControl is not needed! LockWindowUpdate does not seem to cause any problems. It just does not do what it was doing in earlier version of Windows. I tried to see what happens if you remove it and the code still works fine, however there is a bit more flicker. So even in Windows Vista it helps and it is worth keeping it. What really is problematic in Vista though is dock form dragging. See issue 4076 for a fix (Delphi style dragging). This alos improves JvDocking in other versions of Windows. And by the way have a look at the code submitted in 3761. |
|
You may close this bug report. |
Date Modified | Username | Field | Change |
---|---|---|---|
2007-04-17 18:29 | Kiriakos | New Issue | |
2007-04-24 13:45 | remkobonte | Note Added: 0012316 | |
2007-04-24 13:45 | remkobonte | Assigned To | => remkobonte |
2007-04-24 13:45 | remkobonte | Status | new => feedback |
2007-05-03 23:20 | Kiriakos | Note Added: 0012432 | |
2007-06-22 16:57 | Kiriakos | Note Added: 0013514 | |
2007-06-24 07:22 | AHUser | Status | feedback => resolved |
2007-06-24 07:22 | AHUser | Resolution | open => fixed |