gdk_window_ensure_native woes


I'm having issues with newer GTK versions, since using client-side windows was introduced, due to OpenGl.
All development is in python, with C++ code doing the "real" OpenGL" stuff, and we are currently obliged to use older (2.12 pyGtk), which means we can't use GdkWindow.ensure_native. 

Issue arrises because the only possible time and place to call upon gdk_window_ensure_native is when our Widget is placed on its parent window - we cannot rely that those using our widget will call ensure_native before placing the widget on it. 
For some reason, calling ensure_native at this moment (realizing the widget)  doesn't work and our OpenGl context is drawn on the whole window instead just the widget. 

It all works fine if GDK_NATIVE_WINDOWS is declared in environment, but that is not an option since it can break other apps.

How to tackle this? 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]