Lines Matching refs:tmp_win

46 static void PlaceIcon(TwmWindow *tmp_win, int def_x, int def_y,
48 static IconEntry *FindIconEntry(TwmWindow *tmp_win, IconRegion **irp);
53 static Image *LookupIconNameOrClass(TwmWindow *tmp_win, Icon *icon,
212 * location in final_[xy], and also sets the IconRegion in tmp_win->icon
216 PlaceIcon(TwmWindow *tmp_win, int def_x, int def_y,
223 const int iconWidth = tmp_win->icon->border_width * 2
224 + (Scr->ShrinkIconTitles ? tmp_win->icon->width
225 : tmp_win->icon->w_width);
226 const int iconHeight = tmp_win->icon->border_width * 2
227 + tmp_win->icon->w_height;
235 if(LookInList(ir->clientlist, tmp_win->name, &tmp_win->class)) {
287 oldir = tmp_win->icon->ir;
343 tmp_win->icon->ir = ir;
345 ie->twm_win = tmp_win;
351 tmp_win->icon->ir = NULL;
357 if(Scr->ShrinkIconTitles && tmp_win->icon->has_title) {
358 *final_x -= GetIconOffset(tmp_win->icon);
359 if(tmp_win->icon->ir != oldir) {
360 ReshapeIcon(tmp_win->icon);
374 FindIconEntry(TwmWindow *tmp_win, IconRegion **irp)
381 if(ie->twm_win == tmp_win) {
448 CreateIconWindow(TwmWindow *tmp_win, int def_x, int def_y)
467 GetColorFromList(Scr->IconBorderColorL, tmp_win->name, &tmp_win->class,
469 GetColorFromList(Scr->IconForegroundL, tmp_win->name, &tmp_win->class,
471 GetColorFromList(Scr->IconBackgroundL, tmp_win->name, &tmp_win->class,
483 tmp_win->forced = false;
493 image = LookupIconNameOrClass(tmp_win, icon, &pattern);
501 image = EwmhGetIcon(Scr, tmp_win);
515 if(image == NULL && tmp_win->wmhints->flags & IconPixmapHint) {
518 if(XGetGeometry(dpy, tmp_win->wmhints->icon_pixmap,
526 XCopyArea(dpy, tmp_win->wmhints->icon_pixmap, image->pixmap, Scr->NormalGC,
529 XCopyPlane(dpy, tmp_win->wmhints->icon_pixmap, image->pixmap, Scr->NormalGC,
536 if((tmp_win->wmhints->flags & IconMaskHint) &&
537 XGetGeometry(dpy, tmp_win->wmhints->icon_mask,
546 XCopyArea(dpy, tmp_win->wmhints->icon_mask, image->mask, gc,
560 image = LookupIconNameOrClass(tmp_win, icon, &pattern);
584 LookInNameList(Scr->NoIconTitle, tmp_win->icon_name) ||
585 LookInList(Scr->NoIconTitle, tmp_win->name, &tmp_win->class)) {
597 tmp_win->icon_name, strlen(tmp_win->icon_name),
623 if(tmp_win->wmhints->flags & IconWindowHint) {
624 icon->w = tmp_win->wmhints->icon_window;
625 if(tmp_win->forced ||
630 tmp_win->wmhints->flags &= ~IconWindowHint;
648 !(tmp_win->wmhints->flags & IconWindowHint)) {
678 if(image && !(tmp_win->wmhints->flags & IconWindowHint)) {
722 AddToList(&tmp_win->iconslist, pattern, icon);
725 tmp_win->icon = icon;
730 if(tmp_win->wmhints->flags & IconPositionHint) {
731 final_x = tmp_win->wmhints->icon_x;
732 final_y = tmp_win->wmhints->icon_y;
735 if(visible(tmp_win)) {
736 PlaceIcon(tmp_win, def_x, def_y, &final_x, &final_y);
740 if(visible(tmp_win) || (tmp_win->wmhints->flags & IconPositionHint)) {
765 tmp_win->iconified = true;
766 OtpAdd(tmp_win, IconWin);
769 XSaveContext(dpy, icon->w, TwmContext, (XPointer)tmp_win);
782 DeleteIconsList(TwmWindow *tmp_win)
795 for(nptr = tmp_win->iconslist; nptr != NULL;) {
798 if(icon != tmp_win->icon) {
805 tmp_win->iconslist = NULL;
859 IconUp(TwmWindow *tmp_win)
869 if(tmp_win->wmhints->flags & IconPositionHint) {
873 if(tmp_win->icon_moved) {
877 if(!XGetGeometry(dpy, tmp_win->icon->w, &JunkRoot, &defx, &defy,
898 PlaceIcon(tmp_win, defx, defy, &x, &y);
900 XMoveWindow(dpy, tmp_win->icon->w, x, y);
901 tmp_win->icon->w_x = x;
902 tmp_win->icon->w_y = y;
903 tmp_win->icon_moved = false; /* since we've restored it */
915 IconDown(TwmWindow *tmp_win)
920 ie = FindIconEntry(tmp_win, &ir);
967 PaintIcon(TwmWindow *tmp_win)
974 if(!tmp_win || !tmp_win->icon) {
977 icon = tmp_win->icon;
988 len = strlen(tmp_win->icon_name);
990 tmp_win->icon_name, len,
1003 tmp_win->icon_name, len,
1011 icon->y, tmp_win->icon_name, len);
1021 ShrinkIconTitle(TwmWindow *tmp_win)
1026 if(!tmp_win || !tmp_win->icon) {
1029 icon = tmp_win->icon;
1053 ExpandIconTitle(TwmWindow *tmp_win)
1058 if(!tmp_win || !tmp_win->icon) {
1061 icon = tmp_win->icon;
1378 LookupIconNameOrClass(TwmWindow *tmp_win, Icon *icon, char **pattern)
1384 icon_name = LookInNameList(Scr->IconNames, tmp_win->icon_name);
1386 *pattern = LookPatternInNameList(Scr->IconNames, tmp_win->icon_name);
1391 icon_name = LookInNameList(Scr->IconNames, tmp_win->name);
1393 *pattern = LookPatternInNameList(Scr->IconNames, tmp_win->name);
1399 icon_name = LookInList(Scr->IconNames, tmp_win->name, &tmp_win->class);
1401 *pattern = LookPatternInList(Scr->IconNames, tmp_win->name,
1402 &tmp_win->class);
1412 tmp_win->forced = true;