summaryrefslogtreecommitdiff
path: root/xserver/hw/xquartz/quartz.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2011-04-02 16:08:42 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2011-04-02 16:08:42 +0000
commit45d2cfad3bb2ac4246dc1863e5b8689d6bb34fa8 (patch)
tree8cf9735d4bf7b17b11cb2b5f9d56b797d20c438d /xserver/hw/xquartz/quartz.c
parent68fd41f12f9344d45b8a897e368548c7dcb0d366 (diff)
Update to xserver 1.9.5. Tested by jasper@, ajacoutot@ and krw@
Diffstat (limited to 'xserver/hw/xquartz/quartz.c')
-rw-r--r--xserver/hw/xquartz/quartz.c37
1 files changed, 36 insertions, 1 deletions
diff --git a/xserver/hw/xquartz/quartz.c b/xserver/hw/xquartz/quartz.c
index 26b2c1f38..11e5a74d7 100644
--- a/xserver/hw/xquartz/quartz.c
+++ b/xserver/hw/xquartz/quartz.c
@@ -63,6 +63,7 @@
#include <fcntl.h>
#include <IOKit/pwr_mgt/IOPMLib.h>
#include <pthread.h>
+#include <signal.h>
#include <rootlessCommon.h>
#include <Xplugin.h>
@@ -80,7 +81,8 @@ Bool XQuartzRootlessDefault = TRUE;
Bool XQuartzIsRootless = TRUE;
Bool XQuartzServerVisible = FALSE;
Bool XQuartzFullscreenMenu = FALSE;
-Bool XQuartzUseSysBeep = FALSE;
+
+int32_t XQuartzShieldingWindowLevel = 0;
/*
===========================================================================
@@ -144,6 +146,26 @@ void QuartzInitOutput(
int argc,
char **argv )
{
+ /* For XQuartz, we want to just use the default signal handler to work better with CrashTracer */
+ signal(SIGSEGV, SIG_DFL);
+ signal(SIGILL, SIG_DFL);
+#ifdef SIGEMT
+ signal(SIGEMT, SIG_DFL);
+#endif
+ signal(SIGFPE, SIG_DFL);
+#ifdef SIGBUS
+ signal(SIGBUS, SIG_DFL);
+#endif
+#ifdef SIGSYS
+ signal(SIGSYS, SIG_DFL);
+#endif
+#ifdef SIGXCPU
+ signal(SIGXCPU, SIG_DFL);
+#endif
+#ifdef SIGXFSZ
+ signal(SIGXFSZ, SIG_DFL);
+#endif
+
if (!RegisterBlockAndWakeupHandlers(QuartzBlockHandler,
QuartzWakeupHandler,
NULL))
@@ -245,6 +267,9 @@ void QuartzUpdateScreens(void) {
DeliverEvents(pRoot, &e, 1, NullWindow);
quartzProcs->UpdateScreen(pScreen);
+
+ /* Tell RandR about the new size, so new connections get the correct info */
+ RRScreenSizeNotify(pScreen);
}
static void pokeActivityCallback(CFRunLoopTimerRef timer, void *info) {
@@ -446,3 +471,13 @@ void QuartzCopyDisplayIDs(ScreenPtr pScreen,
memcpy(pQuartzScreen->displayIDs, displayIDs, size);
pQuartzScreen->displayCount = displayCount;
}
+
+void NSBeep(void);
+void DDXRingBell(
+ int volume, // volume is % of max
+ int pitch, // pitch is Hz
+ int duration) // duration is milliseconds
+{
+ if (volume)
+ NSBeep();
+}