OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 2:09 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re:handling mouse and keyboard events in the GUI service
PostPosted: Sun May 02, 2004 10:17 pm 
Messages from PS/2 Mice and USB mice pretending to be PS/2 mice are of a fixed size. If your 'message' is based on this packet - the choice is made.

On my GUI, the mouse is just another window in the linked list of windows. The basic design per window
{Window number,
Window owner,
Z-order,
X - size, Y - size, scale %
Top left corner X, Y,
Flags (Visible, invisible, border etc.)
}

Shell windows are owned by 0
Background Z is always 0xFFFFFFF - at the back and overwiteable.
Mouse window Z is always 0 - always on top (but can be disabled for full screen programs).

My interrupt procedure as I mentioned in previous post simply updates the co-ordinates of Top left corner.

As a result all mouse updating is seperated from the application.

The mouse message is then sent to the window that is visible at the location of the mouse. As a result I leave all handling of the message to the application unless the 'window' is owned by the OS. Invisble windows are ignored in the searching process.

Events arrive at applications regardless of whether their active or not - if you don't want a user to send info to a non active window, why did they click on it?
At the very least it means less work for me.

I totally agree with the complaint against 'messages going off elsewhere.' The only thing that I have found to combat this is to only allow an OS service to pre-empt user applications. One of the most stupid things about MSWindows is that user applications can switch to themselves - this is a gross failure of system security policy. Any application attempting to perform such a function should be terminated with extreme prejudice. (I'm passionate about having control over what's running on my system and where the information goes 8))

Winter just arrived - gotta go.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 166 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group