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
9da3b236
Commit
9da3b236
authored
Oct 31, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move NtUserDragDetect() to window.c.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
64532621
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
45 deletions
+45
-45
input.c
dlls/win32u/input.c
+0
-45
window.c
dlls/win32u/window.c
+45
-0
No files found.
dlls/win32u/input.c
View file @
9da3b236
...
...
@@ -1394,51 +1394,6 @@ BOOL WINAPI NtUserTrackMouseEvent( TRACKMOUSEEVENT *info )
return
TRUE
;
}
/*******************************************************************
* NtUserDragDetect (win32u.@)
*/
BOOL
WINAPI
NtUserDragDetect
(
HWND
hwnd
,
int
x
,
int
y
)
{
WORD
width
,
height
;
RECT
rect
;
MSG
msg
;
TRACE
(
"%p (%d,%d)
\n
"
,
hwnd
,
x
,
y
);
if
(
!
(
NtUserGetKeyState
(
VK_LBUTTON
)
&
0x8000
))
return
FALSE
;
width
=
get_system_metrics
(
SM_CXDRAG
);
height
=
get_system_metrics
(
SM_CYDRAG
);
SetRect
(
&
rect
,
x
-
width
,
y
-
height
,
x
+
width
,
y
+
height
);
NtUserSetCapture
(
hwnd
);
for
(;;)
{
while
(
NtUserPeekMessage
(
&
msg
,
0
,
WM_MOUSEFIRST
,
WM_MOUSELAST
,
PM_REMOVE
))
{
if
(
msg
.
message
==
WM_LBUTTONUP
)
{
release_capture
();
return
FALSE
;
}
if
(
msg
.
message
==
WM_MOUSEMOVE
)
{
POINT
tmp
;
tmp
.
x
=
(
short
)
LOWORD
(
msg
.
lParam
);
tmp
.
y
=
(
short
)
HIWORD
(
msg
.
lParam
);
if
(
!
PtInRect
(
&
rect
,
tmp
))
{
release_capture
();
return
TRUE
;
}
}
}
NtUserMsgWaitForMultipleObjectsEx
(
0
,
NULL
,
INFINITE
,
QS_ALLINPUT
,
0
);
}
return
FALSE
;
}
/**********************************************************************
* set_capture_window
*/
...
...
dlls/win32u/window.c
View file @
9da3b236
...
...
@@ -5541,6 +5541,51 @@ ULONG_PTR WINAPI NtUserCallHwndParam( HWND hwnd, DWORD_PTR param, DWORD code )
}
/*******************************************************************
* NtUserDragDetect (win32u.@)
*/
BOOL
WINAPI
NtUserDragDetect
(
HWND
hwnd
,
int
x
,
int
y
)
{
WORD
width
,
height
;
RECT
rect
;
MSG
msg
;
TRACE
(
"%p (%d,%d)
\n
"
,
hwnd
,
x
,
y
);
if
(
!
(
NtUserGetKeyState
(
VK_LBUTTON
)
&
0x8000
))
return
FALSE
;
width
=
get_system_metrics
(
SM_CXDRAG
);
height
=
get_system_metrics
(
SM_CYDRAG
);
SetRect
(
&
rect
,
x
-
width
,
y
-
height
,
x
+
width
,
y
+
height
);
NtUserSetCapture
(
hwnd
);
for
(;;)
{
while
(
NtUserPeekMessage
(
&
msg
,
0
,
WM_MOUSEFIRST
,
WM_MOUSELAST
,
PM_REMOVE
))
{
if
(
msg
.
message
==
WM_LBUTTONUP
)
{
release_capture
();
return
FALSE
;
}
if
(
msg
.
message
==
WM_MOUSEMOVE
)
{
POINT
tmp
;
tmp
.
x
=
(
short
)
LOWORD
(
msg
.
lParam
);
tmp
.
y
=
(
short
)
HIWORD
(
msg
.
lParam
);
if
(
!
PtInRect
(
&
rect
,
tmp
))
{
release_capture
();
return
TRUE
;
}
}
}
NtUserMsgWaitForMultipleObjectsEx
(
0
,
NULL
,
INFINITE
,
QS_ALLINPUT
,
0
);
}
return
FALSE
;
}
/*******************************************************************
* NtUserDragObject (win32u.@)
*/
DWORD
WINAPI
NtUserDragObject
(
HWND
parent
,
HWND
hwnd
,
UINT
fmt
,
ULONG_PTR
data
,
HCURSOR
cursor
)
...
...
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