🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #2893

X-Windows like mouse/focus behavior (here's how)

#2893
From: Larry Salomon Jr.
Date: Wed, 16 Dec 1992 14:50
17 lines
1130 bytes
For those interested, I've seen quite a few requests for this behavior.
Although I haven't tried the below, it should work; no guarantees, however.

The strategy here is to install a system-wide HK_INPUT hook which follows
the WM_MOUSEMOVE messages.  You can easily call WinWindowFromPoint() to
obtain the window handle under the mouse, follow the parent chain until
you reach the top-level window, and call WinSetFocus() to give it the focus.

Anyone want to give it a try?  If so, please post any changes to the above
here and place the source on ftp-os2.nmsu.edu.  Thanks.

Cheers,
Q
-- 
"If you choose not to decide, you  | "My other body is in the shop" - seen
 still have made a choice" - Rush  |  on a T-shirt
------------------------------------------------------------------------
Technical Details
Message-ID: <1992Dec16.145017.23804@panix.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!panix!os2man

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!panix!os2man
From: os2man@panix.com (Larry Salomon Jr.)
Subject: X-Windows like mouse/focus behavior (here's how)
Message-ID: <1992Dec16.145017.23804@panix.com>
Date: Wed, 16 Dec 1992 14:50:17 GMT
Organization: PANIX Public Access Unix, NYC
Lines: 17