My Window Manager
Posted: Fri Apr 04, 2008 12:54 pm
Seeing as theres been a few topics with it mentioned lately, i thought i'd make an annoucement thread, to track the progress of my WM, just in case the unlikely scenario that people are interested arrises ^_^
anyway... wasting very little more time:
*drum roll please*
*actually screw the drum roll, ill do a little history of it so far*
History
I decided to start making my GUI after getting frustrated with something, I think it was my multitasking. I began reading up on UI's and soon after that implemented a VGA driver using a lot of theory and reading Chris Giese's code. It worked well, but the res... sucked basically.
Very first VGA primitives (early feb):
I then came up with an idea about using buffers for the data in each window. I also became depressed using my simple VGA driver, and wrote a basic VESA driver (Well... its nearly identical to every other Bochs driver, simple as it is) for Bochs VBE, thankyou to Jal and JamesM for a few queries i had. I took a little break and got my Multitasking working during this time too, it didnt take me a month just to get this sorted
Anyway, i posted a thread on the Theory forum discussing my buffer idea, and starting implementing it whilst waiting for replies. The replies came in, and i was confronted with the notion that it was slower than many other solutions. Thus i decided to modify it slightly, and use a mixture of bitmaps, buffers and CPU loops checking for changed windows. Not as quick as it could be, but quicker.
My first window drawn using WM, showing the shell. There is an issue with the text starting half way down the window here (a week ago):
And thus i got to the state that i was in earlier today, when i decided to work on being able to manipulate this gui, more than just typing and it processing the text (in my VERY basic shell).
Updates
Ok this is where I will add images and descriptions to what I have implemented/debugged/thought
04.04.08
I started by opening my PS/2 mouse driver, and improving it to get the button states, and making it print a simple white pixel in its location. This was more for debugging than anything, and i'll get round to making this an actual cursor at some point (so expect another very minor update).
I then spent about two hours (with some shelf-stacking for my dad) writing a routine to change the windows focus when the mouse clicks on it. It was fairly simple actually, but i overlooked something for about an hour, and slapped myself when i realised what was causing my code to
fail.
Anyway, my mouse IRQ now changes the focus of the window (soon to be implemented in my WM, but i need to write a basic IPC code to pass messages) when it has been clicked on.
The changes to the window are saved, it is stored in the double buffer, and the previous window is then moved from the double buffer into the video memory. This should make it easy to write movement code, with less memory faff.
screenies (youll have to trust me, these aren't fake):
The white dots are where the mouse has been.
anyway... wasting very little more time:
*drum roll please*
*actually screw the drum roll, ill do a little history of it so far*
History
I decided to start making my GUI after getting frustrated with something, I think it was my multitasking. I began reading up on UI's and soon after that implemented a VGA driver using a lot of theory and reading Chris Giese's code. It worked well, but the res... sucked basically.
Very first VGA primitives (early feb):
I then came up with an idea about using buffers for the data in each window. I also became depressed using my simple VGA driver, and wrote a basic VESA driver (Well... its nearly identical to every other Bochs driver, simple as it is) for Bochs VBE, thankyou to Jal and JamesM for a few queries i had. I took a little break and got my Multitasking working during this time too, it didnt take me a month just to get this sorted
Anyway, i posted a thread on the Theory forum discussing my buffer idea, and starting implementing it whilst waiting for replies. The replies came in, and i was confronted with the notion that it was slower than many other solutions. Thus i decided to modify it slightly, and use a mixture of bitmaps, buffers and CPU loops checking for changed windows. Not as quick as it could be, but quicker.
My first window drawn using WM, showing the shell. There is an issue with the text starting half way down the window here (a week ago):
And thus i got to the state that i was in earlier today, when i decided to work on being able to manipulate this gui, more than just typing and it processing the text (in my VERY basic shell).
Updates
Ok this is where I will add images and descriptions to what I have implemented/debugged/thought
04.04.08
I started by opening my PS/2 mouse driver, and improving it to get the button states, and making it print a simple white pixel in its location. This was more for debugging than anything, and i'll get round to making this an actual cursor at some point (so expect another very minor update).
I then spent about two hours (with some shelf-stacking for my dad) writing a routine to change the windows focus when the mouse clicks on it. It was fairly simple actually, but i overlooked something for about an hour, and slapped myself when i realised what was causing my code to
fail.
Anyway, my mouse IRQ now changes the focus of the window (soon to be implemented in my WM, but i need to write a basic IPC code to pass messages) when it has been clicked on.
The changes to the window are saved, it is stored in the double buffer, and the previous window is then moved from the double buffer into the video memory. This should make it easy to write movement code, with less memory faff.
screenies (youll have to trust me, these aren't fake):
The white dots are where the mouse has been.