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
9aaa2409
Commit
9aaa2409
authored
Oct 02, 2008
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 02, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Add support for _NET_WORKAREA.
parent
1e344db7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
2 deletions
+30
-2
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-0
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+1
-0
xinerama.c
dlls/winex11.drv/xinerama.c
+28
-2
No files found.
dlls/winex11.drv/x11drv.h
View file @
9aaa2409
...
...
@@ -614,6 +614,7 @@ enum x11drv_atoms
XATOM__NET_WM_WINDOW_TYPE_DIALOG
,
XATOM__NET_WM_WINDOW_TYPE_NORMAL
,
XATOM__NET_WM_WINDOW_TYPE_UTILITY
,
XATOM__NET_WORKAREA
,
XATOM__XEMBED_INFO
,
XATOM_XdndAware
,
XATOM_XdndEnter
,
...
...
dlls/winex11.drv/x11drv_main.c
View file @
9aaa2409
...
...
@@ -150,6 +150,7 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
"_NET_WM_WINDOW_TYPE_DIALOG"
,
"_NET_WM_WINDOW_TYPE_NORMAL"
,
"_NET_WM_WINDOW_TYPE_UTILITY"
,
"_NET_WORKAREA"
,
"_XEMBED_INFO"
,
"XdndAware"
,
"XdndEnter"
,
...
...
dlls/winex11.drv/xinerama.c
View file @
9aaa2409
...
...
@@ -65,6 +65,25 @@ static inline int monitor_to_index( HMONITOR handle )
return
index
-
1
;
}
static
void
query_work_area
(
RECT
*
rc_work
)
{
Atom
type
;
int
format
;
unsigned
long
count
,
remaining
;
long
*
work_area
;
if
(
!
XGetWindowProperty
(
gdi_display
,
DefaultRootWindow
(
gdi_display
),
x11drv_atom
(
_NET_WORKAREA
),
0
,
~
0
,
False
,
XA_CARDINAL
,
&
type
,
&
format
,
&
count
,
&
remaining
,
(
unsigned
char
**
)
&
work_area
))
{
if
(
type
==
XA_CARDINAL
&&
format
==
32
&&
count
>=
4
)
{
SetRect
(
rc_work
,
work_area
[
0
],
work_area
[
1
],
work_area
[
0
]
+
work_area
[
2
],
work_area
[
1
]
+
work_area
[
3
]
);
}
XFree
(
work_area
);
}
}
#ifdef SONAME_LIBXINERAMA
...
...
@@ -92,10 +111,13 @@ static int query_screens(void)
{
int
i
,
count
,
event_base
,
error_base
;
XineramaScreenInfo
*
screens
;
RECT
rc_work
;
if
(
!
monitors
)
/* first time around */
load_xinerama
();
query_work_area
(
&
rc_work
);
if
(
!
pXineramaQueryExtension
||
!
pXineramaQueryScreens
||
!
pXineramaQueryExtension
(
gdi_display
,
&
event_base
,
&
error_base
)
||
!
(
screens
=
pXineramaQueryScreens
(
gdi_display
,
&
count
)))
return
0
;
...
...
@@ -111,8 +133,9 @@ static int query_screens(void)
monitors
[
i
].
rcMonitor
.
top
=
screens
[
i
].
y_org
;
monitors
[
i
].
rcMonitor
.
right
=
screens
[
i
].
x_org
+
screens
[
i
].
width
;
monitors
[
i
].
rcMonitor
.
bottom
=
screens
[
i
].
y_org
+
screens
[
i
].
height
;
monitors
[
i
].
rcWork
=
monitors
[
i
].
rcMonitor
;
monitors
[
i
].
dwFlags
=
0
;
if
(
!
IntersectRect
(
&
monitors
[
i
].
rcWork
,
&
rc_work
,
&
monitors
[
i
].
rcMonitor
))
monitors
[
i
].
rcWork
=
monitors
[
i
].
rcMonitor
;
/* FIXME: using the same device name for all monitors for now */
lstrcpyW
(
monitors
[
i
].
szDevice
,
default_monitor
.
szDevice
);
}
...
...
@@ -147,6 +170,8 @@ void xinerama_init( unsigned int width, unsigned int height )
if
(
root_window
!=
DefaultRootWindow
(
gdi_display
)
||
!
query_screens
())
{
default_monitor
.
rcWork
=
default_monitor
.
rcMonitor
=
rect
;
if
(
root_window
==
DefaultRootWindow
(
gdi_display
))
query_work_area
(
&
default_monitor
.
rcWork
);
nb_monitors
=
1
;
monitors
=
&
default_monitor
;
}
...
...
@@ -159,8 +184,9 @@ void xinerama_init( unsigned int width, unsigned int height )
{
OffsetRect
(
&
monitors
[
i
].
rcMonitor
,
rect
.
left
,
rect
.
top
);
OffsetRect
(
&
monitors
[
i
].
rcWork
,
rect
.
left
,
rect
.
top
);
TRACE
(
"monitor %p: %s%s
\n
"
,
TRACE
(
"monitor %p: %s
work %s
%s
\n
"
,
index_to_monitor
(
i
),
wine_dbgstr_rect
(
&
monitors
[
i
].
rcMonitor
),
wine_dbgstr_rect
(
&
monitors
[
i
].
rcWork
),
(
monitors
[
i
].
dwFlags
&
MONITORINFOF_PRIMARY
)
?
" (primary)"
:
""
);
}
...
...
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