[Gtk-sharp-list] event for window movement
Sun, 14 Mar 2004 13:55:23 -0500
On Sun, 2004-03-14 at 13:31 -0500, John Luke wrote:
> On Sun, 2004-03-14 at 10:05 -0800, Ofer Achler wrote:
> > Hello,
> > I'm trying to attach to an event that happens when a window is moved
> > (preferably when a widget is moved)
> > Configure_event doesn't do it, it seems to get called when a resize event
> > occurs or other things of that nature, but not when a window is moved.
> > My question is does such an event exist?
> > Thanks =)
> I think configure_event is right for this:
> but it doesn't seem to ever be fired in Gtk#, so I think it is a bug.
> Attached is a small test.
mmarker let me know that this is apparently one of the situations where
Gdk is trapping the events and you need to use Gdk.EventMask. However,
I added that and it still doesn't work. Perhaps there is another
EventMask that I need or it is window manager dependent. I'll leave it
up to others to decide.
new test attached
Content-Disposition: attachment; filename=T.cs
Content-Type: text/x-csharp; name=T.cs; charset=utf-8
static void Main ()
Window win = new Window ("test");
win.DeleteEvent += new DeleteEventHandler (OnDelete);
win.ConfigureEvent += new ConfigureEventHandler (OnConfigure);
win.AddEvents ((int) Gdk.EventMask.ExposureMask | (int) Gdk.EventMask.VisibilityNotifyMask | (int) Gdk.EventMask.AllEventsMask);
static void OnConfigure (object o, ConfigureEventArgs args)
static void OnDelete (object o, DeleteEventArgs args)