diff options
author | marha <marha@users.sourceforge.net> | 2010-12-22 13:20:05 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-12-22 13:20:05 +0000 |
commit | 8fd06c45853cb2300105db84e4b722f0e2dad8d2 (patch) | |
tree | 7446470a4b0a1a4060bc880214bcaf22ccc2868f /xorg-server/hw/xfree86/common/xf86PM.c | |
parent | fe2ccbf887ddf31f99d6f630830e3180ff259e40 (diff) | |
download | vcxsrv-8fd06c45853cb2300105db84e4b722f0e2dad8d2.tar.gz vcxsrv-8fd06c45853cb2300105db84e4b722f0e2dad8d2.tar.bz2 vcxsrv-8fd06c45853cb2300105db84e4b722f0e2dad8d2.zip |
xserver libX11 libXdmcp pixman git update 22-12-2010
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86PM.c')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86PM.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86PM.c b/xorg-server/hw/xfree86/common/xf86PM.c index 7af89b5b4..16b6bdc4a 100644 --- a/xorg-server/hw/xfree86/common/xf86PM.c +++ b/xorg-server/hw/xfree86/common/xf86PM.c @@ -33,6 +33,7 @@ #include "xf86.h" #include "xf86Priv.h" #include "xf86Xinput.h" +#include "xf86_OSproc.h" int (*xf86PMGetEventFromOs)(int fd,pmEvent *events,int num) = NULL; pmWait (*xf86PMConfirmEventToOs)(int fd,pmEvent event) = NULL; @@ -61,14 +62,14 @@ eventName(pmEvent event, char **str) } } +static int sigio_blocked_for_suspend; + static void suspend (pmEvent event, Bool undo) { int i; InputInfoPtr pInfo; - xf86inSuspend = TRUE; - for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->EnableDisableFBAccess) (*xf86Screens[i]->EnableDisableFBAccess) (i, FALSE); @@ -78,7 +79,7 @@ suspend (pmEvent event, Bool undo) DisableDevice(pInfo->dev, TRUE); pInfo = pInfo->next; } - xf86EnterServerState(SETUP); + sigio_blocked_for_suspend = xf86BlockSIGIO(); for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->PMEvent) xf86Screens[i]->PMEvent(i,event,undo); @@ -98,7 +99,6 @@ resume(pmEvent event, Bool undo) InputInfoPtr pInfo; xf86AccessEnter(); - xf86EnterServerState(SETUP); for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->PMEvent) xf86Screens[i]->PMEvent(i,event,undo); @@ -107,7 +107,7 @@ resume(pmEvent event, Bool undo) xf86Screens[i]->EnterVT(i, 0); } } - xf86EnterServerState(OPERATING); + xf86UnblockSIGIO(sigio_blocked_for_suspend); for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->EnableDisableFBAccess) (*xf86Screens[i]->EnableDisableFBAccess) (i, TRUE); @@ -118,18 +118,12 @@ resume(pmEvent event, Bool undo) EnableDevice(pInfo->dev, TRUE); pInfo = pInfo->next; } - xf86inSuspend = FALSE; } static void DoApmEvent(pmEvent event, Bool undo) { - /* - * we leave that as a global function for now. I don't know if - * this might cause problems in the future. It is a global server - * variable therefore it needs to be in a server info structure - */ - int i, setup = 0; + int i, was_blocked; switch(event) { #if 0 @@ -159,14 +153,13 @@ DoApmEvent(pmEvent event, Bool undo) } break; default: + was_blocked = xf86BlockSIGIO(); for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->PMEvent) { - if (!setup) xf86EnterServerState(SETUP); - setup = 1; xf86Screens[i]->PMEvent(i,event,undo); } } - if (setup) xf86EnterServerState(OPERATING); + xf86UnblockSIGIO(was_blocked); break; } } |