wxOSX/Carbon: wxGLCanvas mouse offset in non-floating window classes
- by srose
Hi All,
I mainly program plugins using wxWidgets within a Carbon bundle which is
loaded at runtime. The host-applications where my plugins are running in
provide a native window handle (WindowRef), which I can use to add my custom,
wxWidgets-based GUI-classes.
To use the native window handle with wxWidgets
classes I had to write a wxTopLevelWindow wrapper class, which does all the
WindowRef encapsulation. So far, this works pretty well, but under some
circumstances I got vertical mouse offsets within a wxGLCanvas if the window
class of the native window handle is not of the type "kFloatingWindowClass".
I am able to bypass the problem if I display an info panel (wxPanel) over the
whole wxGlCanvas and if the user hides the info panel then the mouse offset
is gone.
Now my questions:
Is there a "simple" explanation for this behaviour?
Is it possible to use certain method calls to imitate info panel effect
without using the panel itself? I tried several combinations of Update() and
Refresh() calls of all involved components, but none of them worked so far.
Even the use of wxSizer couldn't help here.
Window hierarchy used by plugin-applications:
wxCustomTopLevelWindow (WindowRef provided by host-application)
wxPanel (parent window for all application panel)
wxPanel (application info panel)
wxPanel (application main panel)
wxPanel (opengl main panel)
wxGlCanvas (main opengl canvas)
Any ideas? Any help is very appreciated.