Update to xprop 1.0.4

This commit is contained in:
matthieu 2008-04-20 16:36:07 +00:00
parent b0446f754a
commit a99339125b
9 changed files with 75 additions and 36 deletions

View File

@ -1,3 +1,39 @@
commit 427023df02bd38ff9dc2af2a2059466f37f4cfd8
Author: Benjamin Close <Benjamin.Close@clearchain.com>
Date: Wed Dec 19 15:17:34 2007 +1030
Fix build under autoconf 2.57
configure.ac specifies a max version of 2.57 but AC_CHECK_HEADERS_ONCE
was only introduced to autoconf in 2.59c. Drop the _ONCE to make autoconf happy
Bug: 13631
Found by: tinderbox
Approved by: daniels@
commit e09956f244099ddd36b1a2cd5d7800d5fc7120c1
Author: Kim Woelders <kim@woelders.dk>
Date: Thu Dec 6 05:30:43 2007 -0500
Select correct client window in WMs using virtual roots
From bug 2185¹
When manually selecting a window, xprop finds the top-level window containing
the pointer and uses XmuClientWindow to attempt to find a client window having
WM_STATE set.
In a WM using virtual roots (e.g. enlightenment, desks other than first) this
fails beacuse the top-level window is a virtual root, and XmuClientWindow seems
to find the first client having WM_STATE set, which only by coincidence will be
the one the user intended to select (i.e. containing the pointer).
The solution is to descend the window hierarchy at the pointer location to find
a window with WM_STATE set.
1] https://bugs.freedesktop.org/show_bug.cgi?id=2185
Signed-off-by: James Cloos <cloos@jhcloos.com>
commit 9ccda86dae06375750685977a81f4fb1cabf3d00 commit 9ccda86dae06375750685977a81f4fb1cabf3d00
Author: Alan Coopersmith <alan.coopersmith@sun.com> Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Fri Aug 10 14:52:27 2007 -0700 Date: Fri Aug 10 14:52:27 2007 -0700

View File

@ -27,6 +27,8 @@ xprop_LDADD = $(XPROP_LIBS)
xprop_SOURCES = \ xprop_SOURCES = \
dsimple.c \ dsimple.c \
dsimple.h \ dsimple.h \
clientwin.c \
clientwin.h \
xprop.c xprop.c
appman_PRE = \ appman_PRE = \

View File

@ -76,7 +76,8 @@ CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS) PROGRAMS = $(bin_PROGRAMS)
am_xprop_OBJECTS = dsimple.$(OBJEXT) xprop.$(OBJEXT) am_xprop_OBJECTS = dsimple.$(OBJEXT) clientwin.$(OBJEXT) \
xprop.$(OBJEXT)
xprop_OBJECTS = $(am_xprop_OBJECTS) xprop_OBJECTS = $(am_xprop_OBJECTS)
am__DEPENDENCIES_1 = am__DEPENDENCIES_1 =
xprop_DEPENDENCIES = $(am__DEPENDENCIES_1) xprop_DEPENDENCIES = $(am__DEPENDENCIES_1)
@ -217,6 +218,8 @@ xprop_LDADD = $(XPROP_LIBS)
xprop_SOURCES = \ xprop_SOURCES = \
dsimple.c \ dsimple.c \
dsimple.h \ dsimple.h \
clientwin.c \
clientwin.h \
xprop.c xprop.c
appman_PRE = \ appman_PRE = \
@ -337,6 +340,7 @@ mostlyclean-compile:
distclean-compile: distclean-compile:
-rm -f *.tab.c -rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clientwin.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsimple.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsimple.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprop.Po@am__quote@

12
app/xprop/aclocal.m4 vendored
View File

@ -1042,7 +1042,7 @@ AC_DEFUN([XORG_MACROS_VERSION],[
XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
[XORG_MACROS_version=1.1.5 [XORG_MACROS_version=1.1.6
XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
@ -1191,7 +1191,11 @@ AC_DEFUN([XORG_CHECK_LINUXDOC],[
XORG_SGML_PATH=$prefix/share/sgml XORG_SGML_PATH=$prefix/share/sgml
HAVE_DEFS_ENT= HAVE_DEFS_ENT=
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) if test x"$cross_compiling" = x"yes" ; then
HAVE_DEFS_ENT=no
else
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
fi
AC_PATH_PROG(LINUXDOC, linuxdoc) AC_PATH_PROG(LINUXDOC, linuxdoc)
AC_PATH_PROG(PS2PDF, ps2pdf) AC_PATH_PROG(PS2PDF, ps2pdf)
@ -1463,14 +1467,14 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
[`echo $PACKAGE_VERSION | cut -d . -f 1`], [`echo $PACKAGE_VERSION | cut -d . -f 1`],
[Major version of this package]) [Major version of this package])
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2` PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
if test "x$PVM" = "x"; then if test "x$PVM" = "x"; then
PVM="0" PVM="0"
fi fi
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
[$PVM], [$PVM],
[Minor version of this package]) [Minor version of this package])
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3` PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
if test "x$PVP" = "x"; then if test "x$PVP" = "x"; then
PVP="0" PVP="0"
fi fi

26
app/xprop/configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for xprop 1.0.3. # Generated by GNU Autoconf 2.59 for xprop 1.0.4.
# #
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
# #
@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package. # Identity of this package.
PACKAGE_NAME='xprop' PACKAGE_NAME='xprop'
PACKAGE_TARNAME='xprop' PACKAGE_TARNAME='xprop'
PACKAGE_VERSION='1.0.3' PACKAGE_VERSION='1.0.4'
PACKAGE_STRING='xprop 1.0.3' PACKAGE_STRING='xprop 1.0.4'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
# Factoring default headers for most tests. # Factoring default headers for most tests.
@ -791,7 +791,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures xprop 1.0.3 to adapt to many kinds of systems. \`configure' configures xprop 1.0.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -857,7 +857,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of xprop 1.0.3:";; short | recursive ) echo "Configuration of xprop 1.0.4:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -989,7 +989,7 @@ fi
test -n "$ac_init_help" && exit 0 test -n "$ac_init_help" && exit 0
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
xprop configure 1.0.3 xprop configure 1.0.4
generated by GNU Autoconf 2.59 generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc. Copyright (C) 2003 Free Software Foundation, Inc.
@ -1003,7 +1003,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by xprop $as_me 1.0.3, which was It was created by xprop $as_me 1.0.4, which was
generated by GNU Autoconf 2.59. Invocation command line was generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@ $ $0 $@
@ -1601,7 +1601,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='xprop' PACKAGE='xprop'
VERSION='1.0.3' VERSION='1.0.4'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -1767,7 +1767,7 @@ fi
XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'` XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`
echo "$as_me:$LINENO: checking if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}" >&5 echo "$as_me:$LINENO: checking if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}" >&5
echo $ECHO_N "checking if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}... $ECHO_C" >&6 echo $ECHO_N "checking if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}... $ECHO_C" >&6
XORG_MACROS_version=1.1.5 XORG_MACROS_version=1.1.6
XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'` XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`
if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
@ -4016,7 +4016,7 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1` #define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
_ACEOF _ACEOF
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2` PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
if test "x$PVM" = "x"; then if test "x$PVM" = "x"; then
PVM="0" PVM="0"
fi fi
@ -4025,7 +4025,7 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION_MINOR $PVM #define PACKAGE_VERSION_MINOR $PVM
_ACEOF _ACEOF
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3` PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
if test "x$PVP" = "x"; then if test "x$PVP" = "x"; then
PVP="0" PVP="0"
fi fi
@ -4427,7 +4427,7 @@ _ASBOX
} >&5 } >&5
cat >&5 <<_CSEOF cat >&5 <<_CSEOF
This file was extended by xprop $as_me 1.0.3, which was This file was extended by xprop $as_me 1.0.4, which was
generated by GNU Autoconf 2.59. Invocation command line was generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -4490,7 +4490,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\ ac_cs_version="\\
xprop config.status 1.0.3 xprop config.status 1.0.4
configured by $0, generated by GNU Autoconf 2.59, configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

View File

@ -1,4 +1,3 @@
dnl Copyright 2005 Red Hat, Inc. dnl Copyright 2005 Red Hat, Inc.
dnl dnl
dnl Permission to use, copy, modify, distribute, and sell this software and its dnl Permission to use, copy, modify, distribute, and sell this software and its
@ -22,7 +21,7 @@ dnl
dnl Process this file with autoconf to create configure. dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57]) AC_PREREQ([2.57])
AC_INIT(xprop,[1.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xprop) AC_INIT(xprop,[1.0.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xprop)
AM_INIT_AUTOMAKE([dist-bzip2]) AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE AM_MAINTAINER_MODE

View File

@ -41,6 +41,7 @@ from The Open Group.
* Written by Mark Lillibridge. Last updated 7/1/87 * Written by Mark Lillibridge. Last updated 7/1/87
*/ */
#include "clientwin.h"
#include "dsimple.h" #include "dsimple.h"
/* /*
@ -263,7 +264,7 @@ Window Select_Window_Args(
* Routine to let user select a window using the mouse * Routine to let user select a window using the mouse
*/ */
Window Select_Window(Display *dpy) Window Select_Window(Display *dpy, int descend)
{ {
int status; int status;
Cursor cursor; Cursor cursor;
@ -302,6 +303,11 @@ Window Select_Window(Display *dpy)
XUngrabPointer(dpy, CurrentTime); /* Done with pointer */ XUngrabPointer(dpy, CurrentTime); /* Done with pointer */
if (!descend || (target_win == root))
return(target_win);
target_win = Find_Client(dpy, root, target_win);
return(target_win); return(target_win);
} }

View File

@ -78,7 +78,7 @@ void usage(void);
* Send bugs, etc. to chariot@athena.mit.edu. * Send bugs, etc. to chariot@athena.mit.edu.
*/ */
Window Select_Window(Display *); Window Select_Window(Display *, int descend);
Window Window_With_Name(Display *, Window, const char *); Window Window_With_Name(Display *, Window, const char *);
#ifdef __GNUC__ #ifdef __GNUC__
void Fatal_Error(char *, ...) __attribute__((__noreturn__)); void Fatal_Error(char *, ...) __attribute__((__noreturn__));

View File

@ -51,7 +51,6 @@ from The Open Group.
#endif #endif
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <X11/Xmu/WinUtil.h>
#include "dsimple.h" #include "dsimple.h"
@ -1702,19 +1701,8 @@ main (int argc, char **argv)
if ((remove_props != NULL || set_props != NULL) && argc > 0) if ((remove_props != NULL || set_props != NULL) && argc > 0)
usage(); usage();
if (target_win == None) { if (target_win == None)
target_win = Select_Window(dpy); target_win = Select_Window(dpy, !frame_only);
if (target_win != None && !frame_only) {
Window root;
int dummyi;
unsigned int dummy;
if (XGetGeometry (dpy, target_win, &root, &dummyi, &dummyi,
&dummy, &dummy, &dummy, &dummy)
&& target_win != root)
target_win = XmuClientWindow (dpy, target_win);
}
}
if (remove_props != NULL) { if (remove_props != NULL) {
int count; int count;