Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
32ee1682
Commit
32ee1682
authored
May 09, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use 32-bit hook functions where possible. Cleaned up a couple of
16-bit type uses.
parent
e76218dd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
55 deletions
+39
-55
focus.c
windows/focus.c
+2
-3
message.c
windows/message.c
+27
-39
win.c
windows/win.c
+3
-3
winpos.c
windows/winpos.c
+7
-10
No files found.
windows/focus.c
View file @
32ee1682
...
...
@@ -113,8 +113,7 @@ HWND WINAPI SetFocus( HWND hwnd )
}
/* call hooks */
if
(
HOOK_CallHooks16
(
WH_CBT
,
HCBT_SETFOCUS
,
(
WPARAM16
)
hwnd
,
(
LPARAM
)
hWndFocus
)
)
if
(
HOOK_CallHooksA
(
WH_CBT
,
HCBT_SETFOCUS
,
(
WPARAM
)
hwnd
,
(
LPARAM
)
hWndFocus
)
)
goto
CLEANUP
;
/* activate hwndTop if needed. */
...
...
@@ -133,7 +132,7 @@ HWND WINAPI SetFocus( HWND hwnd )
}
else
/* NULL hwnd passed in */
{
if
(
HOOK_CallHooks
16
(
WH_CBT
,
HCBT_SETFOCUS
,
0
,
(
LPARAM
)
hWndFocus
)
)
if
(
HOOK_CallHooks
A
(
WH_CBT
,
HCBT_SETFOCUS
,
0
,
(
LPARAM
)
hWndFocus
)
)
goto
CLEANUP
;
/* Get the current focus from the perQ data of the current message Q */
...
...
windows/message.c
View file @
32ee1682
...
...
@@ -100,18 +100,18 @@ static void MSG_SendParentNotify(WND* wndPtr, WORD event, WORD idChild, LPARAM l
*/
static
DWORD
MSG_TranslateMouseMsg
(
HWND
hTopWnd
,
DWORD
first
,
DWORD
last
,
MSG
*
msg
,
BOOL
remove
,
WND
*
pWndScope
,
INT
16
*
pHitTest
,
POINT16
*
pS
creen_pt
,
BOOL
*
pmouseClick
)
INT
*
pHitTest
,
POINT
*
s
creen_pt
,
BOOL
*
pmouseClick
)
{
static
DWORD
dblclk_time_limit
=
0
;
static
UINT16
clk_message
=
0
;
static
HWND16
clk_hwnd
=
0
;
static
POINT
16
clk_pos
=
{
0
,
0
}
;
static
POINT
clk_pos
;
WND
*
pWnd
;
HWND
hWnd
;
INT16
ht
,
hittest
;
UINT
message
=
msg
->
message
;
POINT16
screen_pt
,
pt
;
POINT16
pt
;
HANDLE16
hQ
=
GetFastQueue16
();
MESSAGEQUEUE
*
queue
=
QUEUE_Lock
(
hQ
);
BOOL
mouseClick
=
((
message
==
WM_LBUTTONDOWN
)
||
...
...
@@ -191,8 +191,7 @@ static DWORD MSG_TranslateMouseMsg( HWND hTopWnd, DWORD first, DWORD last,
}
}
/* save mouse position */
screen_pt
=
pt
;
*
pScreen_pt
=
pt
;
CONV_POINT16TO32
(
&
pt
,
screen_pt
);
if
(
hittest
!=
HTCLIENT
)
{
...
...
@@ -221,9 +220,9 @@ static DWORD MSG_TranslateMouseMsg( HWND hTopWnd, DWORD first, DWORD last,
{
/* set conditions */
dblclk_time_limit
=
msg
->
time
;
clk_message
=
msg
->
message
;
clk_hwnd
=
hWnd
;
clk_pos
=
screen_pt
;
clk_message
=
msg
->
message
;
clk_hwnd
=
hWnd
;
clk_pos
=
*
screen_pt
;
}
else
/* got double click - zero them out */
dblclk_time_limit
=
clk_hwnd
=
0
;
...
...
@@ -261,8 +260,8 @@ END:
* SYSQ_MSG_ACCEPT - the translated message must be passed to the user
* MSG_PeekHardwareMsg should return TRUE.
*/
static
DWORD
MSG_ProcessMouseMsg
(
MSG
*
msg
,
BOOL
remove
,
INT
16
hittest
,
POINT
16
screen_pt
,
BOOL
mouseClick
)
static
DWORD
MSG_ProcessMouseMsg
(
MSG
*
msg
,
BOOL
remove
,
INT
hittest
,
POINT
screen_pt
,
BOOL
mouseClick
)
{
WND
*
pWnd
;
HWND
hWnd
=
msg
->
hwnd
;
...
...
@@ -277,19 +276,13 @@ static DWORD MSG_ProcessMouseMsg( MSG *msg, BOOL remove, INT16 hittest,
if
(
HOOK_IsHooked
(
WH_MOUSE
))
{
SYSQ_STATUS
ret
=
0
;
MOUSEHOOKSTRUCT16
*
hook
=
SEGPTR_NEW
(
MOUSEHOOKSTRUCT16
);
if
(
hook
)
{
hook
->
pt
=
screen_pt
;
hook
->
hwnd
=
hWnd
;
hook
->
wHitTestCode
=
hittest
;
hook
->
dwExtraInfo
=
0
;
ret
=
HOOK_CallHooks16
(
WH_MOUSE
,
remove
?
HC_ACTION
:
HC_NOREMOVE
,
message
,
(
LPARAM
)
SEGPTR_GET
(
hook
)
);
SEGPTR_FREE
(
hook
);
}
if
(
ret
)
MOUSEHOOKSTRUCT
hook
;
hook
.
pt
=
screen_pt
;
hook
.
hwnd
=
hWnd
;
hook
.
wHitTestCode
=
hittest
;
hook
.
dwExtraInfo
=
0
;
if
(
HOOK_CallHooksA
(
WH_MOUSE
,
remove
?
HC_ACTION
:
HC_NOREMOVE
,
message
,
(
LPARAM
)
&
hook
))
{
retvalue
=
MAKELONG
((
INT16
)
SYSQ_MSG_SKIP
,
hittest
);
goto
END
;
...
...
@@ -441,8 +434,8 @@ static DWORD MSG_ProcessKbdMsg( MSG *msg, BOOL remove )
WIN_ReleaseWndPtr
(
pWnd
);
}
return
(
HOOK_CallHooks
16
(
WH_KEYBOARD
,
remove
?
HC_ACTION
:
HC_NOREMOVE
,
LOWORD
(
msg
->
wParam
),
msg
->
lParam
)
return
(
HOOK_CallHooks
A
(
WH_KEYBOARD
,
remove
?
HC_ACTION
:
HC_NOREMOVE
,
LOWORD
(
msg
->
wParam
),
msg
->
lParam
)
?
SYSQ_MSG_SKIP
:
SYSQ_MSG_ACCEPT
);
}
...
...
@@ -595,8 +588,8 @@ static BOOL MSG_PeekHardwareMsg( MSG *msg, HWND hwnd, DWORD first, DWORD last,
for
(
qmsg
=
sysMsgQueue
->
firstMsg
;
qmsg
;
qmsg
=
nextqmsg
)
{
INT
16
hittest
;
POINT
16
screen_pt
;
INT
hittest
;
POINT
screen_pt
;
BOOL
mouseClick
;
*
msg
=
qmsg
->
msg
;
...
...
@@ -686,21 +679,16 @@ static BOOL MSG_PeekHardwareMsg( MSG *msg, HWND hwnd, DWORD first, DWORD last,
if
(
HOOK_IsHooked
(
WH_CBT
))
{
if
(
msgType
==
KEYBOARD_MSG
)
HOOK_CallHooks16
(
WH_CBT
,
HCBT_KEYSKIPPED
,
HOOK_CallHooksA
(
WH_CBT
,
HCBT_KEYSKIPPED
,
LOWORD
(
msg
->
wParam
),
msg
->
lParam
);
else
if
(
msgType
==
MOUSE_MSG
)
{
MOUSEHOOKSTRUCT16
*
hook
=
SEGPTR_NEW
(
MOUSEHOOKSTRUCT16
);
if
(
hook
)
{
CONV_POINT32TO16
(
&
msg
->
pt
,
&
hook
->
pt
);
hook
->
hwnd
=
msg
->
hwnd
;
hook
->
wHitTestCode
=
HIWORD
(
status
);
hook
->
dwExtraInfo
=
0
;
HOOK_CallHooks16
(
WH_CBT
,
HCBT_CLICKSKIPPED
,
msg
->
message
&
0xffff
,
(
LPARAM
)
SEGPTR_GET
(
hook
)
);
SEGPTR_FREE
(
hook
);
}
MOUSEHOOKSTRUCT
hook
;
hook
.
pt
=
msg
->
pt
;
hook
.
hwnd
=
msg
->
hwnd
;
hook
.
wHitTestCode
=
HIWORD
(
status
);
hook
.
dwExtraInfo
=
0
;
HOOK_CallHooksA
(
WH_CBT
,
HCBT_CLICKSKIPPED
,
msg
->
message
,
(
LPARAM
)
&
hook
);
}
}
...
...
windows/win.c
View file @
32ee1682
...
...
@@ -980,7 +980,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
/* Call WH_SHELL hook */
if
(
!
(
wndPtr
->
dwStyle
&
WS_CHILD
)
&&
!
wndPtr
->
owner
)
HOOK_CallHooks
16
(
WH_SHELL
,
HSHELL_WINDOWCREATED
,
hwnd
,
0
);
HOOK_CallHooks
A
(
WH_SHELL
,
HSHELL_WINDOWCREATED
,
hwnd
,
0
);
TRACE
(
"created window %04x
\n
"
,
hwnd
);
retvalue
=
hwnd
;
...
...
@@ -1336,7 +1336,7 @@ BOOL WINAPI DestroyWindow( HWND hwnd )
/* Call hooks */
if
(
HOOK_CallHooks
16
(
WH_CBT
,
HCBT_DESTROYWND
,
hwnd
,
0L
)
)
if
(
HOOK_CallHooks
A
(
WH_CBT
,
HCBT_DESTROYWND
,
hwnd
,
0L
)
)
{
retvalue
=
FALSE
;
goto
end
;
...
...
@@ -1344,7 +1344,7 @@ BOOL WINAPI DestroyWindow( HWND hwnd )
if
(
!
(
wndPtr
->
dwStyle
&
WS_CHILD
)
&&
!
wndPtr
->
owner
)
{
HOOK_CallHooks
16
(
WH_SHELL
,
HSHELL_WINDOWDESTROYED
,
hwnd
,
0L
);
HOOK_CallHooks
A
(
WH_SHELL
,
HSHELL_WINDOWDESTROYED
,
hwnd
,
0L
);
/* FIXME: clean up palette - see "Internals" p.352 */
}
...
...
windows/winpos.c
View file @
32ee1682
...
...
@@ -1227,7 +1227,7 @@ UINT WINPOS_MinMaximize( WND* wndPtr, UINT16 cmd, LPRECT16 lpRect )
size
.
x
=
wndPtr
->
rectWindow
.
left
;
size
.
y
=
wndPtr
->
rectWindow
.
top
;
lpPos
=
WINPOS_InitInternalPos
(
wndPtr
,
size
,
&
wndPtr
->
rectWindow
);
if
(
lpPos
&&
!
HOOK_CallHooks
16
(
WH_CBT
,
HCBT_MINMAX
,
wndPtr
->
hwndSelf
,
cmd
))
if
(
lpPos
&&
!
HOOK_CallHooks
A
(
WH_CBT
,
HCBT_MINMAX
,
wndPtr
->
hwndSelf
,
cmd
))
{
if
(
wndPtr
->
dwStyle
&
WS_MINIMIZE
)
{
...
...
@@ -1722,7 +1722,6 @@ void WINAPI SetInternalWindowPos( HWND hwnd, UINT showCmd,
*/
BOOL
WINPOS_SetActiveWindow
(
HWND
hWnd
,
BOOL
fMouse
,
BOOL
fChangeFocus
)
{
CBTACTIVATESTRUCT16
*
cbtStruct
;
WND
*
wndPtr
=
0
,
*
wndTemp
;
HQUEUE16
hOldActiveQueue
,
hNewActiveQueue
;
MESSAGEQUEUE
*
pOldActiveQueue
=
0
,
*
pNewActiveQueue
=
0
;
...
...
@@ -1759,14 +1758,12 @@ BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus)
TRACE
(
"no current active window.
\n
"
);
/* call CBT hook chain */
if
((
cbtStruct
=
SEGPTR_NEW
(
CBTACTIVATESTRUCT16
)))
{
cbtStruct
->
fMouse
=
fMouse
;
cbtStruct
->
hWndActive
=
hwndActive
;
bRet
=
(
BOOL
)
HOOK_CallHooks16
(
WH_CBT
,
HCBT_ACTIVATE
,
(
WPARAM16
)
hWnd
,
(
LPARAM
)
SEGPTR_GET
(
cbtStruct
)
);
SEGPTR_FREE
(
cbtStruct
);
if
(
bRet
)
goto
CLEANUP_END
;
if
(
HOOK_IsHooked
(
WH_CBT
))
{
CBTACTIVATESTRUCT
cbt
;
cbt
.
fMouse
=
fMouse
;
cbt
.
hWndActive
=
hwndActive
;
if
(
HOOK_CallHooksA
(
WH_CBT
,
HCBT_ACTIVATE
,
hWnd
,
(
LPARAM
)
&
cbt
))
goto
CLEANUP_END
;
}
/* set prev active wnd to current active wnd and send notification */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment