Lines Matching refs:tmp

45 static void InsertInIconManager(IconMgr *ip, WList *tmp, TwmWindow *tmp_win);
174 WList *tmp = NULL;
192 if ((tmp = Active->next) == NULL)
193 tmp = ip->first;
198 if ((tmp = Active->prev) == NULL)
199 tmp = ip->last;
242 for (tmp = ip->first; tmp != NULL; tmp = tmp->next) {
243 if (tmp->row == new_row && tmp->col == new_col) {
256 if (tmp == NULL)
262 XWarpPointer(dpy, None, tmp->icon, 0, 0, 0, 0, 5, 5);
265 if (tmp->twm->title_height) {
267 int x = tmp->twm->highlightx;
269 XWarpPointer(dpy, None, tmp->twm->title_w, 0, 0, 0, 0,
273 XWarpPointer(dpy, None, tmp->twm->w, 0, 0, 0, 0, 5, 5);
353 WList *tmp;
373 tmp = (WList *) malloc(sizeof(WList));
374 tmp->iconmgr = ip;
375 tmp->next = NULL;
376 tmp->active = FALSE;
377 tmp->down = FALSE;
379 InsertInIconManager(ip, tmp, tmp_win);
381 tmp->twm = tmp_win;
383 tmp->fore = Scr->IconManagerC.fore;
384 tmp->back = Scr->IconManagerC.back;
385 tmp->highlight = Scr->IconManagerHighlight;
388 &tmp->fore);
390 &tmp->back);
392 &tmp_win->xclass, &tmp->highlight);
399 tmp->me = ip->count;
400 tmp->x = -1;
401 tmp->y = -1;
404 attributes.background_pixel = tmp->back;
405 attributes.border_pixel = tmp->back;
410 tmp->w = XCreateWindow(dpy, ip->w, 0, 0, (unsigned int) 1,
416 attributes.background_pixel = tmp->back;
421 tmp->icon = XCreateWindow(dpy, tmp->w, 5, (int) (h - siconify_height) / 2,
431 XMapWindow(dpy, tmp->w);
433 XSaveContext(dpy, tmp->w, IconManagerContext, (XPointer) tmp);
434 XSaveContext(dpy, tmp->w, TwmContext, (XPointer) tmp_win);
435 XSaveContext(dpy, tmp->w, ScreenContext, (XPointer) Scr);
436 XSaveContext(dpy, tmp->icon, TwmContext, (XPointer) tmp_win);
437 XSaveContext(dpy, tmp->icon, ScreenContext, (XPointer) Scr);
438 tmp_win->list = tmp;
446 Active = tmp;
448 return (tmp);
455 * \param tmp the entry to insert
458 InsertInIconManager(IconMgr *ip, WList *tmp, TwmWindow *tmp_win)
467 ip->first = tmp;
468 tmp->prev = NULL;
469 ip->last = tmp;
475 tmp->next = tmp1;
476 tmp->prev = tmp1->prev;
477 tmp1->prev = tmp;
478 if (tmp->prev == NULL)
479 ip->first = tmp;
481 tmp->prev->next = tmp;
489 ip->last->next = tmp;
490 tmp->prev = ip->last;
491 ip->last = tmp;
496 RemoveFromIconManager(IconMgr *ip, WList *tmp)
498 if (tmp->prev == NULL)
499 ip->first = tmp->next;
501 tmp->prev->next = tmp->next;
503 if (tmp->next == NULL)
504 ip->last = tmp->prev;
506 tmp->next->prev = tmp->prev;
517 WList *tmp;
522 tmp = tmp_win->list;
524 ip = tmp->iconmgr;
526 RemoveFromIconManager(ip, tmp);
528 XDeleteContext(dpy, tmp->icon, TwmContext);
529 XDeleteContext(dpy, tmp->icon, ScreenContext);
530 XDestroyWindow(dpy, tmp->icon);
531 XDeleteContext(dpy, tmp->w, IconManagerContext);
532 XDeleteContext(dpy, tmp->w, TwmContext);
533 XDeleteContext(dpy, tmp->w, ScreenContext);
534 XDestroyWindow(dpy, tmp->w);
536 free(tmp);
563 DrawIconManagerBorder(WList *tmp)
566 XSetForeground(dpy, Scr->NormalGC, tmp->fore);
567 XDrawRectangle(dpy, tmp->w, Scr->NormalGC, 2, 2,
568 (unsigned) (tmp->width - 5),
569 (unsigned) (tmp->height - 5));
571 if (tmp->active && Scr->Highlight)
572 XSetForeground(dpy, Scr->NormalGC, tmp->highlight);
574 XSetForeground(dpy, Scr->NormalGC, tmp->back);
576 XDrawRectangle(dpy, tmp->w, Scr->NormalGC, 0, 0,
577 (unsigned) (tmp->width - 1),
578 (unsigned) (tmp->height - 1));
579 XDrawRectangle(dpy, tmp->w, Scr->NormalGC, 1, 1,
580 (unsigned) (tmp->width - 3),
581 (unsigned) (tmp->height - 3));
631 WList *tmp;
646 for (i = 0, tmp = ip->first; tmp != NULL; i++, tmp = tmp->next) {
649 tmp->me = i;
661 if (tmp->x != new_x || tmp->y != new_y ||
662 tmp->width != wwidth || tmp->height != wheight) {
663 XMoveResizeWindow(dpy, tmp->w,
667 tmp->row = row - 1;
668 tmp->col = col;
669 tmp->x = new_x;
670 tmp->y = new_y;
671 tmp->width = wwidth;
672 tmp->height = wheight;