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
5db8d2f4
Commit
5db8d2f4
authored
May 22, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make WIN_WindowFromPoint take a POINT instead of a POINT16.
Small bug fix in scope window handling. Always check for message when QS_SENDMESSAGE is set.
parent
30975c0c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
31 deletions
+24
-31
winpos.h
include/winpos.h
+1
-1
message.c
windows/message.c
+6
-10
winpos.c
windows/winpos.c
+17
-20
No files found.
include/winpos.h
View file @
5db8d2f4
...
...
@@ -38,7 +38,7 @@ extern LONG WINPOS_SendNCCalcSize(HWND hwnd, BOOL calcValidRect,
RECT
*
newClientRect
);
extern
LONG
WINPOS_HandleWindowPosChanging16
(
struct
tagWND
*
wndPtr
,
struct
tagWINDOWPOS16
*
winpos
);
extern
LONG
WINPOS_HandleWindowPosChanging
(
struct
tagWND
*
wndPtr
,
WINDOWPOS
*
winpos
);
extern
INT16
WINPOS_WindowFromPoint
(
struct
tagWND
*
scopeWnd
,
POINT
16
pt
,
struct
tagWND
**
ppWnd
);
extern
INT16
WINPOS_WindowFromPoint
(
struct
tagWND
*
scopeWnd
,
POINT
pt
,
struct
tagWND
**
ppWnd
);
extern
void
WINPOS_CheckInternalPos
(
struct
tagWND
*
wndPtr
);
extern
BOOL
WINPOS_ActivateOtherWindow
(
struct
tagWND
*
pWnd
);
extern
BOOL
WINPOS_CreateInternalPosAtom
(
void
);
...
...
windows/message.c
View file @
5db8d2f4
...
...
@@ -11,6 +11,7 @@
#include <sys/types.h>
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "message.h"
#include "winerror.h"
#include "server.h"
...
...
@@ -26,9 +27,7 @@
#include "user.h"
#include "thread.h"
#include "task.h"
#include "options.h"
#include "controls.h"
#include "struct32.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
msg
);
...
...
@@ -114,7 +113,7 @@ static DWORD MSG_TranslateMouseMsg( HWND hTopWnd, DWORD first, DWORD last,
HWND
hWnd
;
INT16
ht
,
hittest
;
UINT
message
=
msg
->
message
;
POINT
16
pt
;
POINT
pt
=
msg
->
pt
;
HANDLE16
hQ
=
GetFastQueue16
();
MESSAGEQUEUE
*
queue
=
QUEUE_Lock
(
hQ
);
int
mouseClick
=
((
message
==
WM_LBUTTONDOWN
)
||
...
...
@@ -124,8 +123,6 @@ static DWORD MSG_TranslateMouseMsg( HWND hTopWnd, DWORD first, DWORD last,
/* Find the window to dispatch this mouse message to */
CONV_POINT32TO16
(
&
msg
->
pt
,
&
pt
);
hWnd
=
GetCapture
();
/* If no capture HWND, find window which contains the mouse position.
...
...
@@ -194,7 +191,7 @@ static DWORD MSG_TranslateMouseMsg( HWND hTopWnd, DWORD first, DWORD last,
}
}
/* save mouse position */
CONV_POINT16TO32
(
&
pt
,
screen_pt
)
;
*
screen_pt
=
pt
;
if
(
hittest
!=
HTCLIENT
)
{
...
...
@@ -202,7 +199,7 @@ static DWORD MSG_TranslateMouseMsg( HWND hTopWnd, DWORD first, DWORD last,
msg
->
wParam
=
hittest
;
}
else
ScreenToClient
16
(
hWnd
,
&
pt
);
ScreenToClient
(
hWnd
,
&
pt
);
/* check message filter */
...
...
@@ -604,8 +601,7 @@ static BOOL MSG_PeekHardwareMsg( MSG *msg, HWND hwnd, DWORD first, DWORD last,
if
((
msg
->
message
>=
WM_MOUSEFIRST
)
&&
(
msg
->
message
<=
WM_MOUSELAST
))
{
HWND
hWndScope
=
(
HWND
)
qmsg
->
extraInfo
;
WND
*
tmpWnd
=
(
Options
.
managed
&&
IsWindow
(
hWndScope
)
)
?
WIN_FindWndPtr
(
hWndScope
)
:
WIN_GetDesktop
();
WND
*
tmpWnd
=
IsWindow
(
hWndScope
)
?
WIN_FindWndPtr
(
hWndScope
)
:
WIN_GetDesktop
();
status
=
MSG_TranslateMouseMsg
(
hwnd
,
first
,
last
,
msg
,
remove
,
tmpWnd
,
&
hittest
,
&
screen_pt
,
&
mouseClick
);
...
...
@@ -1025,7 +1021,7 @@ static BOOL MSG_PeekMessage( int type, LPMSG msg_out, HWND hwnd,
/* Now find a normal message */
retry:
if
(
wakeBits
&
(
QS_POSTMESSAGE
|
QS_TIMER
|
QS_PAINT
))
if
(
wakeBits
&
(
QS_
SENDMESSAGE
|
QS_
POSTMESSAGE
|
QS_TIMER
|
QS_PAINT
))
{
QMSG
qmsg
;
if
(
QUEUE_FindMsg
(
hwnd
,
first
,
last
,
flags
&
PM_REMOVE
,
FALSE
,
&
qmsg
))
...
...
windows/winpos.c
View file @
5db8d2f4
...
...
@@ -419,14 +419,14 @@ BOOL WINAPI ScreenToClient( HWND hwnd, LPPOINT lppnt )
*
* Find the window and hittest for a given point.
*/
INT16
WINPOS_WindowFromPoint
(
WND
*
wndScope
,
POINT
16
pt
,
WND
**
ppWnd
)
INT16
WINPOS_WindowFromPoint
(
WND
*
wndScope
,
POINT
pt
,
WND
**
ppWnd
)
{
WND
*
wndPtr
;
INT16
hittest
=
HTERROR
;
INT16
retvalue
;
POINT
16
xy
=
pt
;
POINT
xy
=
pt
;
TRACE
(
"scope %04x %
d,%
d
\n
"
,
wndScope
->
hwndSelf
,
pt
.
x
,
pt
.
y
);
TRACE
(
"scope %04x %
ld,%l
d
\n
"
,
wndScope
->
hwndSelf
,
pt
.
x
,
pt
.
y
);
*
ppWnd
=
NULL
;
wndPtr
=
WIN_LockWndPtr
(
wndScope
->
child
);
...
...
@@ -436,16 +436,15 @@ INT16 WINPOS_WindowFromPoint( WND* wndScope, POINT16 pt, WND **ppWnd )
goto
end
;
}
if
(
wndScope
->
dwExStyle
&
WS_EX_MANAGED
)
{
/* In managed mode we have to check wndScope first as it is also
* a window which received the mouse event. */
if
(
wndScope
->
parent
)
MapWindowPoints
(
GetDesktopWindow
(),
wndScope
->
parent
->
hwndSelf
,
&
xy
,
1
);
if
(
pt
.
x
<
wndScope
->
rectClient
.
left
||
pt
.
x
>=
wndScope
->
rectClient
.
right
||
pt
.
y
<
wndScope
->
rectClient
.
top
||
pt
.
y
>=
wndScope
->
rectClient
.
bottom
)
if
(
xy
.
x
<
wndScope
->
rectClient
.
left
||
pt
.
x
>=
wndScope
->
rectClient
.
right
||
xy
.
y
<
wndScope
->
rectClient
.
top
||
pt
.
y
>=
wndScope
->
rectClient
.
bottom
)
goto
hittest
;
}
MapWindowPoints16
(
GetDesktopWindow16
(),
wndScope
->
hwndSelf
,
&
xy
,
1
);
xy
.
x
-=
wndScope
->
rectClient
.
left
;
xy
.
y
-=
wndScope
->
rectClient
.
top
;
for
(;;)
{
...
...
@@ -467,7 +466,7 @@ INT16 WINPOS_WindowFromPoint( WND* wndScope, POINT16 pt, WND **ppWnd )
(
xy
.
y
>=
wndPtr
->
rectWindow
.
top
)
&&
(
xy
.
y
<
wndPtr
->
rectWindow
.
bottom
))))
{
TRACE
(
"%d,%
d is inside %04x
\n
"
,
xy
.
x
,
xy
.
y
,
wndPtr
->
hwndSelf
);
TRACE
(
"%ld,%l
d is inside %04x
\n
"
,
xy
.
x
,
xy
.
y
,
wndPtr
->
hwndSelf
);
*
ppWnd
=
wndPtr
;
/* Got a suitable window */
/* If window is minimized or disabled, return at once */
...
...
@@ -505,7 +504,7 @@ hittest:
/* Send the WM_NCHITTEST message (only if to the same task) */
if
((
*
ppWnd
)
->
hmemTaskQ
==
GetFastQueue16
())
{
hittest
=
(
INT16
)
SendMessage16
(
(
*
ppWnd
)
->
hwndSelf
,
WM_NCHITTEST
,
hittest
=
SendMessageA
(
(
*
ppWnd
)
->
hwndSelf
,
WM_NCHITTEST
,
0
,
MAKELONG
(
pt
.
x
,
pt
.
y
)
);
if
(
hittest
!=
HTTRANSPARENT
)
{
...
...
@@ -542,10 +541,10 @@ end:
*/
HWND16
WINAPI
WindowFromPoint16
(
POINT16
pt
)
{
WND
*
pWnd
;
WINPOS_WindowFromPoint
(
WIN_GetDesktop
(),
pt
,
&
pWnd
);
WIN_ReleaseDesktop
(
);
return
pWnd
->
hwndSelf
;
POINT
pt32
;
CONV_POINT16TO32
(
&
pt
,
&
pt32
);
return
WindowFromPoint
(
pt32
)
;
}
...
...
@@ -555,9 +554,7 @@ HWND16 WINAPI WindowFromPoint16( POINT16 pt )
HWND
WINAPI
WindowFromPoint
(
POINT
pt
)
{
WND
*
pWnd
;
POINT16
pt16
;
CONV_POINT32TO16
(
&
pt
,
&
pt16
);
WINPOS_WindowFromPoint
(
WIN_GetDesktop
(),
pt16
,
&
pWnd
);
WINPOS_WindowFromPoint
(
WIN_GetDesktop
(),
pt
,
&
pWnd
);
WIN_ReleaseDesktop
();
return
(
HWND
)
pWnd
->
hwndSelf
;
}
...
...
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