~muktupavels/metacity/adwaita-icon-theme-lp-1414613

« back to all changes in this revision

Viewing changes to src/wm-tester/focus-window.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-10-03 22:44:28 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20051003224428-ft31gkmz12qpzohj
Tags: 1:2.12.1-0ubuntu1
* New upstream release:
  - Thanks to Ray Strode, Havoc Pennington, and Elijah Newren for
    improvements in this release.
  - Truncate ridiculously long titles to avoid crashing or letting the
    pager crash (Ray, Havoc, Elijah) [#315070] (Ubuntu: #15995)
  - Get the tabbing window outline to work with gtk+ 2.8.4 again
    (Elijah) [#317528] (Ubuntu: #16589)
  - Translations: Mahay Alam Khan (bn), Francisco Javier F. Serrador (es), 
    Ivar Smolin (et), I\uffffaki Larra\uffffaga Murgoitio (eu), Luca 
    Ferretti (it), Christian Rose (sv), Clytie Siddall (vi), Funda 
    Wang (zh_CN)
* debian/control.in:
  - Bumped Standards-Version.
* debian/patches/003_bordersdrawingfix.patch:
  - dropped, fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <X11/Xlib.h>
 
2
#include <X11/Xutil.h>
 
3
#include <stdio.h>
 
4
#include <stdlib.h>
 
5
 
 
6
int main (int argc, char **argv)
 
7
{
 
8
  Display *d;
 
9
  Window w;
 
10
  const char *w_str;
 
11
  char *end;
 
12
  
 
13
  if (argc != 2)
 
14
    {
 
15
      fprintf (stderr, "Usage: focus-window WINDOWID\n");
 
16
      exit (1);
 
17
    }
 
18
  
 
19
  d = XOpenDisplay (NULL);
 
20
 
 
21
  w_str = argv[1];
 
22
  end = NULL;
 
23
  
 
24
  w = strtoul (w_str, &end, 16);
 
25
  if (end == w_str)
 
26
    {
 
27
      fprintf (stderr, "Usage: focus-window WINDOWID\n");
 
28
      exit (1);
 
29
    }
 
30
 
 
31
  printf ("Setting input focus to 0x%lx\n", w);
 
32
  XSetInputFocus (d, w, RevertToPointerRoot, CurrentTime);
 
33
  XFlush (d);
 
34
  
 
35
  return 0;
 
36
}
 
37