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
b4bccfee
Commit
b4bccfee
authored
May 26, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Use the monitor rectangle to position icons on the desktop.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
100239d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
winpos.c
dlls/user32/winpos.c
+23
-2
No files found.
dlls/user32/winpos.c
View file @
b4bccfee
...
...
@@ -859,7 +859,17 @@ static POINT WINPOS_FindIconPos( HWND hwnd, POINT pt )
SystemParametersInfoW
(
SPI_GETMINIMIZEDMETRICS
,
sizeof
(
metrics
),
&
metrics
,
0
);
parent
=
GetAncestor
(
hwnd
,
GA_PARENT
);
GetClientRect
(
parent
,
&
rectParent
);
if
(
parent
==
GetDesktopWindow
())
{
MONITORINFO
mon_info
;
HMONITOR
monitor
=
MonitorFromWindow
(
hwnd
,
MONITOR_DEFAULTTOPRIMARY
);
mon_info
.
cbSize
=
sizeof
(
mon_info
);
GetMonitorInfoW
(
monitor
,
&
mon_info
);
rectParent
=
mon_info
.
rcWork
;
}
else
GetClientRect
(
parent
,
&
rectParent
);
if
((
pt
.
x
>=
rectParent
.
left
)
&&
(
pt
.
x
+
GetSystemMetrics
(
SM_CXICON
)
<
rectParent
.
right
)
&&
(
pt
.
y
>=
rectParent
.
top
)
&&
(
pt
.
y
+
GetSystemMetrics
(
SM_CYICON
)
<
rectParent
.
bottom
))
return
pt
;
/* The icon already has a suitable position */
...
...
@@ -2486,7 +2496,18 @@ UINT WINAPI ArrangeIconicWindows( HWND parent )
metrics
.
cbSize
=
sizeof
(
metrics
);
SystemParametersInfoW
(
SPI_GETMINIMIZEDMETRICS
,
sizeof
(
metrics
),
&
metrics
,
0
);
GetClientRect
(
parent
,
&
rectParent
);
if
(
parent
==
GetDesktopWindow
())
{
MONITORINFO
mon_info
;
HMONITOR
monitor
=
MonitorFromWindow
(
0
,
MONITOR_DEFAULTTOPRIMARY
);
mon_info
.
cbSize
=
sizeof
(
mon_info
);
GetMonitorInfoW
(
monitor
,
&
mon_info
);
rectParent
=
mon_info
.
rcWork
;
}
else
GetClientRect
(
parent
,
&
rectParent
);
x
=
y
=
0
;
xspacing
=
GetSystemMetrics
(
SM_CXICONSPACING
);
yspacing
=
GetSystemMetrics
(
SM_CYICONSPACING
);
...
...
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