how can I create a non-border, non-maximize/minimize/close window ( for a splash screen ) in linux to initialize OpenGL???.
I use the glXCreateWindow/glXCreateSimpleWindow and got OpenGL well initialized, but the window has border and also the minimize/maximize/close buttons that I dont want…
I think I have to use a thing called “decorators” but can’t use Motif/other thing… must be XLib-pure code…
err…are they still there? actually they shouldn’t. the above code should create a borderless window without title bar and without any other decoration.
what exactly does your window look like- can you link a screenshot? and maybe some information about your system could help. which linux distribution, kde or gnome etc…
i’m sorry to say that my wisdom ends here…all i can say is that window decorations are managed by the window manager- unless you set the override_redirect flag to override the window manager, as shown above.
well, maybe you could just try to find a small linux app with modified window decorations, download the source code and try to find out how it is done. and, of course, when you have found out: post the answer here. i’ve always wanted to know how to do that
Perhaps look at the source to wxWidgets? I know their window creation code allows you to specify what boxes you want displayed. (at least on windows it works - so I imagine they have code to do the same thing for linux)
the above code removes the minimize/maximize decorations; the close button is still there but doesn’t have an effect. i found something similar somewhere in the web and modified it; now it seems to work but i have to admit that i still don’t completely understand it
the #defines and the MotifWmHints structure are usually included in MwmUtil.h, which comes with motif or lesstif, so you might not have have it.
it seems to be important that you call XInternAtom before the window is mapped with XMapWindow.
well, that’s all i know. play around with it; i hope you get what you want
That sounds promising, Rigid!!!. Very good link, thx!
However, I don’t want to use Motif/OpenMotif/Lesstif libraries 8( Need, if possible, pure Xlib code.
I will try to see some source code to discover how to to this … but I suspect is not going to be easy because the window manager places the decorations like it wants and you can only set “hints” which probably will be ignored 8(
Originally posted by santyhammer: However, I don’t want to use Motif/OpenMotif/Lesstif libraries 8( Need, if possible, pure Xlib code.
well, you don’t
XInternAtom and XChangeProperty are Xlib functions. the #defines and the MotifWmHints structure are taken from a lesstif header file, not from a library. if you define them in your source code the way i did, you don’t even need that header file.
just try it…after you have compiled the source, use ‘ldd’ on the binary executable. ldd prints the libraries which will be loaded when you start the executable, and you will see that libXm.so (for motif/lesstif) is not in the list.