When using a wxGLCanvas in a pane managed by wxAUI, all is fine until the user starts dragging around panes. The transparent hint window is not hidden away (the transparency is set to 0 only). This causes the hint window to stay visible (with garbage on it, depending on wether the wxGLCanvas window erases its background or not) when dragging any window (including panes) over the hint window.
Also, because a wxGLCanvas usually redraws itself when something changed on top of it, the hint window is overdrawn by the canvas and thus it results in lots of flickering from the hint window when dragging pane windows.
I figured it could be fixed by adding a m_hint_wnd->Freeze() at Ln 3075 and a m_hint_wnd->Thaw() at Ln 3007 in manager.cpp, but it seems that HideHint and ShowHint are not called the same number of times. Which is a requirement for freeze/thaw to work.
I'm currently looking for a way to fix the freeze/thaw issue, or to fix this wxAUI bug in another way. Ideas would be very welcome.
Kirix Support Forums
Visible hint windows when using wxGLCanvas in a pane
5 posts
• Page 1 of 1
Re: Visible hint windows when using wxGLCanvas in a pane
Anonymous wrote:I figured it could be fixed by adding a m_hint_wnd->Freeze() at Ln 3075 and a m_hint_wnd->Thaw() at Ln 3007 in manager.cpp, but it seems that HideHint and ShowHint are not called the same number of times. Which is a requirement for freeze/thaw to work.
I'm currently looking for a way to fix the freeze/thaw issue, or to fix this wxAUI bug in another way. Ideas would be very welcome.
You are correct. By default, the hint window on MSW doesn't get deleted (it just gets made fully transparent). What it's trying to do is reuse the existing window. Try looking at fadehints.p and noemptyhintrect.p from http://www.alex.org.uk/wxAUI/index.html.
I'm assuming you are using MSW so the linux pseudotransparent hint stuff will not be interesting to you, but if you look at the end of fadehints.p it destroys the hint rectangle when hidden. You'll also need noemptyhintrect.p to fix a problem that creates duff hint windows as opposed to destroying the existing one.
I'm not sure about freeze/thaw alone though. You might need to do a thaw/freeze when the hint rectangle moves or changes size in ShowHint. Nor am I sure what the wxGLCanvas issue is.
Alex
- abligh
- Registered User
- Posts: 59
- Joined: Sun Jan 01, 2006 2:31 pm
i'm having the problem that the visible hint is drawn on top of my floating wxglcanvas windows..
like this:
any ideas how to fix this or is this the same as your problem?
like this:
any ideas how to fix this or is this the same as your problem?
- vexator
- Registered User
- Posts: 17
- Joined: Sat Feb 04, 2006 7:18 am
vexator wrote:i'm having the problem that the visible hint is drawn on top of my floating wxglcanvas windows..
any ideas how to fix this or is this the same as your problem?
The same happens on the sample application. It doesn't appear to happen with toolbars, and it only appears to happen if the pane was originally docked (i.e. not if floating). What's happening is the transparent hint rect (which is in fact a wxFrame) is being created at the wrong z-order position. It should be behind the panel/canvas and in front of the main frame. It has WX_FLOAT_ON_PARENT set but so does the floating panel itself, which I guess means they are ordered somewhat arbitrarily. I can't see an obvious fix for this (nor am I convinced it's not actually the right behaviour - imagine if you had a resized panel that was bigger than the area it would dock to), though clearly doing one sometimes, and the other elsewise is not good.
Alex
- abligh
- Registered User
- Posts: 59
- Joined: Sun Jan 01, 2006 2:31 pm
and it only appears to happen if the pane was originally docked
oha just realized that, too.. so it isn't a problem caused by wxglcanvas, it happens for other windows as well.
- vexator
- Registered User
- Posts: 17
- Joined: Sat Feb 04, 2006 7:18 am
5 posts
· Page 1 of 1
Return to wxAUI Patches & Modifications