DeadHead@cup.portal.com (Bruce M Ong) (02/07/91)
Hi - I have an application that wants to tell the window manager to 1) not let the user resize it, 2) not let the user move it, and 3) not let the user to iconify it. I cant find the resources that you can set to let the window manager know... Where should I look for answers? I am doing DecWindow, but I am pretty sure this should be an X tk problem, not a problem for any particular gui. any hints would be appreciated... and please email - thanks! /bruce deadhead@cup.portal.com
klee@wsl.dec.com (Ken Lee) (02/08/91)
In article <38986@cup.portal.com>, DeadHead@cup.portal.com (Bruce M Ong) writes: |> I have an application that wants to tell the window manager |> to 1) not let the user resize it, 2) not let the user move it, and 3) not |> let the user to iconify it. Check the override-redirect window attribute. -- Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@wsl.dec.com uucp: uunet!decwrl!klee
dshr@eng.sun.COM (David Rosenthal) (02/08/91)
Ken Lee writes: > In article <38986@cup.portal.com>, DeadHead@cup.portal.com (Bruce M Ong) writes: > |> I have an application that wants to tell the window manager > |> to 1) not let the user resize it, 2) not let the user move it, and 3) not > |> let the user to iconify it. > > Check the override-redirect window attribute. > And read the ICCCM, sections 4.1.10, 4.2.2, and 4.2.9. In general, applications should *not* use override-redirect on their top-level windows for the purposes you suggest, only on pop-ups such as warnings. An application that has top-level non-pop-up windows that cannot be resized, moved and iconified is a very anti-social application indeed. The ICCCM is a set of rules that try to make applications coexist with each other, and this is why it deprecates things like windows that cannot be resized, moved or iconified. There are some applications whose job is to be anti-social, like lockscreen. Other than that, you should take the time to be polite to the user and allow them to decide whether they want the window to be resized, moved or iconified. Anything less is simply rude. If you really want to constrain the user's environment, the right thing to do isn't to try to fake out a general window manager. It is to run a window manager that provides the constrained environment to applications that can also operate in the general environment (for example, when you as the developer are debugging them). David.
mouse@lightning.mcrcim.mcgill.EDU (02/08/91)
> I have an application that wants to tell the window manager to 1) not > let the user resize it, This was mentioned here a while back. The closest you can come is to set the minimum-size and maximum-size values in the size hints to the same size. This asks (not tells) the window manager to keep it that size. Not all window managers will pay attention. > 2) not let the user move it, I know of no way whatever to achieve this. You can try to move yourself back if you get moved, but once again there is no guarantee the window manager will pay any attention. > and 3) not let the user to iconify it. I know of no way to do this. I suppose you could try to play games with your icon-window, but that strikes me as very fragile. You could always ask the window manager to deiconify you whenever you get iconified, but once again the window manager is free to ignore you. Depending on the purpose of the window, you might consider using an override-redirect window. They are rarely appropriate (pop-ups are about the only common thing for which override-redirects are really suited), but this might be one of those cases. Of course, various specific window managers may implement private protocols which allow clients to ask for things like this. If you are willing to depend on running under some specific wm, you might be able to use one of these. Why do you believe your application has to have a fixed size/position and mustn't be iconified? (That strikes me as a very antisocial way for an application to behave.) You may be trying to solve the wrong problem.... der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu