Hey, Cody,

Thank you.
I tried, but the result is still not right.
Here is my code:

using Gdk;
...
                        string [] dummy = new string [0];
                        Gdk.Global.InitCheck (ref dummy);
                        var win = Window.ForeignNew (0x6a00003); //0x6a00003 is 
the xid of
a gcalctool window, got from xwininfo.
                        win.Move (40, 40);      //this line works
                        win.Raise();    //this line has no effect
                        win.Focus(0u);  //this line has no effect

On Fri, Dec 4, 2009 at 11:24 AM, Cody Russell <brats...@gnome.org> wrote:
> On Fri, 2009-12-04 at 10:52 +0800, Matt Guo wrote:
>>
>> So how can I make a window focused with gdk-sharp by giving the native
>> X window id?
>
> Try window.Raise().  window.Focus() sets keyboard focus but does not
> necessarily affect the z-order.
>
>



-- 
B.R.
GUO Rui (Matt)
_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to