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
67d16dde
Commit
67d16dde
authored
Nov 15, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Move the screen saver support to a new SystemParametersInfo entry point.
parent
13fbce56
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
29 deletions
+32
-29
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+1
-2
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+31
-27
No files found.
dlls/winex11.drv/winex11.drv.spec
View file @
67d16dde
...
...
@@ -19,8 +19,6 @@
@ cdecl GetCursorPos(ptr) X11DRV_GetCursorPos
@ cdecl SetCursorPos(long long) X11DRV_SetCursorPos
@ cdecl ClipCursor(ptr) X11DRV_ClipCursor
@ cdecl GetScreenSaveActive() X11DRV_GetScreenSaveActive
@ cdecl SetScreenSaveActive(long) X11DRV_SetScreenSaveActive
@ cdecl ChangeDisplaySettingsEx(ptr ptr long long long) X11DRV_ChangeDisplaySettingsEx
@ cdecl EnumDisplayMonitors(long ptr ptr long) X11DRV_EnumDisplayMonitors
@ cdecl EnumDisplaySettingsEx(ptr long ptr long) X11DRV_EnumDisplaySettingsEx
...
...
@@ -54,6 +52,7 @@
@ cdecl WindowMessage(long long long long) X11DRV_WindowMessage
@ cdecl WindowPosChanging(long long long ptr ptr ptr ptr) X11DRV_WindowPosChanging
@ cdecl WindowPosChanged(long long long ptr ptr ptr ptr ptr) X11DRV_WindowPosChanged
@ cdecl SystemParametersInfo(long long ptr long) X11DRV_SystemParametersInfo
# WinTab32
@ cdecl AttachEventQueueToTablet(long) X11DRV_AttachEventQueueToTablet
...
...
dlls/winex11.drv/x11drv_main.c
View file @
67d16dde
...
...
@@ -696,35 +696,39 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
return
ret
;
}
/***********************************************************************
* GetScreenSaveActive (X11DRV.@)
*
* Returns the active status of the screen saver
*/
BOOL
CDECL
X11DRV_GetScreenSaveActive
(
void
)
{
int
timeout
,
temp
;
XGetScreenSaver
(
gdi_display
,
&
timeout
,
&
temp
,
&
temp
,
&
temp
);
return
timeout
!=
0
;
}
/***********************************************************************
* SetScreenSaveActive (X11DRV.@)
*
* Activate/Deactivate the screen saver
* SystemParametersInfo (X11DRV.@)
*/
void
CDECL
X11DRV_SetScreenSaveActive
(
BOOL
bActivate
)
BOOL
CDECL
X11DRV_SystemParametersInfo
(
UINT
action
,
UINT
int_param
,
void
*
ptr_param
,
UINT
flags
)
{
int
timeout
,
interval
,
prefer_blanking
,
allow_exposures
;
static
int
last_timeout
=
15
*
60
;
XLockDisplay
(
gdi_display
);
XGetScreenSaver
(
gdi_display
,
&
timeout
,
&
interval
,
&
prefer_blanking
,
&
allow_exposures
);
if
(
timeout
)
last_timeout
=
timeout
;
timeout
=
bActivate
?
last_timeout
:
0
;
XSetScreenSaver
(
gdi_display
,
timeout
,
interval
,
prefer_blanking
,
allow_exposures
);
XUnlockDisplay
(
gdi_display
);
switch
(
action
)
{
case
SPI_GETSCREENSAVEACTIVE
:
if
(
ptr_param
)
{
int
timeout
,
temp
;
XGetScreenSaver
(
gdi_display
,
&
timeout
,
&
temp
,
&
temp
,
&
temp
);
*
(
BOOL
*
)
ptr_param
=
timeout
!=
0
;
return
TRUE
;
}
break
;
case
SPI_SETSCREENSAVEACTIVE
:
{
int
timeout
,
interval
,
prefer_blanking
,
allow_exposures
;
static
int
last_timeout
=
15
*
60
;
XLockDisplay
(
gdi_display
);
XGetScreenSaver
(
gdi_display
,
&
timeout
,
&
interval
,
&
prefer_blanking
,
&
allow_exposures
);
if
(
timeout
)
last_timeout
=
timeout
;
timeout
=
int_param
?
last_timeout
:
0
;
XSetScreenSaver
(
gdi_display
,
timeout
,
interval
,
prefer_blanking
,
allow_exposures
);
XUnlockDisplay
(
gdi_display
);
}
break
;
}
return
FALSE
;
/* let user32 handle it */
}
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