[Patch 01/02] mieq threading prep: Push screen-saver/DPMS handling to after the EQ pop operation.

Jeremy Huddleston jeremyhu at freedesktop.org
Mon Nov 17 11:32:03 PST 2008


This way we on't need to hold the mutex during the dixSaveScreens()  
call.

Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
Signed-off-by: Peter Hutterer <peter.hutterer at redhat.com>
---
  mi/mieq.c |   20 ++++++++++----------
  1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/mi/mieq.c b/mi/mieq.c
index 7437966..82f0c66 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -314,16 +314,6 @@ mieqProcessInputEvents(void)
                   master = NULL;

      while (miEventQueue.head != miEventQueue.tail) {
-        if (screenIsSaved == SCREEN_SAVER_ON)
-            dixSaveScreens (serverClient, SCREEN_SAVER_OFF,  
ScreenSaverReset);
-#ifdef DPMSExtension
-        else if (DPMSPowerLevel != DPMSModeOn)
-            SetScreenSaverTimer();
-
-        if (DPMSPowerLevel != DPMSModeOn)
-            DPMSSet(serverClient, DPMSModeOn);
-#endif
-
          e = &miEventQueue.events[miEventQueue.head];

          /* GenericEvents always have nevents == 1 */
@@ -346,6 +336,16 @@ mieqProcessInputEvents(void)
          type    = event->u.u.type;
          master  = (!dev->isMaster && dev->u.master) ? dev- 
 >u.master : NULL;

+        if (screenIsSaved == SCREEN_SAVER_ON)
+            dixSaveScreens (serverClient, SCREEN_SAVER_OFF,  
ScreenSaverReset);
+#ifdef DPMSExtension
+        else if (DPMSPowerLevel != DPMSModeOn)
+            SetScreenSaverTimer();
+
+        if (DPMSPowerLevel != DPMSModeOn)
+            DPMSSet(serverClient, DPMSModeOn);
+#endif
+
          /* Custom event handler */
          handler = miEventQueue.handlers[type];

-- 
1.6.0.3


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3221 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20081117/71bd8ee4/attachment.bin>


More information about the xorg mailing list