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
5a1fd50d
Commit
5a1fd50d
authored
Oct 24, 2006
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 24, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Exit from initial thread with ExitThread not by ExitProcess.
parent
5f79e808
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
7 deletions
+38
-7
xinerama.c
dlls/winex11.drv/xinerama.c
+38
-7
No files found.
dlls/winex11.drv/xinerama.c
View file @
5a1fd50d
...
@@ -106,9 +106,10 @@ static int query_screens(void)
...
@@ -106,9 +106,10 @@ static int query_screens(void)
nb_monitors
=
count
;
nb_monitors
=
count
;
for
(
i
=
0
;
i
<
nb_monitors
;
i
++
)
for
(
i
=
0
;
i
<
nb_monitors
;
i
++
)
{
{
#if 1
/* FIXME: for now, force primary to be the screen that starts at (0,0) origin */
/* FIXME: for now, force primary to be the screen that starts at (0,0) origin */
if
(
!
screens
[
i
].
x_org
&&
!
screens
[
i
].
y_org
)
primary_monitor
=
i
;
if
(
!
screens
[
i
].
x_org
&&
!
screens
[
i
].
y_org
)
primary_monitor
=
i
;
#endif
monitors
[
i
].
cbSize
=
sizeof
(
monitors
[
i
]
);
monitors
[
i
].
cbSize
=
sizeof
(
monitors
[
i
]
);
monitors
[
i
].
rcMonitor
.
left
=
screens
[
i
].
x_org
;
monitors
[
i
].
rcMonitor
.
left
=
screens
[
i
].
x_org
;
monitors
[
i
].
rcMonitor
.
top
=
screens
[
i
].
y_org
;
monitors
[
i
].
rcMonitor
.
top
=
screens
[
i
].
y_org
;
...
@@ -121,11 +122,6 @@ static int query_screens(void)
...
@@ -121,11 +122,6 @@ static int query_screens(void)
}
}
get_primary
()
->
dwFlags
|=
MONITORINFOF_PRIMARY
;
get_primary
()
->
dwFlags
|=
MONITORINFOF_PRIMARY
;
for
(
i
=
0
;
i
<
nb_monitors
;
i
++
)
TRACE
(
"monitor %p: %s%s
\n
"
,
index_to_monitor
(
i
),
wine_dbgstr_rect
(
&
monitors
[
i
].
rcMonitor
),
(
monitors
[
i
].
dwFlags
&
MONITORINFOF_PRIMARY
)
?
" (primary)"
:
""
);
}
}
else
count
=
0
;
else
count
=
0
;
...
@@ -145,11 +141,36 @@ static inline int query_screens(void)
...
@@ -145,11 +141,36 @@ static inline int query_screens(void)
void
xinerama_init
(
void
)
void
xinerama_init
(
void
)
{
{
MONITORINFOEXW
*
primary
;
MONITORINFOEXW
*
primary
;
int
i
;
wine_tsx11_lock
();
wine_tsx11_lock
();
SetRect
(
&
virtual_screen_rect
,
0
,
0
,
screen_width
,
screen_height
);
SetRect
(
&
virtual_screen_rect
,
0
,
0
,
screen_width
,
screen_height
);
#if 0
if (root_window != DefaultRootWindow( gdi_display ))
{
static const WCHAR monitorW[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y','%','u',0};
nb_monitors = 4;
if ((monitors = HeapAlloc( GetProcessHeap(), 0, nb_monitors * sizeof(*monitors) )))
{
for (i = 0; i < nb_monitors; i++)
{
monitors[i].cbSize = sizeof( monitors[i] );
monitors[i].rcMonitor.left = (i & 1) ? screen_width / 2 : 0;
monitors[i].rcMonitor.top = (i & 2) ? screen_height / 2 : 0;
monitors[i].rcMonitor.right = monitors[i].rcMonitor.left + screen_width / 2;
monitors[i].rcMonitor.bottom = monitors[i].rcMonitor.top + screen_height / 2;
monitors[i].rcWork = monitors[i].rcMonitor;
monitors[i].dwFlags = 0;
wsprintfW( monitors[i].szDevice, monitorW, i );
}
primary_monitor = 3;
get_primary()->dwFlags |= MONITORINFOF_PRIMARY;
}
}
else
#endif
if
(
root_window
!=
DefaultRootWindow
(
gdi_display
)
||
!
query_screens
())
if
(
root_window
!=
DefaultRootWindow
(
gdi_display
)
||
!
query_screens
())
{
{
default_monitor
.
rcWork
=
default_monitor
.
rcMonitor
=
virtual_screen_rect
;
default_monitor
.
rcWork
=
default_monitor
.
rcMonitor
=
virtual_screen_rect
;
...
@@ -158,11 +179,21 @@ void xinerama_init(void)
...
@@ -158,11 +179,21 @@ void xinerama_init(void)
}
}
primary
=
get_primary
();
primary
=
get_primary
();
/* coordinates (0,0) have to point to the primary monitor origin */
/* coordinates (0,0) have to point to the primary monitor origin */
OffsetRect
(
&
virtual_screen_rect
,
-
primary
->
rcMonitor
.
left
,
-
primary
->
rcMonitor
.
top
);
OffsetRect
(
&
virtual_screen_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
);
ERR
(
"monitor %p: %s%s
\n
"
,
index_to_monitor
(
i
),
wine_dbgstr_rect
(
&
monitors
[
i
].
rcMonitor
),
(
monitors
[
i
].
dwFlags
&
MONITORINFOF_PRIMARY
)
?
" (primary)"
:
""
);
}
screen_width
=
primary
->
rcMonitor
.
right
-
primary
->
rcMonitor
.
left
;
screen_width
=
primary
->
rcMonitor
.
right
-
primary
->
rcMonitor
.
left
;
screen_height
=
primary
->
rcMonitor
.
bottom
-
primary
->
rcMonitor
.
top
;
screen_height
=
primary
->
rcMonitor
.
bottom
-
primary
->
rcMonitor
.
top
;
TRACE
(
"virtual size: %s primary size: %dx%d
\n
"
,
ERR
(
"virtual size: %s primary size: %dx%d
\n
"
,
wine_dbgstr_rect
(
&
virtual_screen_rect
),
screen_width
,
screen_height
);
wine_dbgstr_rect
(
&
virtual_screen_rect
),
screen_width
,
screen_height
);
wine_tsx11_unlock
();
wine_tsx11_unlock
();
...
...
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