Re: active window



On Wednesday 29 November 2006 03:29, sunzysjzri wrote:
> hi, i want to send a message to WM to acitve an specific window, but it
> seems to be useless. why?
>
> void
> om_send_Xclimsgwm(Display *dpy, Window win)
> {
>     XClientMessageEvent xev;
>
>     xev.type = ClientMessage;
>     xev.window = win;
>     xev.message_type = atoms[_NET_ACTIVE_WINDOW];
>     xev.format = 32;
>     xev.data.l[0] = 1;
>     xev.data.l[1] = GDK_CURRENT_TIME;
>     xev.data.l[2] = my_win;
>     xev.data.l[3] = 0;
>     xev.data.l[4] = 0;
>
>     XSendEvent(dpy, win, False, 0L, (XEvent *) &xev);

 The message must be sent to the root window.

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l lunak suse cz , l lunak kde org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http//www.suse.cz



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]