diff options
author | marha <marha@users.sourceforge.net> | 2011-03-25 10:41:05 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-03-25 10:41:05 +0000 |
commit | 272e57235cd60a2e65ac8258d96a02eb3939b687 (patch) | |
tree | 789d74bd6ec1cc468f1f81aab97d4e4dfdb2d5c5 /apps/xwininfo/xwininfo.c | |
parent | b39f063f74bf0163eaf34db03134f226d18142ec (diff) | |
download | vcxsrv-272e57235cd60a2e65ac8258d96a02eb3939b687.tar.gz vcxsrv-272e57235cd60a2e65ac8258d96a02eb3939b687.tar.bz2 vcxsrv-272e57235cd60a2e65ac8258d96a02eb3939b687.zip |
git update until 25 Mar 2011
xserver
fontconfig
glproto
libXau
libXft
libXmu
libfontenc
libxcb
mesa
mkfontscale
pixman
randrproto
xkeyboard-config
xtrans
xwininfo
updated following packages:
xproto-7.0.21
xineramaproto-1.2.1
libXt-1.1.1
libxkbfile-1.0.7
libXpm-3.5.9
libXfont-1.4.3
libXaw-1.0.9
bdftopcf-1.0.3
encodings-1.0.4
fixesproto-5.0
font-adobe-100dpi-1.0.3
font-adobe-75dpi-1.0.3
font-adobe-utopia-100dpi-1.0.4
font-adobe-utopia-75dpi-1.0.4
font-adobe-utopia-type1-1.0.4
font-alias-1.0.3
font-arabic-misc-1.0.3
font-bh-100dpi-1.0.3
font-bh-75dpi-1.0.3
font-bh-lucidatypewriter-100dpi-1.0.3
font-bh-lucidatypewriter-75dpi-1.0.3
font-bh-ttf-1.0.3
font-bh-type1-1.0.3
font-bitstream-100dpi-1.0.3
font-bitstream-75dpi-1.0.3
font-bitstream-speedo-1.0.2
font-bitstream-type1-1.0.3
font-cronyx-cyrillic-1.0.3
font-cursor-misc-1.0.3
font-daewoo-misc-1.0.3
font-dec-misc-1.0.3
font-ibm-type1-1.0.3
font-isas-misc-1.0.3
font-jis-misc-1.0.3
font-micro-misc-1.0.3
font-misc-cyrillic-1.0.3
font-misc-ethiopic-1.0.3
font-misc-meltho-1.0.3
font-misc-misc-1.1.2
font-mutt-misc-1.0.3
font-schumacher-misc-1.1.2
font-screen-cyrillic-1.0.4
font-sony-misc-1.0.3
font-sun-misc-1.0.3
font-util-1.2.0
font-winitzki-cyrillic-1.0.3
font-xfree86-type1-1.0.4
Diffstat (limited to 'apps/xwininfo/xwininfo.c')
-rw-r--r-- | apps/xwininfo/xwininfo.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/apps/xwininfo/xwininfo.c b/apps/xwininfo/xwininfo.c index 265f6c611..4a199322a 100644 --- a/apps/xwininfo/xwininfo.c +++ b/apps/xwininfo/xwininfo.c @@ -277,7 +277,7 @@ static size_t strlcat (char *dst, const char *src, size_t dstsize) /* * Report the syntax for calling xwininfo: */ -void +static void usage (void) { fprintf (stderr, @@ -630,8 +630,9 @@ main (int argc, char **argv) w->wm_pid_cookie = xcb_get_property (dpy, False, window, atom_net_wm_pid, XCB_ATOM_CARDINAL, 0, BUFSIZ); - w->wm_client_machine_cookie = - GET_TEXT_PROPERTY(dpy, window, XCB_ATOM_WM_CLIENT_MACHINE); + w->wm_client_machine_cookie = xcb_get_property + (dpy, False, window, XCB_ATOM_WM_CLIENT_MACHINE, + XCB_GET_PROPERTY_TYPE_ANY, 0, BUFSIZ); } atom_net_frame_extents = Get_Atom (dpy, "_NET_FRAME_EXTENTS"); @@ -785,9 +786,9 @@ Display_Window_Id (struct wininfo *w, Bool newline_wanted) { #ifdef USE_XCB_ICCCM xcb_get_text_property_reply_t wmn_reply; + uint8_t got_reply = False; #endif xcb_get_property_reply_t *prop; - uint8_t got_reply = False; const char *wm_name = NULL; unsigned int wm_name_len = 0; xcb_atom_t wm_name_encoding = XCB_NONE; @@ -806,10 +807,7 @@ Display_Window_Id (struct wininfo *w, Bool newline_wanted) wm_name = xcb_get_property_value (prop); wm_name_len = xcb_get_property_value_length (prop); wm_name_encoding = prop->type; - got_reply = True; - } - - if (!got_reply) { /* No _NET_WM_NAME, check WM_NAME */ + } else { /* No _NET_WM_NAME, check WM_NAME */ #ifdef USE_XCB_ICCCM got_reply = xcb_get_wm_name_reply (dpy, w->wm_name_cookie, &wmn_reply, NULL); @@ -824,11 +822,10 @@ Display_Window_Id (struct wininfo *w, Bool newline_wanted) wm_name = xcb_get_property_value (prop); wm_name_len = xcb_get_property_value_length (prop); wm_name_encoding = prop->type; - got_reply = True; } #endif } - if (!got_reply || wm_name_len == 0) { + if (wm_name_len == 0) { printf (" (has no name)"); } else { if (wm_name_encoding == XCB_ATOM_STRING) { @@ -939,8 +936,8 @@ Display_Stats_Info (struct wininfo *w) if (!trans_coords) Fatal_Error ("Can't get translated coordinates."); - rx = trans_coords->dst_x; - ry = trans_coords->dst_y; + rx = (int16_t)trans_coords->dst_x; + ry = (int16_t)trans_coords->dst_y; free (trans_coords); xright = (dw - rx - w->geometry->border_width * 2 - |