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
03f8f85d
Commit
03f8f85d
authored
Dec 12, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Dec 13, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Respect monitor work area when sizing or moving a top-level window.
This prevents dragging a window's title bar behind a menu bar across the top of a screen, for example.
parent
304ab65d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
winpos.c
dlls/user32/winpos.c
+20
-0
No files found.
dlls/user32/winpos.c
View file @
03f8f85d
...
...
@@ -2625,6 +2625,7 @@ void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam )
BOOL
moved
=
FALSE
;
DWORD
dwPoint
=
GetMessagePos
();
BOOL
DragFullWindows
=
TRUE
;
HMONITOR
mon
=
0
;
if
(
IsZoomed
(
hwnd
)
||
!
IsWindowVisible
(
hwnd
))
return
;
...
...
@@ -2673,6 +2674,7 @@ void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam )
{
parent
=
0
;
mouseRect
=
get_virtual_screen_rect
();
mon
=
MonitorFromPoint
(
pt
,
MONITOR_DEFAULTTONEAREST
);
}
if
(
ON_LEFT_BORDER
(
hittest
))
...
...
@@ -2749,6 +2751,24 @@ void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam )
pt
.
y
=
max
(
pt
.
y
,
mouseRect
.
top
);
pt
.
y
=
min
(
pt
.
y
,
mouseRect
.
bottom
);
if
(
!
parent
)
{
HMONITOR
newmon
;
MONITORINFO
info
;
if
((
newmon
=
MonitorFromPoint
(
pt
,
MONITOR_DEFAULTTONULL
)))
mon
=
newmon
;
info
.
cbSize
=
sizeof
(
info
);
if
(
mon
&&
GetMonitorInfoW
(
mon
,
&
info
))
{
pt
.
x
=
max
(
pt
.
x
,
info
.
rcWork
.
left
);
pt
.
x
=
min
(
pt
.
x
,
info
.
rcWork
.
right
);
pt
.
y
=
max
(
pt
.
y
,
info
.
rcWork
.
top
);
pt
.
y
=
min
(
pt
.
y
,
info
.
rcWork
.
bottom
);
}
}
dx
=
pt
.
x
-
capturePoint
.
x
;
dy
=
pt
.
y
-
capturePoint
.
y
;
...
...
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