[PATCH 4/4] winemac.drv: Implement waking up the display when activity occurs.

Zebediah Figura zfigura at codeweavers.com
Thu Jun 21 18:59:48 CDT 2018


Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 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




More information about the wine-devel mailing list