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
e00840cf
Commit
e00840cf
authored
Feb 06, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Only update the virtual screen rect once in xinerama_init to minimize race conditions.
parent
e14261db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
xinerama.c
dlls/winex11.drv/xinerama.c
+8
-6
No files found.
dlls/winex11.drv/xinerama.c
View file @
e00840cf
...
...
@@ -138,14 +138,15 @@ void xinerama_init( unsigned int width, unsigned int height )
{
MONITORINFOEXW
*
primary
;
int
i
;
RECT
rect
;
wine_tsx11_lock
();
SetRect
(
&
virtual_screen_
rect
,
0
,
0
,
width
,
height
);
SetRect
(
&
rect
,
0
,
0
,
width
,
height
);
if
(
root_window
!=
DefaultRootWindow
(
gdi_display
)
||
!
query_screens
())
{
default_monitor
.
rcWork
=
default_monitor
.
rcMonitor
=
virtual_screen_
rect
;
default_monitor
.
rcWork
=
default_monitor
.
rcMonitor
=
rect
;
nb_monitors
=
1
;
monitors
=
&
default_monitor
;
}
...
...
@@ -153,20 +154,21 @@ void xinerama_init( unsigned int width, unsigned int height )
primary
=
get_primary
();
/* coordinates (0,0) have to point to the primary monitor origin */
OffsetRect
(
&
virtual_screen_
rect
,
-
primary
->
rcMonitor
.
left
,
-
primary
->
rcMonitor
.
top
);
OffsetRect
(
&
rect
,
-
primary
->
rcMonitor
.
left
,
-
primary
->
rcMonitor
.
top
);
for
(
i
=
0
;
i
<
nb_monitors
;
i
++
)
{
OffsetRect
(
&
monitors
[
i
].
rcMonitor
,
virtual_screen_rect
.
left
,
virtual_screen_
rect
.
top
);
OffsetRect
(
&
monitors
[
i
].
rcWork
,
virtual_screen_rect
.
left
,
virtual_screen_
rect
.
top
);
OffsetRect
(
&
monitors
[
i
].
rcMonitor
,
rect
.
left
,
rect
.
top
);
OffsetRect
(
&
monitors
[
i
].
rcWork
,
rect
.
left
,
rect
.
top
);
TRACE
(
"monitor %p: %s%s
\n
"
,
index_to_monitor
(
i
),
wine_dbgstr_rect
(
&
monitors
[
i
].
rcMonitor
),
(
monitors
[
i
].
dwFlags
&
MONITORINFOF_PRIMARY
)
?
" (primary)"
:
""
);
}
virtual_screen_rect
=
rect
;
screen_width
=
primary
->
rcMonitor
.
right
-
primary
->
rcMonitor
.
left
;
screen_height
=
primary
->
rcMonitor
.
bottom
-
primary
->
rcMonitor
.
top
;
TRACE
(
"virtual size: %s primary size: %dx%d
\n
"
,
wine_dbgstr_rect
(
&
virtual_screen_
rect
),
screen_width
,
screen_height
);
wine_dbgstr_rect
(
&
rect
),
screen_width
,
screen_height
);
wine_tsx11_unlock
();
ClipCursor
(
NULL
);
/* reset the cursor clip rectangle */
...
...
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