Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - More CJ 17 beta 3 shadow woes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

More CJ 17 beta 3 shadow woes

 Post Reply Post Reply
Author
Message
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 891
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: More CJ 17 beta 3 shadow woes
    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).
Back to Top
BeeJay View Drop Down
Groupie
Groupie
Avatar

Joined: 12 March 2013
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote BeeJay Quote  Post ReplyReply Direct Link To This Post 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 here and here as well.

Back to Top
astoyan View Drop Down
Admin Group
Admin Group
Avatar

Joined: 24 August 2013
Status: Offline
Points: 304
Post Options Post Options   Thanks (0) Thanks(0)   Quote astoyan Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 891
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
BeeJay View Drop Down
Groupie
Groupie
Avatar

Joined: 12 March 2013
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote BeeJay Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2015 at 8:44am
@rhd: I can fully support your last reply! Clap
Back to Top
astoyan View Drop Down
Admin Group
Admin Group
Avatar

Joined: 24 August 2013
Status: Offline
Points: 304
Post Options Post Options   Thanks (0) Thanks(0)   Quote astoyan Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
markr View Drop Down
Senior Member
Senior Member


Joined: 01 August 2004
Status: Offline
Points: 443
Post Options Post Options   Thanks (0) Thanks(0)   Quote markr Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 891
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
BeeJay View Drop Down
Groupie
Groupie
Avatar

Joined: 12 March 2013
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote BeeJay Quote  Post ReplyReply Direct Link To This Post 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)


Back to Top
scottp View Drop Down
Groupie
Groupie


Joined: 16 October 2006
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote scottp Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
BeeJay View Drop Down
Groupie
Groupie
Avatar

Joined: 12 March 2013
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote BeeJay Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
scottp View Drop Down
Groupie
Groupie


Joined: 16 October 2006
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote scottp Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.234 seconds.