Archived

This topic is now archived and is closed to further replies.

LonelyStar

X11: Creating a non-resizable window

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
quote:
Original post by pkelly83
SDL can make non resizeable windows as far as I can remember, (...)


I''m doing this:

screen = SDL_SetVideoMode(1024, 768, 32, SDL_OPENGL );


and get a non-resizable window, so it seems to be standard for SDL at least when doing GL stuff.

Share this post


Link to post
Share on other sites
quote:
Original post by LonelyStar
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!


It''s not resizable because the WM respects its request to be non-resizable. You could, concievably, have a wm that didn''t do it, and the app would have to just deal with the wm resizing it.

Share this post


Link to post
Share on other sites
I hate windows which expect to be a certain size, because my favorite window manager (Ion) totally ignores a window''s request to change its size. If you want your programs to be very usable, test them in Ion (or ratpoison) before releasing.

Zorx (a Puzzle Bobble clone)
Discontinuity (an animation system for POV-Ray)

Share this post


Link to post
Share on other sites