[Gtk-sharp-list] How to make GdkWindow.Focus work?
Matt Guo
matt at mattguo.com
Mon Dec 7 20:26:27 EST 2009
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 <bratsche at 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)
More information about the Gtk-sharp-list
mailing list