[Gtk-sharp-list] event for window movement
John Luke
jluke@users.sourceforge.net
Sun, 14 Mar 2004 13:31:53 -0500
--=-Ou/u9tJRHPY7fX7As9td
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
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:
http://mail.gnome.org/archives/gtk-list/2003-April/msg00121.html
but it doesn't seem to ever be fired in Gtk#, so I think it is a bug.
Attached is a small test.
--=-Ou/u9tJRHPY7fX7As9td
Content-Disposition: attachment; filename=T.cs
Content-Type: text/x-csharp; name=T.cs; charset=utf-8
Content-Transfer-Encoding: 7bit
using System;
using Gtk;
class T
{
static void Main ()
{
Application.Init ();
Window win = new Window ("test");
win.DeleteEvent += new DeleteEventHandler (OnDelete);
win.ConfigureEvent += new ConfigureEventHandler (OnConfigure);
win.ShowAll ();
Application.Run ();
}
static void OnConfigure (object o, ConfigureEventArgs args)
{
Console.WriteLine ("moved?");
}
static void OnDelete (object o, DeleteEventArgs args)
{
Application.Quit ();
}
}
--=-Ou/u9tJRHPY7fX7As9td--