protected override void OnRealized()
{
WidgetFlags |= WidgetFlags.Realized | WidgetFlags.NoWindow;
GdkWindow = Parent.GdkWindow;
var attributes = new WindowAttr () {
WindowType = Gdk.WindowType.Child,
X = Allocation.X,
Y = Allocation.Y,
Width = Allocation.Width,
Height = Allocation.Height,
Wclass = WindowClass.InputOnly,
EventMask = (int)(
EventMask.ButtonPressMask |
EventMask.ButtonReleaseMask |
EventMask.KeyPressMask |
EventMask.KeyReleaseMask |
EventMask.EnterNotifyMask |
EventMask.LeaveNotifyMask)
};
var attributes_mask =
WindowAttributesType.X |
WindowAttributesType.Y |
WindowAttributesType.Wmclass;
input_window = new Gdk.Window (GdkWindow, attributes, attributes_mask) {
UserData = Handle
};
base.OnRealized ();
}