Wednesday, 30 June 2010

What happened to XRaiseWindow() - part 2

Found the solution. On KDE (and probably on GNOME) window managers,
we need to raise a dialog to the top - but the WM will intercept
the call and flash the taskbar. ICCCM never knew we would have a task

Heres the code from CRiSP, culled from a posting on the net :

e.xclient.type = ClientMessage;
e.xclient.message_type = net_active_window;
e.xclient.display = xdsp->dpy;
e.xclient.window = win;
e.xclient.format = 32;[0] = 2l;[1] = CurrentTime;[2] = None;[3] = 0l;[4] = 0l;
XSendEvent( xdsp->dpy, DefaultRootWindow( xdsp->dpy), False, SubstructureRedirectMask|SubstructureNotifyMask, &e );

Now, i just need to fix the problem with the wrong widget getting
input focus when the dialog re-gets the focus back again.

Post created by CRiSP v10.0.2a-b5871

No comments:

Post a Comment