Lines Matching refs:button
59 static XID get_window_id ( Display *dpy, int screen, int button, const char *msg );
83 " -button number specific button to be pressed to select window\n"
103 char *button_name = NULL; /* name of button for window select */
104 int button; /* button number or negative for all */
109 button = SelectButtonFirst;
129 case 'b': /* -button number */
130 if (++i >= argc) usage ("-button requires an argument");
176 if (button_name && !parse_button (button_name, &button)) {
177 fprintf (stderr, "%s: invalid button specification \"%s\"\n",
182 if (button >= 0 || button == SelectButtonFirst) {
185 unsigned int ub = (unsigned int) button;
196 if (button >= 0) { /* check button */
204 "%s: no button number %u in pointer map, can't select window\n",
209 button = (int) ((unsigned int) pointer_map[0]);
212 if ((id = get_window_id (dpy, screenno, button,
261 get_window_id(Display *dpy, int screen, int button, const char *msg)
266 int retbutton = -1; /* button used to select window */
280 if (button == -1)
281 printf ("any button");
283 printf ("button %d", button);
302 retbutton = event.xbutton.button;
318 return ((button == -1 || retbutton == button) ? retwin : None);
365 * ask the user to press in the root with each button in succession
377 int button = (int) pointer_map[i];
378 if (button == 0) continue; /* disabled */
379 if (get_window_id (dpy, screenno, button, msg) != root) {
383 okay++; /* must have at least one button */