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
99d04772
Commit
99d04772
authored
Nov 05, 2019
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Nov 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Introduce is_virtual_desktop().
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8180e338
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
18 additions
and
11 deletions
+18
-11
desktop.c
dlls/winex11.drv/desktop.c
+7
-1
event.c
dlls/winex11.drv/event.c
+1
-1
mouse.c
dlls/winex11.drv/mouse.c
+1
-1
palette.c
dlls/winex11.drv/palette.c
+1
-1
systray.c
dlls/winex11.drv/systray.c
+1
-1
window.c
dlls/winex11.drv/window.c
+2
-2
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-0
xinerama.c
dlls/winex11.drv/xinerama.c
+2
-2
xrandr.c
dlls/winex11.drv/xrandr.c
+1
-1
xvidmode.c
dlls/winex11.drv/xvidmode.c
+1
-1
No files found.
dlls/winex11.drv/desktop.c
View file @
99d04772
...
...
@@ -77,6 +77,12 @@ static struct screen_size {
#define _NET_WM_STATE_REMOVE 0
#define _NET_WM_STATE_ADD 1
/* Return TRUE if Wine is currently in virtual desktop mode */
BOOL
is_virtual_desktop
(
void
)
{
return
root_window
!=
DefaultRootWindow
(
gdi_display
);
}
/* create the mode structures */
static
void
make_modes
(
void
)
{
...
...
@@ -268,7 +274,7 @@ static void update_desktop_fullscreen( unsigned int width, unsigned int height)
Display
*
display
=
thread_display
();
XEvent
xev
;
if
(
!
display
||
root_window
==
DefaultRootWindow
(
display
))
return
;
if
(
!
display
||
!
is_virtual_desktop
(
))
return
;
xev
.
xclient
.
type
=
ClientMessage
;
xev
.
xclient
.
window
=
root_window
;
...
...
dlls/winex11.drv/event.c
View file @
99d04772
...
...
@@ -827,7 +827,7 @@ static void focus_out( Display *display , HWND hwnd )
x11drv_thread_data
()
->
last_focus
=
hwnd
;
if
((
xic
=
X11DRV_get_ic
(
hwnd
)))
XUnsetICFocus
(
xic
);
if
(
root_window
!=
DefaultRootWindow
(
display
))
if
(
is_virtual_desktop
(
))
{
if
(
hwnd
==
GetDesktopWindow
())
reset_clipping_window
();
return
;
...
...
dlls/winex11.drv/mouse.c
View file @
99d04772
...
...
@@ -572,7 +572,7 @@ BOOL clip_fullscreen_window( HWND hwnd, BOOL reset )
{
RECT
virtual_rect
=
get_virtual_screen_rect
();
if
(
!
EqualRect
(
&
rect
,
&
virtual_rect
))
return
FALSE
;
if
(
root_window
!=
DefaultRootWindow
(
gdi_display
))
return
FALSE
;
if
(
is_virtual_desktop
(
))
return
FALSE
;
}
TRACE
(
"win %p clipping fullscreen
\n
"
,
hwnd
);
return
grab_clipping_window
(
&
rect
);
...
...
dlls/winex11.drv/palette.c
View file @
99d04772
...
...
@@ -217,7 +217,7 @@ int X11DRV_PALETTE_Init(void)
{
X11DRV_PALETTE_PaletteFlags
|=
X11DRV_PALETTE_PRIVATE
;
if
(
root_window
!=
DefaultRootWindow
(
gdi_display
)
)
if
(
is_virtual_desktop
()
)
{
win_attr
.
colormap
=
default_colormap
;
XChangeWindowAttributes
(
gdi_display
,
root_window
,
CWColormap
,
&
win_attr
);
...
...
dlls/winex11.drv/systray.c
View file @
99d04772
...
...
@@ -587,7 +587,7 @@ static BOOL init_systray(void)
WNDCLASSEXW
class
;
Display
*
display
;
if
(
root_window
!=
DefaultRootWindow
(
gdi_display
))
return
FALSE
;
if
(
is_virtual_desktop
(
))
return
FALSE
;
if
(
init_done
)
return
TRUE
;
icon_cx
=
GetSystemMetrics
(
SM_CXSMICON
)
+
2
*
ICON_BORDER
;
...
...
dlls/winex11.drv/window.c
View file @
99d04772
...
...
@@ -2474,7 +2474,7 @@ static BOOL hide_icon( struct x11drv_win_data *data )
if
(
data
->
managed
)
return
TRUE
;
/* hide icons in desktop mode when the taskbar is active */
if
(
root_window
==
DefaultRootWindow
(
gdi_display
))
return
FALSE
;
if
(
!
is_virtual_desktop
(
))
return
FALSE
;
return
IsWindowVisible
(
FindWindowW
(
trayW
,
NULL
));
}
...
...
@@ -2781,7 +2781,7 @@ static BOOL is_netwm_supported( Display *display, Atom atom )
*/
static
LRESULT
start_screensaver
(
void
)
{
if
(
root_window
==
DefaultRootWindow
(
gdi_display
))
if
(
!
is_virtual_desktop
(
))
{
const
char
*
argv
[
3
]
=
{
"xdg-screensaver"
,
"activate"
,
NULL
};
int
pid
=
_spawnvp
(
_P_DETACH
,
argv
[
0
],
argv
);
...
...
dlls/winex11.drv/x11drv.h
View file @
99d04772
...
...
@@ -656,6 +656,7 @@ struct x11drv_mode_info
extern
void
X11DRV_init_desktop
(
Window
win
,
unsigned
int
width
,
unsigned
int
height
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_resize_desktop
(
unsigned
int
width
,
unsigned
int
height
)
DECLSPEC_HIDDEN
;
extern
BOOL
is_virtual_desktop
(
void
)
DECLSPEC_HIDDEN
;
extern
BOOL
is_desktop_fullscreen
(
void
)
DECLSPEC_HIDDEN
;
extern
BOOL
create_desktop_win_data
(
Window
win
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_Settings_AddDepthModes
(
void
)
DECLSPEC_HIDDEN
;
...
...
dlls/winex11.drv/xinerama.c
View file @
99d04772
...
...
@@ -310,10 +310,10 @@ void xinerama_init( unsigned int width, unsigned int height )
SetRect
(
&
rect
,
0
,
0
,
width
,
height
);
if
(
root_window
!=
DefaultRootWindow
(
gdi_display
)
||
!
query_screens
())
if
(
is_virtual_desktop
(
)
||
!
query_screens
())
{
default_monitor
.
rcWork
=
default_monitor
.
rcMonitor
=
rect
;
if
(
root_window
==
DefaultRootWindow
(
gdi_display
))
if
(
!
is_virtual_desktop
(
))
query_work_area
(
&
default_monitor
.
rcWork
);
else
query_desktop_work_area
(
&
default_monitor
.
rcWork
);
...
...
dlls/winex11.drv/xrandr.c
View file @
99d04772
...
...
@@ -1099,7 +1099,7 @@ void X11DRV_XRandR_Init(void)
if
(
major
)
return
;
/* already initialized? */
if
(
!
usexrandr
)
return
;
/* disabled in config */
if
(
root_window
!=
DefaultRootWindow
(
gdi_display
))
return
;
if
(
is_virtual_desktop
(
))
return
;
if
(
!
(
ret
=
load_xrandr
()))
return
;
/* can't load the Xrandr library */
/* see if Xrandr is available */
...
...
dlls/winex11.drv/xvidmode.c
View file @
99d04772
...
...
@@ -210,7 +210,7 @@ void X11DRV_XF86VM_Init(void)
#endif
/* X_XF86VidModeSetGammaRamp */
/* retrieve modes */
if
(
usexvidmode
&&
root_window
==
DefaultRootWindow
(
gdi_display
))
if
(
usexvidmode
&&
!
is_virtual_desktop
(
))
{
X11DRV_expect_error
(
gdi_display
,
XVidModeErrorHandler
,
NULL
);
ok
=
pXF86VidModeGetAllModeLines
(
gdi_display
,
DefaultScreen
(
gdi_display
),
&
nmodes
,
&
real_xf86vm_modes
);
...
...
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