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
280defcf
Commit
280defcf
authored
Oct 23, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user: Maximize windows to the right monitor on multi-monitor setups.
parent
30a25def
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
+25
-2
winpos.c
dlls/user/winpos.c
+25
-2
No files found.
dlls/user/winpos.c
View file @
280defcf
...
...
@@ -727,6 +727,7 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
{
LPINTERNALPOS
lpPos
;
MINMAXINFO
MinMax
;
HMONITOR
monitor
;
INT
xinc
,
yinc
;
LONG
style
=
GetWindowLongA
(
hwnd
,
GWL_STYLE
);
LONG
exstyle
=
GetWindowLongA
(
hwnd
,
GWL_EXSTYLE
);
...
...
@@ -759,8 +760,8 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
}
MinMax
.
ptMinTrackSize
.
x
=
GetSystemMetrics
(
SM_CXMINTRACK
);
MinMax
.
ptMinTrackSize
.
y
=
GetSystemMetrics
(
SM_CYMINTRACK
);
MinMax
.
ptMaxTrackSize
.
x
=
GetSystemMetrics
(
SM_CX
SCREEN
)
+
2
*
GetSystemMetrics
(
SM_CXFRAME
);
MinMax
.
ptMaxTrackSize
.
y
=
GetSystemMetrics
(
SM_CY
SCREEN
)
+
2
*
GetSystemMetrics
(
SM_CYFRAME
);
MinMax
.
ptMaxTrackSize
.
x
=
GetSystemMetrics
(
SM_CX
MAXTRACK
);
MinMax
.
ptMaxTrackSize
.
y
=
GetSystemMetrics
(
SM_CY
MAXTRACK
);
if
(
HAS_DLGFRAME
(
style
,
exstyle
))
{
...
...
@@ -798,6 +799,28 @@ void WINPOS_GetMinMaxInfo( HWND hwnd, POINT *maxSize, POINT *maxPos,
SendMessageW
(
hwnd
,
WM_GETMINMAXINFO
,
0
,
(
LPARAM
)
&
MinMax
);
/* if the app didn't change the values, adapt them for the current monitor */
if
((
monitor
=
MonitorFromWindow
(
hwnd
,
MONITOR_DEFAULTTOPRIMARY
)))
{
MONITORINFO
mon_info
;
mon_info
.
cbSize
=
sizeof
(
mon_info
);
GetMonitorInfoW
(
monitor
,
&
mon_info
);
if
(
MinMax
.
ptMaxSize
.
x
==
GetSystemMetrics
(
SM_CXSCREEN
)
&&
MinMax
.
ptMaxSize
.
y
==
GetSystemMetrics
(
SM_CYSCREEN
))
{
MinMax
.
ptMaxSize
.
x
=
mon_info
.
rcWork
.
right
-
mon_info
.
rcWork
.
left
;
MinMax
.
ptMaxSize
.
y
=
mon_info
.
rcWork
.
bottom
-
mon_info
.
rcWork
.
top
;
}
if
(
MinMax
.
ptMaxPosition
.
x
==
-
xinc
&&
MinMax
.
ptMaxPosition
.
y
==
-
yinc
)
{
MinMax
.
ptMaxPosition
.
x
=
mon_info
.
rcWork
.
left
-
xinc
;
MinMax
.
ptMaxPosition
.
y
=
mon_info
.
rcWork
.
top
-
yinc
;
}
}
/* Some sanity checks */
TRACE
(
"%d %d / %d %d / %d %d / %d %d
\n
"
,
...
...
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