From: Zebediah Figura Subject: [PATCH 4/4] winemac.drv: Implement waking up the display when activity occurs. Message-Id: <1529625588-2810-4-git-send-email-zfigura@codeweavers.com> Date: Thu, 21 Jun 2018 18:59:48 -0500 In-Reply-To: <1529625588-2810-1-git-send-email-zfigura@codeweavers.com> References: <1529625588-2810-1-git-send-email-zfigura@codeweavers.com> Signed-off-by: Zebediah Figura --- dlls/winemac.drv/macdrv_main.c | 12 ++++++++++++ dlls/winemac.drv/winemac.drv.spec | 3 +++ 2 files changed, 15 insertions(+) diff --git a/dlls/winemac.drv/macdrv_main.c b/dlls/winemac.drv/macdrv_main.c index 491ab06..1e76d94 100644 --- a/dlls/winemac.drv/macdrv_main.c +++ b/dlls/winemac.drv/macdrv_main.c @@ -451,3 +451,15 @@ BOOL CDECL macdrv_SystemParametersInfo( UINT action, UINT int_param, void *ptr_p } return FALSE; } + +/*********************************************************************** + * wine_notify_activity (X11DRV.@) + * + * Notify the display server that activity has occurred, e.g. to wake up + * the display and reset any power management related timeouts. + */ +void CDECL macdrv_notify_activity(void) +{ + static IOPMAssertionID assertion; + IOPMAssertionDeclareUserActivity("Wine user input", kIOPMUserActiveLocal, &assertion); +} diff --git a/dlls/winemac.drv/winemac.drv.spec b/dlls/winemac.drv/winemac.drv.spec index 6fa723a..9658fad 100644 --- a/dlls/winemac.drv/winemac.drv.spec +++ b/dlls/winemac.drv/winemac.drv.spec @@ -45,6 +45,9 @@ @ cdecl WindowPosChanged(long long long ptr ptr ptr ptr ptr) macdrv_WindowPosChanged @ cdecl WindowPosChanging(long long long ptr ptr ptr ptr) macdrv_WindowPosChanging +# Desktop +@ cdecl wine_notify_activity() macdrv_notify_activity + # System tray @ cdecl wine_notify_icon(long ptr) -- 2.7.4