Page 1 of 1

My Window Manager

Posted: Fri Apr 04, 2008 12:54 pm
by lukem95
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):
Image

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):
Image

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):

Image

Image

The white dots are where the mouse has been.

Posted: Fri Apr 04, 2008 7:08 pm
by piranha
Thats cool......my simple 'windows' are rectangles of those extended ascii chars.....
And nothing else really. I'm going to wait a while before I really get graphics worked on.

-JL

Re: My Window Manager

Posted: Sat Nov 15, 2008 5:21 pm
by VolTeK
thats not bad, is better than sitting there for hours trying and hoping vesa can work in the right spots for you, i think ascii characters are a good idea, its not how good it looks, its if yu can get it to work. if it works, then its good :)

Re: My Window Manager

Posted: Sat Nov 15, 2008 7:03 pm
by Laksen
I'm working on a simple window manager myself, so this is relevant to my interest. How have you designed your application to window interaction mechanisms?

In my window manager the applications gets access to a bunch of drawing primitives and a canvas which is ofcourse "isolated" in the window manager process itself. Pretty much like how GDI+ works

Why not write a VM86 monitor so you can use VBE on real hardware?

I know this will probably be fixed at some time but your font rendering is severely hurting my eyes :P

Re: My Window Manager

Posted: Sat Nov 15, 2008 7:15 pm
by VolTeK
hey it sounds very cool, can i get a download, like i said it may look simple, but i like simple. not that im saying its bad, i just think its cool.

Re: My Window Manager

Posted: Sun Nov 16, 2008 4:44 am
by inflater
Hehe, back in the pascal PortixOS days I've coded "textographical" routines for drawing menus and colored ASCII windows, good thing I kept them and it's fun to convert them to ASM :)

But hey, graphics modes are more fun, good work. ;)

Re: My Window Manager

Posted: Mon Nov 17, 2008 1:47 am
by eddyb
look at mine.... i have no window management, all you see it's practically write to the screen. i borrowed the borders and corners and stuff from a win95 screenshot. if you want the code, i'll give you, coz it's only some drawing routines, not a window manager...
that's it: i have windowz on my screen
that's it: i have windowz on my screen
EDIT: the mouse windows are drawn when you click the mouse...

Re: My Window Manager

Posted: Mon Nov 17, 2008 8:29 am
by Zenith
Whoa, those look EXACTLY like Windows 95 windows :shock: - seriously, if you stick with those, Microsoft will probably sue you or something.

Oh well, it looks nice - I haven't gotten to a window manager yet...

Re: My Window Manager

Posted: Mon Nov 17, 2008 9:04 am
by Brynet-Inc
Zenith wrote:Whoa, those look EXACTLY like Windows 95 windows :shock: - seriously, if you stick with those, Microsoft will probably sue you or something.

Oh well, it looks nice - I haven't gotten to a window manager yet...
Never heard of ReactOS?