View | Details | Raw Unified | Return to bug 152522
Collapse All | Expand All

(-)a/hw/xfree86/common/xf86Events.c (-14 / +21 lines)
Lines 869-886 xf86VTSwitch() Link Here
869
     * Keep the order: Disable Device > LeaveVT
869
     * Keep the order: Disable Device > LeaveVT
870
     *                        EnterVT > EnableDevice
870
     *                        EnterVT > EnableDevice
871
     */
871
     */
872
873
    for (i = 0; i < xf86NumScreens; i++)
874
	xf86Screens[i]->LeaveVT(i, 0);
875
876
    for (ih = InputHandlers; ih; ih = ih->next)
877
      xf86DisableInputHandler(ih);
878
872
    pInfo = xf86InputDevs;
879
    pInfo = xf86InputDevs;
873
    while (pInfo) {
880
    while (pInfo) {
874
      if (pInfo->dev)
881
      if (pInfo->dev)
875
          DisableDevice(pInfo->dev);
882
          DisableDevice(pInfo->dev);
876
      pInfo = pInfo->next;
883
      pInfo = pInfo->next;
877
    }
884
    }
885
    /* XXX HACK */
878
    xf86EnterServerState(SETUP);
886
    xf86EnterServerState(SETUP);
879
    for (i = 0; i < xf86NumScreens; i++)
880
	xf86Screens[i]->LeaveVT(i, 0);
881
887
882
    for (ih = InputHandlers; ih; ih = ih->next)
883
      xf86DisableInputHandler(ih);
884
    xf86AccessLeave();      /* We need this here, otherwise */
888
    xf86AccessLeave();      /* We need this here, otherwise */
885
    xf86AccessLeaveState(); /* console won't be restored    */
889
    xf86AccessLeaveState(); /* console won't be restored    */
886
890
Lines 910-929 xf86VTSwitch() Link Here
910
914
911
      pInfo = xf86InputDevs;
915
      pInfo = xf86InputDevs;
912
      while (pInfo) {
916
      while (pInfo) {
913
        if (pInfo->dev) {
917
        if (pInfo->dev)
914
            xf86ReleaseKeys(pInfo->dev);
915
            EnableDevice(pInfo->dev);
918
            EnableDevice(pInfo->dev);
916
        }
917
	pInfo = pInfo->next;
919
	pInfo = pInfo->next;
918
      }
920
      }
919
      /* XXX HACK */
920
      xf86ReleaseKeys(inputInfo.keyboard);
921
      for (ih = InputHandlers; ih; ih = ih->next)
921
      for (ih = InputHandlers; ih; ih = ih->next)
922
        xf86EnableInputHandler(ih);
922
        xf86EnableInputHandler(ih);
923
923
924
      xf86UnblockSIGIO(prevSIGIO);
924
      xf86UnblockSIGIO(prevSIGIO);
925
925
926
    } else {
926
    } else {
927
928
	pInfo = xf86InputDevs;
929
	while (pInfo) {
930
	    if (pInfo->dev) {
931
		xf86ReleaseKeys(pInfo->dev);
932
	    }
933
	    pInfo = pInfo->next;
934
	}
935
	/* XXX HACK */
936
	xf86ReleaseKeys(inputInfo.keyboard);
937
927
#ifdef XF86PM
938
#ifdef XF86PM
928
	  if (xf86OSPMClose)
939
	  if (xf86OSPMClose)
929
	      xf86OSPMClose();
940
	      xf86OSPMClose();
Lines 974-987 xf86VTSwitch() Link Here
974
985
975
    pInfo = xf86InputDevs;
986
    pInfo = xf86InputDevs;
976
    while (pInfo) {
987
    while (pInfo) {
977
      if (pInfo->dev) {
988
      if (pInfo->dev)
978
          xf86ReleaseKeys(pInfo->dev);
979
          EnableDevice(pInfo->dev);
989
          EnableDevice(pInfo->dev);
980
      }
981
      pInfo = pInfo->next;
990
      pInfo = pInfo->next;
982
    }
991
    }
983
    /* XXX HACK */
984
    xf86ReleaseKeys(inputInfo.keyboard);
985
992
986
    for (ih = InputHandlers; ih; ih = ih->next)
993
    for (ih = InputHandlers; ih; ih = ih->next)
987
      xf86EnableInputHandler(ih);
994
      xf86EnableInputHandler(ih);

Return to bug 152522