Advertisement

X11: Creating a non-resizable window

Started by April 21, 2004 09:27 AM
12 comments, last by LonelyStar 20 years, 6 months ago
Hi everybody, How do I create a window which is not resizable under X11? Thanks!
I don''t know exactly, but if I were to want to find out, I''d probably go look closely at the WM hints you can set on the window. One of them is probably non-resizeable.
Advertisement
Creating a non-resizable window has to do with the WM (for instance, in my WM it''s impossible), and the atoms you set. What toolkit are you working with, or is it pure Xlib?


"There is no dark side of the moon really,
As a matter of fact, its all dark."
pure xlib
Like has been said, it's up to the window manager to care if you set the hint, but here's the documentation for the standard way to do it: Extended Window Manager Hints: _NET_WM_ALLOWED_ACTIONS. I don't think there was an ICCCM convention that did the same thing, but I could be wrong. Edit: hit return randomly in there for some reason.

[edited by - Null and Void on April 21, 2004 7:49:05 PM]
I checked ICCCM, it did not as far as I could find.
Advertisement
the other way is the brute force way. just put a callback in the resize (it''s in fact configure) event and whenever the window shape changes in a direction you don''t want just ajust it off the point. as far as i know this event is called as soon as the resize is done but before any updates on the screen are carried out (thus the new size is in the x-server, but not on screen yet).

never tried it out yet because the philosophy in x11 is to not force a window shape onto the user but having to get along with whatever you get.

Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine

That is a Bad Thing, part of the ICCCM says that clients should not fight with the window manager about things like size and placement.


"There is no dark side of the moon really,
As a matter of fact, its all dark."
Hi,
after your responses, I gave up the thought of makeing my OpenGL window non-rezizeble under Linux.
But now, another thought suddenly poped into my mind:
xmms is not resizable, and if I create a dialog-window with wxWindows (wxGTK) it is not resizable too.
How to they do that? Can''t I do it the same way?
Thanks!
SDL can make non resizeable windows as far as I can remember, but it''s been 3 months since I used SDL so I could be wrong.

This topic is closed to new replies.

Advertisement