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
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
52 deletions
+36
-52
focus.c
windows/focus.c
+2
-3
message.c
windows/message.c
+24
-36
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 )
...
@@ -113,8 +113,7 @@ HWND WINAPI SetFocus( HWND hwnd )
}
}
/* call hooks */
/* call hooks */
if
(
HOOK_CallHooks16
(
WH_CBT
,
HCBT_SETFOCUS
,
(
WPARAM16
)
hwnd
,
if
(
HOOK_CallHooksA
(
WH_CBT
,
HCBT_SETFOCUS
,
(
WPARAM
)
hwnd
,
(
LPARAM
)
hWndFocus
)
)
(
LPARAM
)
hWndFocus
)
)
goto
CLEANUP
;
goto
CLEANUP
;
/* activate hwndTop if needed. */
/* activate hwndTop if needed. */
...
@@ -133,7 +132,7 @@ HWND WINAPI SetFocus( HWND hwnd )
...
@@ -133,7 +132,7 @@ HWND WINAPI SetFocus( HWND hwnd )
}
}
else
/* NULL hwnd passed in */
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
;
goto
CLEANUP
;
/* Get the current focus from the perQ data of the current message Q */
/* 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
...
@@ -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
,
static
DWORD
MSG_TranslateMouseMsg
(
HWND
hTopWnd
,
DWORD
first
,
DWORD
last
,
MSG
*
msg
,
BOOL
remove
,
WND
*
pWndScope
,
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
DWORD
dblclk_time_limit
=
0
;
static
UINT16
clk_message
=
0
;
static
UINT16
clk_message
=
0
;
static
HWND16
clk_hwnd
=
0
;
static
HWND16
clk_hwnd
=
0
;
static
POINT
16
clk_pos
=
{
0
,
0
}
;
static
POINT
clk_pos
;
WND
*
pWnd
;
WND
*
pWnd
;
HWND
hWnd
;
HWND
hWnd
;
INT16
ht
,
hittest
;
INT16
ht
,
hittest
;
UINT
message
=
msg
->
message
;
UINT
message
=
msg
->
message
;
POINT16
screen_pt
,
pt
;
POINT16
pt
;
HANDLE16
hQ
=
GetFastQueue16
();
HANDLE16
hQ
=
GetFastQueue16
();
MESSAGEQUEUE
*
queue
=
QUEUE_Lock
(
hQ
);
MESSAGEQUEUE
*
queue
=
QUEUE_Lock
(
hQ
);
BOOL
mouseClick
=
((
message
==
WM_LBUTTONDOWN
)
||
BOOL
mouseClick
=
((
message
==
WM_LBUTTONDOWN
)
||
...
@@ -191,8 +191,7 @@ static DWORD MSG_TranslateMouseMsg( HWND hTopWnd, DWORD first, DWORD last,
...
@@ -191,8 +191,7 @@ static DWORD MSG_TranslateMouseMsg( HWND hTopWnd, DWORD first, DWORD last,
}
}
}
}
/* save mouse position */
/* save mouse position */
screen_pt
=
pt
;
CONV_POINT16TO32
(
&
pt
,
screen_pt
);
*
pScreen_pt
=
pt
;
if
(
hittest
!=
HTCLIENT
)
if
(
hittest
!=
HTCLIENT
)
{
{
...
@@ -223,7 +222,7 @@ static DWORD MSG_TranslateMouseMsg( HWND hTopWnd, DWORD first, DWORD last,
...
@@ -223,7 +222,7 @@ static DWORD MSG_TranslateMouseMsg( HWND hTopWnd, DWORD first, DWORD last,
dblclk_time_limit
=
msg
->
time
;
dblclk_time_limit
=
msg
->
time
;
clk_message
=
msg
->
message
;
clk_message
=
msg
->
message
;
clk_hwnd
=
hWnd
;
clk_hwnd
=
hWnd
;
clk_pos
=
screen_pt
;
clk_pos
=
*
screen_pt
;
}
else
}
else
/* got double click - zero them out */
/* got double click - zero them out */
dblclk_time_limit
=
clk_hwnd
=
0
;
dblclk_time_limit
=
clk_hwnd
=
0
;
...
@@ -261,8 +260,8 @@ END:
...
@@ -261,8 +260,8 @@ END:
* SYSQ_MSG_ACCEPT - the translated message must be passed to the user
* SYSQ_MSG_ACCEPT - the translated message must be passed to the user
* MSG_PeekHardwareMsg should return TRUE.
* MSG_PeekHardwareMsg should return TRUE.
*/
*/
static
DWORD
MSG_ProcessMouseMsg
(
MSG
*
msg
,
BOOL
remove
,
INT
16
hittest
,
static
DWORD
MSG_ProcessMouseMsg
(
MSG
*
msg
,
BOOL
remove
,
INT
hittest
,
POINT
16
screen_pt
,
BOOL
mouseClick
)
POINT
screen_pt
,
BOOL
mouseClick
)
{
{
WND
*
pWnd
;
WND
*
pWnd
;
HWND
hWnd
=
msg
->
hwnd
;
HWND
hWnd
=
msg
->
hwnd
;
...
@@ -277,19 +276,13 @@ static DWORD MSG_ProcessMouseMsg( MSG *msg, BOOL remove, INT16 hittest,
...
@@ -277,19 +276,13 @@ static DWORD MSG_ProcessMouseMsg( MSG *msg, BOOL remove, INT16 hittest,
if
(
HOOK_IsHooked
(
WH_MOUSE
))
if
(
HOOK_IsHooked
(
WH_MOUSE
))
{
{
SYSQ_STATUS
ret
=
0
;
MOUSEHOOKSTRUCT
hook
;
MOUSEHOOKSTRUCT16
*
hook
=
SEGPTR_NEW
(
MOUSEHOOKSTRUCT16
);
hook
.
pt
=
screen_pt
;
if
(
hook
)
hook
.
hwnd
=
hWnd
;
{
hook
.
wHitTestCode
=
hittest
;
hook
->
pt
=
screen_pt
;
hook
.
dwExtraInfo
=
0
;
hook
->
hwnd
=
hWnd
;
if
(
HOOK_CallHooksA
(
WH_MOUSE
,
remove
?
HC_ACTION
:
HC_NOREMOVE
,
hook
->
wHitTestCode
=
hittest
;
message
,
(
LPARAM
)
&
hook
))
hook
->
dwExtraInfo
=
0
;
ret
=
HOOK_CallHooks16
(
WH_MOUSE
,
remove
?
HC_ACTION
:
HC_NOREMOVE
,
message
,
(
LPARAM
)
SEGPTR_GET
(
hook
)
);
SEGPTR_FREE
(
hook
);
}
if
(
ret
)
{
{
retvalue
=
MAKELONG
((
INT16
)
SYSQ_MSG_SKIP
,
hittest
);
retvalue
=
MAKELONG
((
INT16
)
SYSQ_MSG_SKIP
,
hittest
);
goto
END
;
goto
END
;
...
@@ -441,7 +434,7 @@ static DWORD MSG_ProcessKbdMsg( MSG *msg, BOOL remove )
...
@@ -441,7 +434,7 @@ static DWORD MSG_ProcessKbdMsg( MSG *msg, BOOL remove )
WIN_ReleaseWndPtr
(
pWnd
);
WIN_ReleaseWndPtr
(
pWnd
);
}
}
return
(
HOOK_CallHooks
16
(
WH_KEYBOARD
,
remove
?
HC_ACTION
:
HC_NOREMOVE
,
return
(
HOOK_CallHooks
A
(
WH_KEYBOARD
,
remove
?
HC_ACTION
:
HC_NOREMOVE
,
LOWORD
(
msg
->
wParam
),
msg
->
lParam
)
LOWORD
(
msg
->
wParam
),
msg
->
lParam
)
?
SYSQ_MSG_SKIP
:
SYSQ_MSG_ACCEPT
);
?
SYSQ_MSG_SKIP
:
SYSQ_MSG_ACCEPT
);
}
}
...
@@ -595,8 +588,8 @@ static BOOL MSG_PeekHardwareMsg( MSG *msg, HWND hwnd, DWORD first, DWORD last,
...
@@ -595,8 +588,8 @@ static BOOL MSG_PeekHardwareMsg( MSG *msg, HWND hwnd, DWORD first, DWORD last,
for
(
qmsg
=
sysMsgQueue
->
firstMsg
;
qmsg
;
qmsg
=
nextqmsg
)
for
(
qmsg
=
sysMsgQueue
->
firstMsg
;
qmsg
;
qmsg
=
nextqmsg
)
{
{
INT
16
hittest
;
INT
hittest
;
POINT
16
screen_pt
;
POINT
screen_pt
;
BOOL
mouseClick
;
BOOL
mouseClick
;
*
msg
=
qmsg
->
msg
;
*
msg
=
qmsg
->
msg
;
...
@@ -686,21 +679,16 @@ static BOOL MSG_PeekHardwareMsg( MSG *msg, HWND hwnd, DWORD first, DWORD last,
...
@@ -686,21 +679,16 @@ static BOOL MSG_PeekHardwareMsg( MSG *msg, HWND hwnd, DWORD first, DWORD last,
if
(
HOOK_IsHooked
(
WH_CBT
))
if
(
HOOK_IsHooked
(
WH_CBT
))
{
{
if
(
msgType
==
KEYBOARD_MSG
)
if
(
msgType
==
KEYBOARD_MSG
)
HOOK_CallHooks16
(
WH_CBT
,
HCBT_KEYSKIPPED
,
HOOK_CallHooksA
(
WH_CBT
,
HCBT_KEYSKIPPED
,
LOWORD
(
msg
->
wParam
),
msg
->
lParam
);
LOWORD
(
msg
->
wParam
),
msg
->
lParam
);
else
if
(
msgType
==
MOUSE_MSG
)
else
if
(
msgType
==
MOUSE_MSG
)
{
{
MOUSEHOOKSTRUCT16
*
hook
=
SEGPTR_NEW
(
MOUSEHOOKSTRUCT16
);
MOUSEHOOKSTRUCT
hook
;
if
(
hook
)
hook
.
pt
=
msg
->
pt
;
{
hook
.
hwnd
=
msg
->
hwnd
;
CONV_POINT32TO16
(
&
msg
->
pt
,
&
hook
->
pt
);
hook
.
wHitTestCode
=
HIWORD
(
status
);
hook
->
hwnd
=
msg
->
hwnd
;
hook
.
dwExtraInfo
=
0
;
hook
->
wHitTestCode
=
HIWORD
(
status
);
HOOK_CallHooksA
(
WH_CBT
,
HCBT_CLICKSKIPPED
,
msg
->
message
,
(
LPARAM
)
&
hook
);
hook
->
dwExtraInfo
=
0
;
HOOK_CallHooks16
(
WH_CBT
,
HCBT_CLICKSKIPPED
,
msg
->
message
&
0xffff
,
(
LPARAM
)
SEGPTR_GET
(
hook
)
);
SEGPTR_FREE
(
hook
);
}
}
}
}
}
...
...
windows/win.c
View file @
32ee1682
...
@@ -980,7 +980,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
...
@@ -980,7 +980,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
/* Call WH_SHELL hook */
/* Call WH_SHELL hook */
if
(
!
(
wndPtr
->
dwStyle
&
WS_CHILD
)
&&
!
wndPtr
->
owner
)
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
);
TRACE
(
"created window %04x
\n
"
,
hwnd
);
retvalue
=
hwnd
;
retvalue
=
hwnd
;
...
@@ -1336,7 +1336,7 @@ BOOL WINAPI DestroyWindow( HWND hwnd )
...
@@ -1336,7 +1336,7 @@ BOOL WINAPI DestroyWindow( HWND hwnd )
/* Call hooks */
/* Call hooks */
if
(
HOOK_CallHooks
16
(
WH_CBT
,
HCBT_DESTROYWND
,
hwnd
,
0L
)
)
if
(
HOOK_CallHooks
A
(
WH_CBT
,
HCBT_DESTROYWND
,
hwnd
,
0L
)
)
{
{
retvalue
=
FALSE
;
retvalue
=
FALSE
;
goto
end
;
goto
end
;
...
@@ -1344,7 +1344,7 @@ BOOL WINAPI DestroyWindow( HWND hwnd )
...
@@ -1344,7 +1344,7 @@ BOOL WINAPI DestroyWindow( HWND hwnd )
if
(
!
(
wndPtr
->
dwStyle
&
WS_CHILD
)
&&
!
wndPtr
->
owner
)
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 */
/* 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 )
...
@@ -1227,7 +1227,7 @@ UINT WINPOS_MinMaximize( WND* wndPtr, UINT16 cmd, LPRECT16 lpRect )
size
.
x
=
wndPtr
->
rectWindow
.
left
;
size
.
y
=
wndPtr
->
rectWindow
.
top
;
size
.
x
=
wndPtr
->
rectWindow
.
left
;
size
.
y
=
wndPtr
->
rectWindow
.
top
;
lpPos
=
WINPOS_InitInternalPos
(
wndPtr
,
size
,
&
wndPtr
->
rectWindow
);
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
)
if
(
wndPtr
->
dwStyle
&
WS_MINIMIZE
)
{
{
...
@@ -1722,7 +1722,6 @@ void WINAPI SetInternalWindowPos( HWND hwnd, UINT showCmd,
...
@@ -1722,7 +1722,6 @@ void WINAPI SetInternalWindowPos( HWND hwnd, UINT showCmd,
*/
*/
BOOL
WINPOS_SetActiveWindow
(
HWND
hWnd
,
BOOL
fMouse
,
BOOL
fChangeFocus
)
BOOL
WINPOS_SetActiveWindow
(
HWND
hWnd
,
BOOL
fMouse
,
BOOL
fChangeFocus
)
{
{
CBTACTIVATESTRUCT16
*
cbtStruct
;
WND
*
wndPtr
=
0
,
*
wndTemp
;
WND
*
wndPtr
=
0
,
*
wndTemp
;
HQUEUE16
hOldActiveQueue
,
hNewActiveQueue
;
HQUEUE16
hOldActiveQueue
,
hNewActiveQueue
;
MESSAGEQUEUE
*
pOldActiveQueue
=
0
,
*
pNewActiveQueue
=
0
;
MESSAGEQUEUE
*
pOldActiveQueue
=
0
,
*
pNewActiveQueue
=
0
;
...
@@ -1759,14 +1758,12 @@ BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus)
...
@@ -1759,14 +1758,12 @@ BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus)
TRACE
(
"no current active window.
\n
"
);
TRACE
(
"no current active window.
\n
"
);
/* call CBT hook chain */
/* call CBT hook chain */
if
((
cbtStruct
=
SEGPTR_NEW
(
CBTACTIVATESTRUCT16
)))
if
(
HOOK_IsHooked
(
WH_CBT
))
{
{
cbtStruct
->
fMouse
=
fMouse
;
CBTACTIVATESTRUCT
cbt
;
cbtStruct
->
hWndActive
=
hwndActive
;
cbt
.
fMouse
=
fMouse
;
bRet
=
(
BOOL
)
HOOK_CallHooks16
(
WH_CBT
,
HCBT_ACTIVATE
,
(
WPARAM16
)
hWnd
,
cbt
.
hWndActive
=
hwndActive
;
(
LPARAM
)
SEGPTR_GET
(
cbtStruct
)
);
if
(
HOOK_CallHooksA
(
WH_CBT
,
HCBT_ACTIVATE
,
hWnd
,
(
LPARAM
)
&
cbt
))
goto
CLEANUP_END
;
SEGPTR_FREE
(
cbtStruct
);
if
(
bRet
)
goto
CLEANUP_END
;
}
}
/* set prev active wnd to current active wnd and send notification */
/* 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