Click to See Complete Forum and Search --> : Which file contains source code of this?


joeshro
11-11-2002, 10:40 PM
I use redhat7.3 ( installed it for learning only, and only for 1 week ). Now I want to read the source code of the windows manager, not that tool named "windows manager", but those how the linux windows are managed. I refer the one who active a window, raise a window, and ask a specified window to show itself, you know?
Tell me the file name, many thanks!

TacKat
11-11-2002, 11:34 PM
There are lots of window managers, you'll have to be more specific. Do you use the one supplied with KDE or GNOME or just run a straight WM like Fluxbox or WindowMaker?

bskahan
11-11-2002, 11:48 PM
redhat does not generally install the source code for programs by default. If you want to see the code, go to http://www.freshmeat.net and search for the window manager you'd like to look at. Download the the tar.gz file for the window manager (this is called a source tarball, as opposed to redhat's precompiled binary .rpm).

When you unpack the .tar.gz file (tar zxfv file.tar.gz) it will "unzip" and you will have a directory with all the files needed to compile the program yourself, or to look at the code.

note: there are source .rpms, but thats another story.

joeshro
11-12-2002, 01:41 AM
Inside the windows system, there must be some codes to be implemented as to manage the windows created by user/application, it can raise a window to the top of the z-order, or hide a window, or let a hided window show on the screen again, also when it detect a specified window should paint itself, it will send message to the window to ask it paint himself. Imagine now we call it WM, it contains all the windows handles inside, he knows which windows now is at the topmost, which one is minimized... . In a word, he knows most of the things about windows that have been created and when a window is creating, its handle will be recorded by WM for the managing usage.
Where are these codes?


-----------------------------
Have I make things clear?

matt95z
11-12-2002, 01:48 AM
I am not sure if I am going to help or not but the programs that TacKat mentioned ARE the windows managers you asked about. I am new but if I understand this all correctly they should contain the source code you want to read.

bskahan
11-12-2002, 01:58 AM
actually most of what you're looking for can be found in the X source, documentation on all of the library functions can be found here:
http://www.xfree86.org/4.2.1/manindex3.html

bwkaz
11-12-2002, 02:00 PM
It sounds like you're used to the way Windows works. X is not Windows! There is no such thing as a message, no such thing as a window handle (well, there is, but not in the way Windows uses them, anyway), and a ton of other differences.

TacKat
11-12-2002, 09:20 PM
Originally posted by joeshro
Inside the windows system, there must be some codes to be implemented as to manage the windows created by user/application

Indeed there is, but the big thing to note is that there is not just ONE window manager, there are LOTS of them. Fluxbox, Enlightenment, Sawfish, Blackbox, Waimea, Window Maker, and on and on. These are all window managers. Unlike Windows where there is *the* window manager, here there are lots and lots of them. The source code for each of them is different from the others so you have to specify which one it is that you want to look at.

binaryDigit
11-13-2002, 02:19 AM
http://www.the-labs.com/X11/XLib-Manual/
http://tronche.com/gui/x/icccm/

i believe those documents should answer your questions.
the 'messages' you're talking about are called atoms. and they are discussed more in depth in the second link (the Inter-client communication conventions manual)
The first link is the Xlib manual which discusses how to do things like draw windows, move windows, etc...

have fun
:D