[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xbacklight: Changes to 'upstream-unstable'



 .gitignore     |   24 ++++++++++++++++++++++++
 Makefile.am    |   12 +++++++++++-
 README         |   28 ++++++++++++++++++++++++++++
 configure.ac   |   11 +++++++----
 xbacklight.c   |   33 +++++++++++++++++++++++++++------
 xbacklight.man |    2 +-
 6 files changed, 98 insertions(+), 12 deletions(-)

New commits:
commit cbf474d6751dd32154163b8997519319655f0545
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Thu Sep 24 17:54:45 2009 -0700

    xbacklight 1.1.1
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>

diff --git a/configure.ac b/configure.ac
index 3c5b9a7..c56de7e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ([2.57])
-AC_INIT(xbacklight,[1.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xbacklight)
+AC_INIT(xbacklight,[1.1.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xbacklight)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE
 

commit da0d7d89130b9a9e31905897627f0c805a58b2b3
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Thu Sep 24 17:53:43 2009 -0700

    Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>

diff --git a/Makefile.am b/Makefile.am
index abf6d1a..a73beca 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,7 +23,7 @@ AUTOMAKE_OPTIONS = foreign
 
 bin_PROGRAMS = xbacklight
 
-AM_CFLAGS = $(XRANDR_CFLAGS)
+AM_CFLAGS = $(CWARNFLAGS) $(XRANDR_CFLAGS)
 xbacklight_LDADD = $(XRANDR_LIBS)
 
 xbacklight_SOURCES =	\
diff --git a/configure.ac b/configure.ac
index 7536fbc..3c5b9a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,25 +26,20 @@ AC_INIT(xbacklight,[1.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xo
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE
 
-# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
-m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.2)
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
 
 AM_CONFIG_HEADER(config.h)
 
 AC_PROG_CC
 AC_PROG_INSTALL
 
-XORG_CWARNFLAGS
+XORG_DEFAULT_OPTIONS
 
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2.0 xrender x11)
-XRANDR_CFLAGS="$CWARNFLAGS $XRANDR_CFLAGS"
 AC_SUBST(XRANDR_CFLAGS)
 AC_SUBST(XRANDR_LIBS)
 
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
-XORG_CHANGELOG
-
 AC_OUTPUT([Makefile])

commit 1b52fc41b59899b45dd1b06f9c1268b4458f9cd6
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Thu Sep 24 17:43:47 2009 -0700

    Add README with pointers to mailing lists, bugzilla, & git
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>

diff --git a/README b/README
new file mode 100644
index 0000000..56ecc39
--- /dev/null
+++ b/README
@@ -0,0 +1,28 @@
+Xbacklight is used to adjust the backlight brightness where supported. 
+It uses the RandR extension to find all outputs on the X server
+supporting backlight brightness control and changes them all in the
+same way.
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+        http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+        git://anongit.freedesktop.org/git/xorg/app/xbacklight
+
+        http://cgit.freedesktop.org/xorg/app/xbacklight
+
+For patch submission instructions, see:
+
+	http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+        http://wiki.x.org/wiki/GitPage
+

commit 5512e161157d6ac8a8d8a27fc99d596c6686b1da
Author: Matthias Hopf <mhopf@suse.de>
Date:   Wed Aug 19 14:38:31 2009 +0200

    Use "Backlight" RandR property, fall back to legacy "BACKLIGHT".

diff --git a/xbacklight.c b/xbacklight.c
index 6eb3327..9b68ce8 100644
--- a/xbacklight.c
+++ b/xbacklight.c
@@ -33,7 +33,7 @@ typedef enum { Get, Set, Inc, Dec } op_t;
 
 static char *program_name;
 
-static Atom backlight;
+static Atom backlight, backlight_new, backlight_legacy;
 
 static void
 usage (void)
@@ -62,11 +62,21 @@ backlight_get (Display *dpy, RROutput output)
     int		    actual_format;
     long	    value;
     
-    if (XRRGetOutputProperty (dpy, output, backlight,
+    backlight = backlight_new;
+    if (!backlight ||
+	XRRGetOutputProperty (dpy, output, backlight,
 			      0, 4, False, False, None,
 			      &actual_type, &actual_format,
-			      &nitems, &bytes_after, &prop) != Success)
-	return -1;
+			      &nitems, &bytes_after, &prop) != Success) {
+	backlight = backlight_legacy;
+	if (!backlight ||
+	    XRRGetOutputProperty (dpy, output, backlight,
+				  0, 4, False, False, None,
+				  &actual_type, &actual_format,
+				  &nitems, &bytes_after, &prop) != Success)
+	    return -1;
+    }
+
     if (actual_type != XA_INTEGER || nitems != 1 || actual_format != 32)
 	value = -1;
     else
@@ -184,8 +194,10 @@ main (int argc, char **argv)
 	fprintf (stderr, "RandR version %d.%d too old\n", major, minor);
 	exit (1);
     }
-    backlight = XInternAtom (dpy, "BACKLIGHT", True);
-    if (backlight == None)
+
+    backlight_new    = XInternAtom (dpy, "Backlight", True);
+    backlight_legacy = XInternAtom (dpy, "BACKLIGHT", True);
+    if (backlight_new == None && backlight_legacy == None)
     {
 	fprintf (stderr, "No outputs have backlight property\n");
 	exit (1);

commit 97a3f5665a62ff3a606da48f3854d082f249e6a8
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Date:   Mon Jan 19 19:17:58 2009 -0200

    Ansification and compile warning fixes.
    
      This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
    make distcheck and all gcc 4.3 and sparse warnings.

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5a26cac
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,24 @@
+.deps
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config.status
+config.sub
+configure
+depcomp
+install-sh
+missing
+stamp-h1
+xbacklight
+xbacklight.1
+*~
+*.o
+ChangeLog
+xbacklight-*.tar.*
+tags
diff --git a/Makefile.am b/Makefile.am
index f79356b..abf6d1a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -62,3 +62,13 @@ SUFFIXES = .$(APP_MAN_SUFFIX) .man
 
 .man.$(APP_MAN_SUFFIX):
 	sed $(MAN_SUBSTS) < $< > $@
+
+EXTRA_DIST += ChangeLog
+MAINTAINERCLEANFILES=ChangeLog
+
+.PHONY: ChangeLog
+
+ChangeLog:
+	$(CHANGELOG_CMD)
+
+dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index 68723a7..7536fbc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,17 +26,25 @@ AC_INIT(xbacklight,[1.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xo
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE
 
+# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.2)
+
 AM_CONFIG_HEADER(config.h)
 
 AC_PROG_CC
 AC_PROG_INSTALL
 
+XORG_CWARNFLAGS
+
 # Checks for pkg-config packages
 PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2.0 xrender x11)
+XRANDR_CFLAGS="$CWARNFLAGS $XRANDR_CFLAGS"
 AC_SUBST(XRANDR_CFLAGS)
 AC_SUBST(XRANDR_LIBS)
 
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
+XORG_CHANGELOG
 
 AC_OUTPUT([Makefile])
diff --git a/xbacklight.c b/xbacklight.c
index d0cdb92..6eb3327 100644
--- a/xbacklight.c
+++ b/xbacklight.c
@@ -25,6 +25,10 @@
 #include <X11/Xlib.h>
 #include <X11/extensions/Xrandr.h>
 
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+
 typedef enum { Get, Set, Inc, Dec } op_t;
 
 static char *program_name;
@@ -225,6 +229,9 @@ main (int argc, char **argv)
 			    case Dec:
 				new = cur - set;
 				break;
+			    default:
+				XSync (dpy, False);
+				return 1;
 			    }
 			    if (new > max) new = max;
 			    if (new < min) new = min;
@@ -249,4 +256,6 @@ main (int argc, char **argv)
 	XRRFreeScreenResources (resources);
     }
     XSync (dpy, False);
+
+    return 0;
 }

commit a0dc8902b476fc2dddf02fceec7a7186d81f48fc
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Thu Sep 6 16:27:47 2007 -0700

    Man page typo ("faiding")

diff --git a/xbacklight.man b/xbacklight.man
index b5a060c..e415035 100644
--- a/xbacklight.man
+++ b/xbacklight.man
@@ -50,7 +50,7 @@ Print out a summary of the usage and exit.
 Length of time to spend fading the backlight between old and new value.
 Default is 200.
 .IP "-steps \fInumber\fP"
-Number of steps to take while faiding. Default is 20.
+Number of steps to take while fading. Default is 20.
 .SH "SEE ALSO"
 Xrandr(3)
 .SH AUTHORS


Reply to: