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
0f820e9c
Commit
0f820e9c
authored
Jun 21, 2021
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Jun 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Cache the current mode for detached outputs.
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9d7cda92
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
xrandr.c
dlls/winex11.drv/xrandr.c
+10
-13
No files found.
dlls/winex11.drv/xrandr.c
View file @
0f820e9c
...
@@ -1390,6 +1390,7 @@ static void xrandr14_free_modes( DEVMODEW *modes )
...
@@ -1390,6 +1390,7 @@ static void xrandr14_free_modes( DEVMODEW *modes )
static
BOOL
xrandr14_get_current_mode
(
ULONG_PTR
id
,
DEVMODEW
*
mode
)
static
BOOL
xrandr14_get_current_mode
(
ULONG_PTR
id
,
DEVMODEW
*
mode
)
{
{
struct
current_mode
*
mode_ptr
=
NULL
;
XRRScreenResources
*
screen_resources
;
XRRScreenResources
*
screen_resources
;
XRROutputInfo
*
output_info
=
NULL
;
XRROutputInfo
*
output_info
=
NULL
;
RROutput
output
=
(
RROutput
)
id
;
RROutput
output
=
(
RROutput
)
id
;
...
@@ -1406,13 +1407,15 @@ static BOOL xrandr14_get_current_mode( ULONG_PTR id, DEVMODEW *mode )
...
@@ -1406,13 +1407,15 @@ static BOOL xrandr14_get_current_mode( ULONG_PTR id, DEVMODEW *mode )
continue
;
continue
;
if
(
!
current_modes
[
mode_idx
].
loaded
)
if
(
!
current_modes
[
mode_idx
].
loaded
)
{
mode_ptr
=
&
current_modes
[
mode_idx
];
break
;
break
;
}
memcpy
(
mode
,
&
current_modes
[
mode_idx
].
mode
,
sizeof
(
*
mode
)
);
memcpy
(
mode
,
&
current_modes
[
mode_idx
].
mode
,
sizeof
(
*
mode
)
);
LeaveCriticalSection
(
&
current_modes_section
);
LeaveCriticalSection
(
&
current_modes_section
);
return
TRUE
;
return
TRUE
;
}
}
LeaveCriticalSection
(
&
current_modes_section
);
screen_resources
=
xrandr_get_screen_resources
();
screen_resources
=
xrandr_get_screen_resources
();
if
(
!
screen_resources
)
if
(
!
screen_resources
)
...
@@ -1473,21 +1476,15 @@ static BOOL xrandr14_get_current_mode( ULONG_PTR id, DEVMODEW *mode )
...
@@ -1473,21 +1476,15 @@ static BOOL xrandr14_get_current_mode( ULONG_PTR id, DEVMODEW *mode )
mode
->
u1
.
s2
.
dmPosition
.
y
=
crtc_info
->
y
-
primary
.
top
;
mode
->
u1
.
s2
.
dmPosition
.
y
=
crtc_info
->
y
-
primary
.
top
;
ret
=
TRUE
;
ret
=
TRUE
;
EnterCriticalSection
(
&
current_modes_section
);
done
:
for
(
mode_idx
=
0
;
mode_idx
<
current_mode_count
;
++
mode_idx
)
if
(
ret
&&
mode_ptr
)
{
{
if
(
current_modes
[
mode_idx
].
id
!=
id
)
memcpy
(
&
mode_ptr
->
mode
,
mode
,
sizeof
(
*
mode
)
);
continue
;
mode_ptr
->
mode
.
dmSize
=
sizeof
(
*
mode
);
mode_ptr
->
mode
.
dmDriverExtra
=
0
;
memcpy
(
&
current_modes
[
mode_idx
].
mode
,
mode
,
sizeof
(
*
mode
)
);
mode_ptr
->
loaded
=
TRUE
;
current_modes
[
mode_idx
].
mode
.
dmSize
=
sizeof
(
*
mode
);
current_modes
[
mode_idx
].
mode
.
dmDriverExtra
=
0
;
current_modes
[
mode_idx
].
loaded
=
TRUE
;
break
;
}
}
LeaveCriticalSection
(
&
current_modes_section
);
LeaveCriticalSection
(
&
current_modes_section
);
done
:
if
(
crtc_info
)
if
(
crtc_info
)
pXRRFreeCrtcInfo
(
crtc_info
);
pXRRFreeCrtcInfo
(
crtc_info
);
if
(
output_info
)
if
(
output_info
)
...
...
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