Merge remote branch 'jeremyhu/master'
This commit is contained in:
commit
c4a7a5917a
|
@ -792,7 +792,7 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
|
||||||
WindowPtr pChild;
|
WindowPtr pChild;
|
||||||
Bool WasViewable = (Bool)(pWin->viewable);
|
Bool WasViewable = (Bool)(pWin->viewable);
|
||||||
Bool anyMarked = TRUE;
|
Bool anyMarked = TRUE;
|
||||||
RegionPtr pOldClip = NULL, bsExposed;
|
RegionPtr pOldClip = NULL;
|
||||||
WindowPtr pLayerWin;
|
WindowPtr pLayerWin;
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ extern int noPanoramiXExtension;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static char __crashreporter_info_buff__[4096] = {0};
|
static char __crashreporter_info_buff__[4096] = {0};
|
||||||
static const char *__crashreporter_info__ = &__crashreporter_info_buff__[0];
|
static const char *__crashreporter_info__ __attribute__((__used__)) = &__crashreporter_info_buff__[0];
|
||||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
|
||||||
// This is actually a toolchain requirement, but I'm not sure the correct check,
|
// This is actually a toolchain requirement, but I'm not sure the correct check,
|
||||||
// but it should be fine to just only include it for Leopard and later. This line
|
// but it should be fine to just only include it for Leopard and later. This line
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <IOKit/pwr_mgt/IOPMLib.h>
|
#include <IOKit/pwr_mgt/IOPMLib.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
|
||||||
#include <rootlessCommon.h>
|
#include <rootlessCommon.h>
|
||||||
#include <Xplugin.h>
|
#include <Xplugin.h>
|
||||||
|
@ -246,6 +247,40 @@ void QuartzUpdateScreens(void) {
|
||||||
quartzProcs->UpdateScreen(pScreen);
|
quartzProcs->UpdateScreen(pScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void pokeActivityCallback(CFRunLoopTimerRef timer, void *info) {
|
||||||
|
UpdateSystemActivity(OverallAct);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void QuartzScreenSaver(int state) {
|
||||||
|
static CFRunLoopTimerRef pokeActivityTimer = NULL;
|
||||||
|
static CFRunLoopTimerContext pokeActivityContext = { 0, NULL, NULL, NULL, NULL };
|
||||||
|
static pthread_mutex_t pokeActivityMutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|
||||||
|
pthread_mutex_lock(&pokeActivityMutex);
|
||||||
|
|
||||||
|
if(state) {
|
||||||
|
if(pokeActivityTimer == NULL)
|
||||||
|
goto QuartzScreenSaverEnd;
|
||||||
|
|
||||||
|
CFRunLoopTimerInvalidate(pokeActivityTimer);
|
||||||
|
CFRelease(pokeActivityTimer);
|
||||||
|
pokeActivityTimer = NULL;
|
||||||
|
} else {
|
||||||
|
if(pokeActivityTimer != NULL)
|
||||||
|
goto QuartzScreenSaverEnd;
|
||||||
|
|
||||||
|
pokeActivityTimer = CFRunLoopTimerCreate(NULL, CFAbsoluteTimeGetCurrent(), 30, 0, 0, pokeActivityCallback, &pokeActivityContext);
|
||||||
|
if(pokeActivityTimer == NULL) {
|
||||||
|
ErrorF("Unable to create pokeActivityTimer.\n");
|
||||||
|
goto QuartzScreenSaverEnd;
|
||||||
|
}
|
||||||
|
|
||||||
|
CFRunLoopAddTimer(CFRunLoopGetMain(), pokeActivityTimer, kCFRunLoopCommonModes);
|
||||||
|
}
|
||||||
|
QuartzScreenSaverEnd:
|
||||||
|
pthread_mutex_unlock(&pokeActivityMutex);
|
||||||
|
}
|
||||||
|
|
||||||
void QuartzShowFullscreen(int state) {
|
void QuartzShowFullscreen(int state) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -256,6 +291,8 @@ void QuartzShowFullscreen(int state) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QuartzScreenSaver(!state);
|
||||||
|
|
||||||
if(XQuartzFullscreenVisible == state)
|
if(XQuartzFullscreenVisible == state)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -438,7 +438,6 @@ static Bool QuartzRandRSetConfig (ScreenPtr pScreen,
|
||||||
static Bool _QuartzRandRUpdateFakeModes (ScreenPtr pScreen) {
|
static Bool _QuartzRandRUpdateFakeModes (ScreenPtr pScreen) {
|
||||||
QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
|
QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen);
|
||||||
|
|
||||||
if (pQuartzScreen->displayCount == 1) {
|
|
||||||
if(pQuartzScreen->fullscreenMode.ref)
|
if(pQuartzScreen->fullscreenMode.ref)
|
||||||
CFRelease(pQuartzScreen->fullscreenMode.ref);
|
CFRelease(pQuartzScreen->fullscreenMode.ref);
|
||||||
if(pQuartzScreen->currentMode.ref)
|
if(pQuartzScreen->currentMode.ref)
|
||||||
|
@ -448,8 +447,7 @@ static Bool _QuartzRandRUpdateFakeModes (ScreenPtr pScreen) {
|
||||||
&pQuartzScreen->fullscreenMode))
|
&pQuartzScreen->fullscreenMode))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
CFRetain(pQuartzScreen->fullscreenMode.ref); /* This extra retain is for currentMode's copy */
|
if (pQuartzScreen->displayCount > 1) {
|
||||||
} else {
|
|
||||||
pQuartzScreen->fullscreenMode.width = pScreen->width;
|
pQuartzScreen->fullscreenMode.width = pScreen->width;
|
||||||
pQuartzScreen->fullscreenMode.height = pScreen->height;
|
pQuartzScreen->fullscreenMode.height = pScreen->height;
|
||||||
if(XQuartzIsRootless)
|
if(XQuartzIsRootless)
|
||||||
|
@ -468,6 +466,11 @@ static Bool _QuartzRandRUpdateFakeModes (ScreenPtr pScreen) {
|
||||||
pQuartzScreen->currentMode = pQuartzScreen->fullscreenMode;
|
pQuartzScreen->currentMode = pQuartzScreen->fullscreenMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This extra retain is for currentMode's copy.
|
||||||
|
* fullscreen and rootless share a retain.
|
||||||
|
*/
|
||||||
|
CFRetain(pQuartzScreen->currentMode.ref);
|
||||||
|
|
||||||
DEBUG_LOG("rootlessMode: %d x %d\n", (int)pQuartzScreen->rootlessMode.width, (int)pQuartzScreen->rootlessMode.height);
|
DEBUG_LOG("rootlessMode: %d x %d\n", (int)pQuartzScreen->rootlessMode.width, (int)pQuartzScreen->rootlessMode.height);
|
||||||
DEBUG_LOG("fullscreenMode: %d x %d\n", (int)pQuartzScreen->fullscreenMode.width, (int)pQuartzScreen->fullscreenMode.height);
|
DEBUG_LOG("fullscreenMode: %d x %d\n", (int)pQuartzScreen->fullscreenMode.width, (int)pQuartzScreen->fullscreenMode.height);
|
||||||
DEBUG_LOG("currentMode: %d x %d\n", (int)pQuartzScreen->currentMode.width, (int)pQuartzScreen->currentMode.height);
|
DEBUG_LOG("currentMode: %d x %d\n", (int)pQuartzScreen->currentMode.width, (int)pQuartzScreen->currentMode.height);
|
||||||
|
|
2
os/log.c
2
os/log.c
|
@ -121,7 +121,7 @@ static Bool needBuffer = TRUE;
|
||||||
#include <AvailabilityMacros.h>
|
#include <AvailabilityMacros.h>
|
||||||
|
|
||||||
static char __crashreporter_info_buff__[4096] = {0};
|
static char __crashreporter_info_buff__[4096] = {0};
|
||||||
static const char *__crashreporter_info__ = &__crashreporter_info_buff__[0];
|
static const char *__crashreporter_info__ __attribute__((__used__)) = &__crashreporter_info_buff__[0];
|
||||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
|
||||||
// This is actually a toolchain requirement, but I'm not sure the correct check,
|
// This is actually a toolchain requirement, but I'm not sure the correct check,
|
||||||
// but it should be fine to just only include it for Leopard and later. This line
|
// but it should be fine to just only include it for Leopard and later. This line
|
||||||
|
|
Loading…
Reference in New Issue