RE: changing active window

[email protected]
Newsgroups gmane.comp.handhelds.matchbox
Message-ID <[email protected]>
I already found that code from the tasks.c 
Thanks for reply and thanks for your great job on the matchbox. :) 

Heechul. 

> -----Original Message-----
> From: Matthew Allum [mailto:[email protected]]
> Sent: Tuesday, November 04, 2003 5:16 AM
> To: [email protected]
> Cc: [email protected]
> Subject: Re: changing active window
> 
> 
> 
> Hi;
> 
> To change the active window, you want to send a message to the root
> window rather than change any properties. For example, something like
> the following should do it;
> 
> void
> activate_window(Display *dpy, Window root, Window win_to_activate)
> {
>   XEvent ev;
>   Atom atom_net_active
>     = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False);
> 
>   memset(&ev, 0, sizeof ev);
>   ev.xclient.type = ClientMessage;
>   ev.xclient.window = win_to_active;
>   ev.xclient.message_type = atom_net_active;
>   ev.xclient.format = 32;
> 
>   ev.xclient.data.l[0] = 0;
> 
>   XSendEvent(dpy, root, False, SubstructureRedirectMask, &ev);
> }
> 
> 
> Also see code of desktop/modules/tasks.c 
> 
> Good Luck!
> 
>   -- Matthew
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.