aboutsummaryrefslogtreecommitdiffstats
path: root/unix/xserver
diff options
context:
space:
mode:
authorPeter Åstrand <astrand@cendio.se>2011-10-31 08:14:40 +0000
committerPeter Åstrand <astrand@cendio.se>2011-10-31 08:14:40 +0000
commit01b2433de87ec4456785fbb9d3bad1b7a38438f2 (patch)
tree54ee51d57119ddcfedf825e898cec42ba6459345 /unix/xserver
parent1b84bcdc8c8ba120c2ba24db6a465f4bea49f805 (diff)
downloadtigervnc-01b2433de87ec4456785fbb9d3bad1b7a38438f2.tar.gz
tigervnc-01b2433de87ec4456785fbb9d3bad1b7a38438f2.zip
Activate the DPMS extension; avoid Ubuntu 11.10 crashing.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4745 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix/xserver')
-rw-r--r--unix/xserver/hw/vnc/Makefile.am4
-rw-r--r--unix/xserver/hw/vnc/xvnc.cc18
2 files changed, 20 insertions, 2 deletions
diff --git a/unix/xserver/hw/vnc/Makefile.am b/unix/xserver/hw/vnc/Makefile.am
index 42da2b40..2f58b4ca 100644
--- a/unix/xserver/hw/vnc/Makefile.am
+++ b/unix/xserver/hw/vnc/Makefile.am
@@ -24,13 +24,13 @@ bin_PROGRAMS = Xvnc
man1_MANS = Xvnc.man
-Xvnc_SOURCES = xvnc.cc $(top_srcdir)/Xext/dpmsstubs.c \
+Xvnc_SOURCES = xvnc.cc \
$(top_srcdir)/Xi/stubs.c $(top_srcdir)/mi/miinitext.c \
$(top_srcdir)/fb/fbcmap_mi.c buildtime.c
nodist_Xvnc_SOURCES = fbrop.h fb.h pixman.h
-Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DTIGERVNC -DNO_HW_ONLY_EXTS -DNO_MODULE_EXTS \
+Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DTIGERVNC -DNO_MODULE_EXTS \
-UHAVE_CONFIG_H \
-DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
-DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(TIGERVNC_SRCDIR)/common \
diff --git a/unix/xserver/hw/vnc/xvnc.cc b/unix/xserver/hw/vnc/xvnc.cc
index 210a31a1..41384a45 100644
--- a/unix/xserver/hw/vnc/xvnc.cc
+++ b/unix/xserver/hw/vnc/xvnc.cc
@@ -211,6 +211,24 @@ static void vfbFreeFramebufferMemory(vfbFramebufferInfoPtr pfb);
extern "C" {
+#ifdef DPMSExtension
+ /* Why support DPMS? Because stupid modern desktop environments
+ such as Unity 2D on Ubuntu 11.10 crashes if DPMS is not
+ available. (DPMSSet is called by dpms.c, but the return value
+ is ignored.) */
+int DPMSSet(ClientPtr client, int level)
+{
+ return Success;
+}
+
+Bool DPMSSupported()
+{
+ /* Causes DPMSCapable to return false, meaning no devices are DPMS
+ capable */
+ return FALSE;
+}
+#endif
+
void ddxGiveUp()
{
int i;