Re: forcing window/dialog focus until actioned



Tom Knowles <tom peters co uk> writes: 
I'm using fvwm2 becuase it seemed to offer the leanest, least interfering and 
most appropriate bed. I have tried the others, but without spending 
unavailable time I've found nothing more suitable to this kind of
project.

You could also try running with no window manager at all, though you
probably need to add some calls to XSetInputFocus() to your code then 
to move the focus around.

1. In general, is there a way of forcing a dialog or popup to remain visible 
until responded to?
I've found that if a generic prompt/question is called, it is not really 
feasible to say which window will be underneath it and that touching same 
window, particularly the perimeter will cause that window to blot out the 
prompt which, as it happens, may be a necessary in-line function. The prompt 
is modal and thus, as far as the user is cocerned the app is frozen.

If you call gtk_window_set_transient_for() to make the dialog
transient for the parent, many window managers will then keep the
dialog on top of the parent. I can't say whether fvwm2 is such a WM.

I tried using popup rather than toplevel, which looks and performs more 
appropriately, but, the popup seems transparent to desktop menu clicks and, 
worse, on some macihine/OS configurations is completely inactive.

POPUP means "ignore the window manager" in effect. So no frame on the
window, window manager will not focus the window on click, etc.

You could use POPUP but you'd need to do some of your own work, such
as XSetInputFocus().

2. Is it possible to lose the mouse cursor, it just gets in the way
!

Set it to a 1x1 pixmap with a 1x1 mask that masks off the pixel. Then
it will be invisible.

(To lose it for the whole screen you usually need to set the cursor
for the root window, after the window manager has already done so.)

Havoc



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