Hi David,

> I'm trying to find out how to have multiple windows sharing the same frame.
> I'm playing with FvwmTabs but I also want to experiment with a simpler
> implementation on my own.

Simpler? Hmmmm.

> I wrote something like the following in the main
> fvwm code.
> 
> Add tab: (client is the fw->wins.client from another frame)
>       XReparentWindow(dpy, client, fw->wins.parent, 0, 0);
>       XResizeWindow(dpy, client, fw->frame_g.width, fw->frame_g.height);
>       XLowerWindow(dpy, client);
>       XUnmapWindow(dpy, client);
> 
> Next tab: (fw->wins.client is advanced by a linked list)
>       XMapWindow(dpy, fw->wins.client);
>       XRaiseWindow(dpy, fw->wins.client);
>       XSaveContext(dpy, fw->wins.client, FvwmContext, (caddr_t) fw);
>       rectangle frame_g = fw->frame_g;
>       frame_force_setup_window(
>               fw, frame_g.x, frame_g.y, frame_g.width, frame_g.height,
>               True);
> 
> When I switch to another tab, the window works as normal except it doesn't
> recieve FocusIn/Out events. This stops the focus decor from changing when the
> mouse is in the window. When I switch back to the first tab, it works 
> properly.
> 
> There seems to be something special about the first client window because it
> was originally in that frame. I thought setting FvwmContext would give each
> client the exact same structure but it doesn't. HandleFocusIn is never called
> except for the first window. I'm just wondering, what is the solution to this?

You need to use XSetInputFocus().

SCoTT. :)

Reply via email to