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
7068a856
Commit
7068a856
authored
Aug 23, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Scale window dimensions in DeferWindowPos() based on DPI awareness.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4233caa7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
+18
-16
winpos.c
dlls/user32/winpos.c
+18
-16
No files found.
dlls/user32/winpos.c
View file @
7068a856
...
@@ -2435,17 +2435,26 @@ HDWP WINAPI DeferWindowPos( HDWP hdwp, HWND hwnd, HWND hwndAfter,
...
@@ -2435,17 +2435,26 @@ HDWP WINAPI DeferWindowPos( HDWP hdwp, HWND hwnd, HWND hwndAfter,
DWP
*
pDWP
;
DWP
*
pDWP
;
int
i
;
int
i
;
HDWP
retvalue
=
hdwp
;
HDWP
retvalue
=
hdwp
;
WINDOWPOS
winpos
;
TRACE
(
"hdwp %p, hwnd %p, after %p, %d,%d (%dx%d), flags %08x
\n
"
,
TRACE
(
"hdwp %p, hwnd %p, after %p, %d,%d (%dx%d), flags %08x
\n
"
,
hdwp
,
hwnd
,
hwndAfter
,
x
,
y
,
cx
,
cy
,
flags
);
hdwp
,
hwnd
,
hwndAfter
,
x
,
y
,
cx
,
cy
,
flags
);
hwnd
=
WIN_GetFullHandle
(
hwnd
);
winpos
.
hwnd
=
WIN_GetFullHandle
(
hwnd
);
if
(
is_desktop_window
(
hwnd
)
||
!
IsWindow
(
hwnd
))
if
(
is_desktop_window
(
winpos
.
hwnd
)
||
!
IsWindow
(
winpos
.
hwnd
))
{
{
SetLastError
(
ERROR_INVALID_WINDOW_HANDLE
);
SetLastError
(
ERROR_INVALID_WINDOW_HANDLE
);
return
0
;
return
0
;
}
}
winpos
.
hwndInsertAfter
=
WIN_GetFullHandle
(
hwndAfter
);
winpos
.
flags
=
flags
;
winpos
.
x
=
x
;
winpos
.
y
=
y
;
winpos
.
cx
=
cx
;
winpos
.
cy
=
cy
;
map_dpi_winpos
(
&
winpos
);
if
(
!
(
pDWP
=
get_user_handle_ptr
(
hdwp
,
USER_DWP
)))
return
0
;
if
(
!
(
pDWP
=
get_user_handle_ptr
(
hdwp
,
USER_DWP
)))
return
0
;
if
(
pDWP
==
OBJ_OTHER_PROCESS
)
if
(
pDWP
==
OBJ_OTHER_PROCESS
)
{
{
...
@@ -2455,22 +2464,22 @@ HDWP WINAPI DeferWindowPos( HDWP hdwp, HWND hwnd, HWND hwndAfter,
...
@@ -2455,22 +2464,22 @@ HDWP WINAPI DeferWindowPos( HDWP hdwp, HWND hwnd, HWND hwndAfter,
for
(
i
=
0
;
i
<
pDWP
->
actualCount
;
i
++
)
for
(
i
=
0
;
i
<
pDWP
->
actualCount
;
i
++
)
{
{
if
(
pDWP
->
winPos
[
i
].
hwnd
==
hwnd
)
if
(
pDWP
->
winPos
[
i
].
hwnd
==
winpos
.
hwnd
)
{
{
/* Merge with the other changes */
/* Merge with the other changes */
if
(
!
(
flags
&
SWP_NOZORDER
))
if
(
!
(
flags
&
SWP_NOZORDER
))
{
{
pDWP
->
winPos
[
i
].
hwndInsertAfter
=
WIN_GetFullHandle
(
hwndAfter
)
;
pDWP
->
winPos
[
i
].
hwndInsertAfter
=
winpos
.
hwndInsertAfter
;
}
}
if
(
!
(
flags
&
SWP_NOMOVE
))
if
(
!
(
flags
&
SWP_NOMOVE
))
{
{
pDWP
->
winPos
[
i
].
x
=
x
;
pDWP
->
winPos
[
i
].
x
=
winpos
.
x
;
pDWP
->
winPos
[
i
].
y
=
y
;
pDWP
->
winPos
[
i
].
y
=
winpos
.
y
;
}
}
if
(
!
(
flags
&
SWP_NOSIZE
))
if
(
!
(
flags
&
SWP_NOSIZE
))
{
{
pDWP
->
winPos
[
i
].
cx
=
cx
;
pDWP
->
winPos
[
i
].
cx
=
winpos
.
cx
;
pDWP
->
winPos
[
i
].
cy
=
cy
;
pDWP
->
winPos
[
i
].
cy
=
winpos
.
cy
;
}
}
pDWP
->
winPos
[
i
].
flags
&=
flags
|
~
(
SWP_NOSIZE
|
SWP_NOMOVE
|
pDWP
->
winPos
[
i
].
flags
&=
flags
|
~
(
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOZORDER
|
SWP_NOREDRAW
|
SWP_NOZORDER
|
SWP_NOREDRAW
|
...
@@ -2493,14 +2502,7 @@ HDWP WINAPI DeferWindowPos( HDWP hdwp, HWND hwnd, HWND hwndAfter,
...
@@ -2493,14 +2502,7 @@ HDWP WINAPI DeferWindowPos( HDWP hdwp, HWND hwnd, HWND hwndAfter,
pDWP
->
suggestedCount
*=
2
;
pDWP
->
suggestedCount
*=
2
;
pDWP
->
winPos
=
newpos
;
pDWP
->
winPos
=
newpos
;
}
}
pDWP
->
winPos
[
pDWP
->
actualCount
].
hwnd
=
hwnd
;
pDWP
->
winPos
[
pDWP
->
actualCount
++
]
=
winpos
;
pDWP
->
winPos
[
pDWP
->
actualCount
].
hwndInsertAfter
=
hwndAfter
;
pDWP
->
winPos
[
pDWP
->
actualCount
].
x
=
x
;
pDWP
->
winPos
[
pDWP
->
actualCount
].
y
=
y
;
pDWP
->
winPos
[
pDWP
->
actualCount
].
cx
=
cx
;
pDWP
->
winPos
[
pDWP
->
actualCount
].
cy
=
cy
;
pDWP
->
winPos
[
pDWP
->
actualCount
].
flags
=
flags
;
pDWP
->
actualCount
++
;
END:
END:
release_user_handle_ptr
(
pDWP
);
release_user_handle_ptr
(
pDWP
);
return
retvalue
;
return
retvalue
;
...
...
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