Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d9625e5a
Commit
d9625e5a
authored
Aug 25, 2020
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Aug 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Support clipping full screen windows on non-primary monitors.
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
715a04da
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
13 deletions
+11
-13
mouse.c
dlls/winex11.drv/mouse.c
+10
-5
window.c
dlls/winex11.drv/window.c
+1
-1
x11drv.h
dlls/winex11.drv/x11drv.h
+0
-7
No files found.
dlls/winex11.drv/mouse.c
View file @
d9625e5a
...
...
@@ -548,7 +548,8 @@ BOOL clip_fullscreen_window( HWND hwnd, BOOL reset )
{
struct
x11drv_win_data
*
data
;
struct
x11drv_thread_data
*
thread_data
;
RECT
rect
;
MONITORINFO
monitor_info
;
HMONITOR
monitor
;
DWORD
style
;
BOOL
fullscreen
;
...
...
@@ -559,21 +560,25 @@ BOOL clip_fullscreen_window( HWND hwnd, BOOL reset )
/* maximized windows don't count as full screen */
if
((
style
&
WS_MAXIMIZE
)
&&
(
style
&
WS_CAPTION
)
==
WS_CAPTION
)
return
FALSE
;
if
(
!
(
data
=
get_win_data
(
hwnd
)))
return
FALSE
;
fullscreen
=
is_window_rect_fullscreen
(
&
data
->
whole_rect
);
fullscreen
=
is_window_rect_full
_
screen
(
&
data
->
whole_rect
);
release_win_data
(
data
);
if
(
!
fullscreen
)
return
FALSE
;
if
(
!
(
thread_data
=
x11drv_thread_data
()))
return
FALSE
;
if
(
GetTickCount
()
-
thread_data
->
clip_reset
<
1000
)
return
FALSE
;
if
(
!
reset
&&
clipping_cursor
&&
thread_data
->
clip_hwnd
)
return
FALSE
;
/* already clipping */
rect
=
get_primary_monitor_rect
();
monitor
=
MonitorFromWindow
(
hwnd
,
MONITOR_DEFAULTTONEAREST
);
if
(
!
monitor
)
return
FALSE
;
monitor_info
.
cbSize
=
sizeof
(
monitor_info
);
if
(
!
GetMonitorInfoW
(
monitor
,
&
monitor_info
))
return
FALSE
;
if
(
!
grab_fullscreen
)
{
RECT
virtual_rect
=
get_virtual_screen_rect
();
if
(
!
EqualRect
(
&
rect
,
&
virtual_rect
))
return
FALSE
;
if
(
!
EqualRect
(
&
monitor_info
.
rcMonitor
,
&
virtual_rect
))
return
FALSE
;
if
(
is_virtual_desktop
())
return
FALSE
;
}
TRACE
(
"win %p clipping fullscreen
\n
"
,
hwnd
);
return
grab_clipping_window
(
&
rect
);
return
grab_clipping_window
(
&
monitor_info
.
rcMonitor
);
}
...
...
dlls/winex11.drv/window.c
View file @
d9625e5a
...
...
@@ -2460,7 +2460,7 @@ void CDECL X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags
{
release_win_data
(
data
);
unmap_window
(
hwnd
);
if
(
is_window_rect_fullscreen
(
&
old_window_rect
))
reset_clipping_window
();
if
(
is_window_rect_full
_
screen
(
&
old_window_rect
))
reset_clipping_window
();
if
(
!
(
data
=
get_win_data
(
hwnd
)))
return
;
}
}
...
...
dlls/winex11.drv/x11drv.h
View file @
d9625e5a
...
...
@@ -822,11 +822,4 @@ static inline BOOL is_window_rect_mapped( const RECT *rect )
max
(
rect
->
bottom
,
rect
->
top
+
1
)
>
virtual_rect
.
top
);
}
static
inline
BOOL
is_window_rect_fullscreen
(
const
RECT
*
rect
)
{
RECT
primary_rect
=
get_primary_monitor_rect
();
return
(
rect
->
left
<=
primary_rect
.
left
&&
rect
->
right
>=
primary_rect
.
right
&&
rect
->
top
<=
primary_rect
.
top
&&
rect
->
bottom
>=
primary_rect
.
bottom
);
}
#endif
/* __WINE_X11DRV_H */
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