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
ed22f045
Commit
ed22f045
authored
May 03, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Move screen saver activation to the X11 driver.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
43c430a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
21 deletions
+27
-21
window.c
dlls/winex11.drv/window.c
+25
-1
desktop.c
programs/explorer/desktop.c
+2
-20
No files found.
dlls/winex11.drv/window.c
View file @
ed22f045
...
...
@@ -21,6 +21,7 @@
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdlib.h>
...
...
@@ -2764,6 +2765,25 @@ static BOOL is_netwm_supported( Display *display, Atom atom )
/***********************************************************************
* start_screensaver
*/
static
LRESULT
start_screensaver
(
void
)
{
if
(
root_window
==
DefaultRootWindow
(
gdi_display
))
{
const
char
*
argv
[
3
]
=
{
"xdg-screensaver"
,
"activate"
,
NULL
};
int
pid
=
_spawnvp
(
_P_DETACH
,
argv
[
0
],
argv
);
if
(
pid
>
0
)
{
TRACE
(
"started process %d
\n
"
,
pid
);
return
0
;
}
}
return
-
1
;
}
/***********************************************************************
* SysCommand (X11DRV.@)
*
* Perform WM_SYSCOMMAND handling.
...
...
@@ -2774,7 +2794,11 @@ LRESULT CDECL X11DRV_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
int
dir
;
struct
x11drv_win_data
*
data
;
if
(
!
(
data
=
get_win_data
(
hwnd
)))
return
-
1
;
if
(
!
(
data
=
get_win_data
(
hwnd
)))
{
if
(
wparam
==
SC_SCREENSAVE
&&
hwnd
==
GetDesktopWindow
())
return
start_screensaver
();
return
-
1
;
}
if
(
!
data
->
whole_window
||
!
data
->
managed
||
!
data
->
mapped
)
goto
failed
;
switch
(
wparam
&
0xfff0
)
...
...
programs/explorer/desktop.c
View file @
ed22f045
...
...
@@ -583,22 +583,6 @@ static void initialize_launchers( HWND hwnd )
}
}
/* screen saver handler */
static
BOOL
start_screensaver
(
void
)
{
if
(
using_root
)
{
const
char
*
argv
[
3
]
=
{
"xdg-screensaver"
,
"activate"
,
NULL
};
int
pid
=
_spawnvp
(
_P_DETACH
,
argv
[
0
],
argv
);
if
(
pid
>
0
)
{
WINE_TRACE
(
"started process %d
\n
"
,
pid
);
return
TRUE
;
}
}
return
FALSE
;
}
static
WNDPROC
desktop_orig_wndproc
;
/* window procedure for the desktop window */
...
...
@@ -613,11 +597,9 @@ static LRESULT WINAPI desktop_wnd_proc( HWND hwnd, UINT message, WPARAM wp, LPAR
{
case
SC_CLOSE
:
ExitWindows
(
0
,
0
);
break
;
case
SC_SCREENSAVE
:
return
start_screensaver
();
return
0
;
}
return
0
;
break
;
case
WM_CLOSE
:
PostQuitMessage
(
0
);
...
...
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