Print Page | Close Window

More CJ 17 beta 3 shadow woes

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=22747
Printed Date: 04 May 2024 at 5:30pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: More CJ 17 beta 3 shadow woes
Posted By: rdhd
Subject: More CJ 17 beta 3 shadow woes
Date Posted: 03 October 2015 at 12:01pm
I'm running from home via VPN today with the office2013 White theme with that shadow around the frame. This is quite painful as when the video streaming occurs when the frame displays, including during resizing, the user sees the shadow window display before the app frame displays. On startup I see the shadow display by itself and then the app frame. Then if I grab the frame to resize via the inside of the frame, when I let up on the cursor, the shadow displays and then the frame displays. Also, if I grab the shadow to resize, I get only one screen resize/update and then the resize cursor goes away. That is, no real sizing dynamics occur. However, I have found that if I mouse down and wait for a second or two, and then drag, I do get continuous update. Is this due to yet another timer being used or network lag and the lack of synchronization of the updates?

I suspect I will see the same issues running on the cloud as the video streaming technology is similar.

I think this shadow software needs to be reworked. Instead of one layered window that lies under the entire frame, four separate windows should be used. Or perhaps a region that excludes the app frame rectangle needs to be used. And what about deferring window position changes or something else to better synchronize displays? Visual Studio 2013 has four glow/shadow windows. And I have no problem resizing using those windows over VPN.

I also suspect the hooking code has problems too. Besides other issues I have posted related to the shadow, we have experienced what appears to be lockups with the application and when I debug break into the process, all that appears to be running is the hooking code. Messages don't seem to be making it to the application for processing and we have to restart. When this occurs, it is as if we have a modal dialog up (that's what we thought at first) except that when clicking on the frame we get the Windows "bell" ding-dinging us (if running with sound turned up).



Replies:
Posted By: BeeJay
Date Posted: 09 October 2015 at 7:39am
I unfortunately can confirm this.

The performance-effects overall seem to be slightly better than with XTP16.4 but we are facing a lot of customer feedback, that our application's responsiveness had slowed down significantly sinced we moved from XTP 15.3.1 to 16.4 and to Office 2013 white theme with shadow frames.

Shadow-resizing bugs have been reported http://forum.codejock.com/forum_posts.asp?TID=22746&title=resizing-display-issues" rel="nofollow - here and http://forum.codejock.com/forum_posts.asp?TID=22750&PID=73996&title=problems-with-beta3#73996" rel="nofollow - here as well.



Posted By: astoyan
Date Posted: 13 October 2015 at 10:27pm
Drawing semi-transparent graphics will always cause performance issues when run remotely, this is the reason why most of remote desktop software disable DWM and other niceties by default. Creating 4 semi trasparent underlying windows instead of one layered will probably make it a little bit faster for the price of reduced functionality and customizability of the shadow, but it might cause other unexpected issues in its turn. One possible solution that I can suggest, and please tell me what you think about it, is to optionally disable all frame shadows when connected remotely.


Posted By: rdhd
Date Posted: 14 October 2015 at 8:26am
I had to disable the shadow for all sessions due to the other issues it is causing like keeping web browser controls from working. As for remote sessions, I agree these fancy graphics are problematic. However, I was running our app via Visual Studio and VS has a shadow, just implemented differently, and I didn't notice an issue with it.

I do like the new resizing ability the shadow achieves, but the pain isn't worth the gain! Couldn't the tracking the shadow window gives can be achieved with a window that draws ... nothing.


Posted By: BeeJay
Date Posted: 14 October 2015 at 8:44am
@rhd: I can fully support your last reply! Clap


Posted By: astoyan
Date Posted: 18 October 2015 at 5:09pm
As long as re-designing shadows is not a option, the problem has been solved by adding global Frame Manager flags:

enum XTPFrameShadowManagerFlags
{
// Frame shadows disabled. When this flags is set the existing shadow made
// invisible and not resizeable (xtpFrameShadowsInvisible | xtpFrameShadowsNotResizeable
// get enabled automatically) but no new shadows will be created for new windows.
xtpFrameShadowsDisabled = 1,

// Frame shadows are not visible but remain resizeable.
xtpFrameShadowsInvisible = 2,

// Frame shadows cannot be used for resizing the owner windows.
xtpFrameShadowsNotResizeable = 4,

// Frame shadows are automatically disabled for Terminal Services sessions, 
// e.g. Remote Desktop Connection. When it's set and a Terminal Services 
// session is detected all existing and new shadows will be made invisible 
// and not resizealbe (xtpFrameShadowsInvisible | xtpFrameShadowsNotResizeable).
// Once terminal session abandoning is detected those flags
// will get restored to their original values.
xtpFrameShadowsDisabledInTSS = 8,

// Frame shadows are automatically invisible for Terminal Services sessions, 
// e.g. Remote Desktop Connection, but remain resizealbe.
xtpFrameShadowsInvisibleInTSS = 0x10
};

Please let me know your thoughts on it.
Regards,
  Alexander


Posted By: markr
Date Posted: 19 October 2015 at 9:30am
Hi Alexander,

> As long as re-designing shadows is not a option, the problem has been solved by adding global Frame Manager flags

This seems like a reasonable compromise.

When will a new build be available to us for testing?

Regards,

Mark R.


Posted By: rdhd
Date Posted: 19 October 2015 at 11:56am
This can help, especially with terminal sessions. But I have to turn off shadows due to the other issue where none of my web browser controls created after a resize operation function properly. I already commented out code for setting the window pos (including doing nothing by just returning from the Drag method by adding "return;" at the top of the method) so I'm guessing that even with the shadow not displayed but enabled for resize, I'll encounter the browser control problem, including the lockups I can get when navigating when a resize is in progress where all that seems to be executing when I pump messages is the shadow hooking code.

Basically, hard to tell until I get hold of the new code.


Posted By: BeeJay
Date Posted: 20 October 2015 at 2:01am
would there be an option not to draw a full solid black rectangle for the Shadow but just to leave out the whole internal part?

see the attached animated gif (I hope the forum software does not break it up)




Posted By: scottp
Date Posted: 20 October 2015 at 3:32am
have you tried something like this in CXTPFrameShadow::OnPaint?
dc.ExcludeClipRect(m_pPCD->clientRect);

We have needed to patch XTPTabClientWnd.cpp in several places to add ExcludeClipRect to help avoid flicker


Posted By: BeeJay
Date Posted: 20 October 2015 at 5:51am
@scottp: no not yet, I haven't dived that deep into windows painting details (yet) - I'll check this. Would you mind to provide information where you also have added ExcludeClipRect code in the sources, as we are facing flickering issues, too. I'd really appreciate this (and maybe others, too!). Clap

EDIT: Unfortunately adding this line does not change the effect. Cry

I have inserted this code here:

void CXTPFrameShadow::OnPaint()
{
    if (NULL == m_pPCD)
    {
        ComputeData();
    }

    CPaintDC dc(this);
    dc.ExcludeClipRect(m_pPCD->clientRect);



Is this right? Maybe we need your other ExcludeClipRect additions, too?


Posted By: scottp
Date Posted: 20 October 2015 at 9:14pm
@BeeJay search the forum for ExcludeClipRect and you will find the code snippets I have posted before. My changes were required for the MDI tab groups, so probably not related to this core issue anyway.

pity this idea did not work for the shadows problem



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