Step-3
Stay in your 3600/1 directory.
Copy a few more files in now.
$ cp ~gordon/public_html/3600/examples/1/* .
$ make
$ ./xwin89
You should see a small window pop up on your screen.
If not...
You may need to re-login to Odin, like this...
ssh -YC username@odin.cs.csub.edu
The YC options
Y says transfer to me the X11 window graphics
C says try to compress the transmission for efficiency
Try it now.
Here are some modifications to make in the program...
1. Change the background to a beautiful CSUB gold color.
--------------------------------------------------------
Use XSetForeground and XFillRectangle.
Look up these X functions on google.
Show where you found the information in a C-style comment.
2. When the mouse moves within the window, print an 'm' to terminal.
--------------------------------------------------------------------
Call the printf function.
Flush the output buffer with each call of printf.
Do not print a newline character!
3. Optional: Display some text in the window.
---------------------------------------------
man XDrawString
The text you print might be your name.
It might be some instructions such as:
Press 'A' key to see our school colors.
Then, each press of 'A' will change the window background color
to blue, gold, blue, gold, etc.