I'm looking to create an invisible window for the processing of certain X events (sort of like NativeWindow
in Winforms). Is this possible in GTK#? Or do I need to manually create such a window using P/Invoke to the X libraries?
views:
182answers:
2
+1
A:
I'm not quite sure I understand what you're trying to do, but Window
s in Gtk are invisible by default. If you never set the visibility to true:
window.Visible = true;
or if you explicitly set it to false:
window.Visible = false;
it will remain invisible.
Edit: This is the real solution to Zach's problem:
I just checked the GTK source code, and you can call Realize() on a GTK Window to make the GTK window create its corresponding GDK Window. The GDK Window is immediately hooked into the X server when it is created.
Matthew
2010-03-01 20:14:12
Thanks for your answer! Is there anything I need to do to make sure the `Window` is connected to the X server, while still having the `Window` invisible?
Zach Johnson
2010-03-01 20:24:40
I'm not sure, I don't really know anything about X itself. You might find a better answer on the gtk-sharp-list mailing list (http://lists.ximian.com/mailman/listinfo/gtk-sharp-list).
Matthew
2010-03-01 21:57:45
I just checked the GTK source code, and you can call `Realize()` on a GTK Window to make the GTK window create its corresponding GDK Window. The GDK Window is immediately hooked into the X server when it is created.
Zach Johnson
2010-03-06 00:20:02
A:
There is also Gtk.Invisible class which is used for capturing events.
el.pescado
2010-04-11 19:46:29