diff options
author | marha <marha@users.sourceforge.net> | 2013-10-21 07:47:02 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-10-21 07:47:02 +0200 |
commit | 6d895f30ab93d71afddc612d8b007f2de7f04165 (patch) | |
tree | 2fc8ec6985dbbcd007b299e8bc7536e70fb21e32 /xorg-server/Xext | |
parent | 5880b059e9a156336daf32a73bed72def6ba90f2 (diff) | |
download | vcxsrv-6d895f30ab93d71afddc612d8b007f2de7f04165.tar.gz vcxsrv-6d895f30ab93d71afddc612d8b007f2de7f04165.tar.bz2 vcxsrv-6d895f30ab93d71afddc612d8b007f2de7f04165.zip |
fontconfig mesa xserver xkeyboard-config git update 21 okt 2013
xserver commit 8db4121a3c7104548fd4a138ac1d1bdea5fd22d9
libxcb commit e4e0c6eec861f4c69da12060dc8dbe7a63fa5eb6
libxcb/xcb-proto commit 55c75accecf0e76d2aa38656efd2be4044b9e643
xkeyboard-config commit 39a9a10ff11f6872e4b278240fbabb4e98209fa6
libX11 commit 18a5278b008e9faa59b346fcab18a8d74b875fda
libXdmcp commit 089081dca4ba3598c6f9bf401c029378943b5854
libXext commit 7378d4bdbd33ed49ed6cfa5c4f73d7527982aab4
libfontenc commit 3acba630d8b57084f7e92c15732408711ed5137a
libXinerama commit 6e1d1dc328ba8162bba2f4694e7f3c706a1491ff
libXau commit 304a11be4727c5a7feeb2501e8e001466f8ce84e
xkbcomp commit 839ccda42d8b088d94324cd77c4be954859914d3
pixman commit 3c2f4b651747c1ac484c39d5128cae5483094342
xextproto commit f27fcc99d1cf935cc289933326f7d3baacd5107a
randrproto commit ca7cc541c2e43e6c784df19b4583ac35829d2f72
glproto commit 8e3407e02980d088e20041e79bdcdd3737e7827e
mkfontscale commit f48de13423c7300f4da9f61993b624426b38ddc0
xwininfo commit ba0d1b0da21d2dbdd81098ed5778f3792b472e13
libXft commit c5e760a239afc62a1c75e0509868e35957c8df52
libXmu commit 2539e539eafdac88177c8ee30b043c5d52f017e4
libxtrans commit f6a161f2a003f4da0a2e414b4faa0ee0de0c01f0
fontconfig commit 5e029db4971e37437cfe6147d52d00136dfb8cb5
mesa commit 14429295e16cf9b7616494fb68f400dfb9c80c71
Diffstat (limited to 'xorg-server/Xext')
-rw-r--r-- | xorg-server/Xext/saver.c | 6 | ||||
-rw-r--r-- | xorg-server/Xext/sync.c | 121 |
2 files changed, 83 insertions, 44 deletions
diff --git a/xorg-server/Xext/saver.c b/xorg-server/Xext/saver.c index fe81bc4d7..e06f40837 100644 --- a/xorg-server/Xext/saver.c +++ b/xorg-server/Xext/saver.c @@ -392,9 +392,7 @@ ScreenSaverFreeSuspend(pointer value, XID id) DeviceIntPtr dev; UpdateCurrentTimeIf(); nt_list_for_each_entry(dev, inputInfo.devices, next) - lastDeviceEventTime[dev->id] = currentTime; - lastDeviceEventTime[XIAllDevices] = currentTime; - lastDeviceEventTime[XIAllMasterDevices] = currentTime; + NoticeTime(dev, currentTime); SetScreenSaverTimer(); } } @@ -681,7 +679,7 @@ ProcScreenSaverQueryInfo(ClientPtr client) pPriv = GetScreenPrivate(pDraw->pScreen); UpdateCurrentTime(); - lastInput = GetTimeInMillis() - lastDeviceEventTime[XIAllDevices].milliseconds; + lastInput = GetTimeInMillis() - LastEventTime(XIAllDevices).milliseconds; rep = (xScreenSaverQueryInfoReply) { .type = X_Reply, diff --git a/xorg-server/Xext/sync.c b/xorg-server/Xext/sync.c index 9ae5b3981..b2ee92e37 100644 --- a/xorg-server/Xext/sync.c +++ b/xorg-server/Xext/sync.c @@ -699,6 +699,14 @@ SyncAwaitTriggerFired(SyncTrigger * pTrigger) FreeResource(pAwaitUnion->header.delete_id, RT_NONE); } +static CARD64 +SyncUpdateCounter(SyncCounter *pCounter, CARD64 newval) +{ + CARD64 oldval = pCounter->value; + pCounter->value = newval; + return oldval; +} + /* This function should always be used to change a counter's value so that * any triggers depending on the counter will be checked. */ @@ -708,8 +716,7 @@ SyncChangeCounter(SyncCounter * pCounter, CARD64 newval) SyncTriggerList *ptl, *pnext; CARD64 oldval; - oldval = pCounter->value; - pCounter->value = newval; + oldval = SyncUpdateCounter(pCounter, newval); /* run through triggers to see if any become true */ for (ptl = pCounter->sync.pTriglist; ptl; ptl = pnext) { @@ -1019,6 +1026,11 @@ SyncComputeBracketValues(SyncCounter * pCounter) psci->bracket_greater = pTrigger->test_value; pnewgtval = &psci->bracket_greater; } + else if (XSyncValueGreaterThan(pCounter->value, pTrigger->test_value) && + XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less)) { + psci->bracket_less = pTrigger->test_value; + pnewltval = &psci->bracket_less; + } } else if (pTrigger->test_type == XSyncNegativeComparison && ct != XSyncCounterNeverDecreases) { @@ -1028,52 +1040,53 @@ SyncComputeBracketValues(SyncCounter * pCounter) psci->bracket_less = pTrigger->test_value; pnewltval = &psci->bracket_less; } + else if (XSyncValueLessThan(pCounter->value, pTrigger->test_value) && + XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater)) { + psci->bracket_greater = pTrigger->test_value; + pnewgtval = &psci->bracket_greater; + } } else if (pTrigger->test_type == XSyncNegativeTransition && ct != XSyncCounterNeverIncreases) { - if (XSyncValueGreaterThan(pCounter->value, pTrigger->test_value) && - XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less)) - { - psci->bracket_less = pTrigger->test_value; - pnewltval = &psci->bracket_less; + if (XSyncValueGreaterOrEqual(pCounter->value, pTrigger->test_value) && + XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less)) { + /* + * If the value is exactly equal to our threshold, we want one + * more event in the negative direction to ensure we pick up + * when the value is less than this threshold. + */ + psci->bracket_less = pTrigger->test_value; + pnewltval = &psci->bracket_less; } - else if (XSyncValueEqual(pCounter->value, pTrigger->test_value) && - XSyncValueGreaterThan(pTrigger->test_value, - psci->bracket_less)) { - /* - * The value is exactly equal to our threshold. We want one - * more event in the negative direction to ensure we pick up - * when the value is less than this threshold. - */ - psci->bracket_less = pTrigger->test_value; - pnewltval = &psci->bracket_less; + else if (XSyncValueLessThan(pCounter->value, pTrigger->test_value) && + XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater)) { + psci->bracket_greater = pTrigger->test_value; + pnewgtval = &psci->bracket_greater; } } else if (pTrigger->test_type == XSyncPositiveTransition && ct != XSyncCounterNeverDecreases) { - if (XSyncValueLessThan(pCounter->value, pTrigger->test_value) && - XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater)) - { - psci->bracket_greater = pTrigger->test_value; - pnewgtval = &psci->bracket_greater; + if (XSyncValueLessOrEqual(pCounter->value, pTrigger->test_value) && + XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater)) { + /* + * If the value is exactly equal to our threshold, we + * want one more event in the positive direction to + * ensure we pick up when the value *exceeds* this + * threshold. + */ + psci->bracket_greater = pTrigger->test_value; + pnewgtval = &psci->bracket_greater; } - else if (XSyncValueEqual(pCounter->value, pTrigger->test_value) && - XSyncValueLessThan(pTrigger->test_value, - psci->bracket_greater)) { - /* - * The value is exactly equal to our threshold. We want one - * more event in the positive direction to ensure we pick up - * when the value *exceeds* this threshold. - */ - psci->bracket_greater = pTrigger->test_value; - pnewgtval = &psci->bracket_greater; + else if (XSyncValueGreaterThan(pCounter->value, pTrigger->test_value) && + XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less)) { + psci->bracket_less = pTrigger->test_value; + pnewltval = &psci->bracket_less; } } } /* end for each trigger */ - if (pnewgtval || pnewltval) { - (*psci->BracketValues) ((pointer) pCounter, pnewltval, pnewgtval); - } + (*psci->BracketValues) ((pointer) pCounter, pnewltval, pnewgtval); + } /* @@ -2619,7 +2632,7 @@ IdleTimeQueryValue(pointer pCounter, CARD64 * pValue_return) } else deviceid = XIAllDevices; - idle = GetTimeInMillis() - lastDeviceEventTime[deviceid].milliseconds; + idle = GetTimeInMillis() - LastEventTime(deviceid).milliseconds; XSyncIntsToValue(pValue_return, idle, 0); } @@ -2638,7 +2651,7 @@ IdleTimeBlockHandler(pointer pCounter, struct timeval **wt, pointer LastSelectMa return; old_idle = counter->value; - IdleTimeQueryValue(NULL, &idle); + IdleTimeQueryValue(counter, &idle); counter->value = idle; /* push, so CheckTrigger works */ if (less && XSyncValueLessOrEqual(idle, *less)) { @@ -2700,6 +2713,17 @@ IdleTimeBlockHandler(pointer pCounter, struct timeval **wt, pointer LastSelectMa } static void +IdleTimeCheckBrackets(SyncCounter *counter, XSyncValue idle, XSyncValue *less, XSyncValue *greater) +{ + if ((greater && XSyncValueGreaterOrEqual(idle, *greater)) || + (less && XSyncValueLessOrEqual(idle, *less))) { + SyncChangeCounter(counter, idle); + } + else + SyncUpdateCounter(counter, idle); +} + +static void IdleTimeWakeupHandler(pointer pCounter, int rc, pointer LastSelectMask) { SyncCounter *counter = pCounter; @@ -2713,10 +2737,24 @@ IdleTimeWakeupHandler(pointer pCounter, int rc, pointer LastSelectMask) IdleTimeQueryValue(pCounter, &idle); - if ((greater && XSyncValueGreaterOrEqual(idle, *greater)) || - (less && XSyncValueLessOrEqual(idle, *less))) { - SyncChangeCounter(counter, idle); + /* + There is no guarantee for the WakeupHandler to be called within a specific + timeframe. Idletime may go to 0, but by the time we get here, it may be + non-zero and alarms for a pos. transition on 0 won't get triggered. + https://bugs.freedesktop.org/show_bug.cgi?id=70476 + */ + if (LastEventTimeWasReset(priv->deviceid)) { + LastEventTimeToggleResetFlag(priv->deviceid, FALSE); + if (!XSyncValueIsZero(idle)) { + XSyncValue zero; + XSyncIntsToValue(&zero, 0, 0); + IdleTimeCheckBrackets(counter, zero, less, greater); + less = priv->value_less; + greater = priv->value_greater; + } } + + IdleTimeCheckBrackets(counter, idle, less, greater); } static void @@ -2734,6 +2772,9 @@ IdleTimeBracketValues(pointer pCounter, CARD64 * pbracket_less, IdleTimeWakeupHandler, pCounter); } else if (!registered && (pbracket_less || pbracket_greater)) { + /* Reset flag must be zero so we don't force a idle timer reset on + the first wakeup */ + LastEventTimeToggleResetAll(FALSE); RegisterBlockAndWakeupHandlers(IdleTimeBlockHandler, IdleTimeWakeupHandler, pCounter); } |