Lines Matching refs:Scr
138 Scr->Mouse[i][j][k].func = 0;
139 Scr->Mouse[i][j][k].item = NULL;
142 Scr->DefaultFunction.func = 0;
143 Scr->WindowFunction.func = 0;
151 for (key = Scr->FuncKeyRoot.next; key != NULL;) {
158 Scr->FuncKeyRoot.next = NULL;
189 for (tmp = Scr->FuncKeyRoot.next; tmp != NULL; tmp = tmp->next) {
196 tmp->next = Scr->FuncKeyRoot.next;
197 Scr->FuncKeyRoot.next = tmp;
234 Scr->TBInfo.nright++;
237 Scr->TBInfo.nleft++;
250 if ((!Scr->TBInfo.head) || ((!append) && (!rightside))) { /* 1 */
251 tb->next = Scr->TBInfo.head;
252 Scr->TBInfo.head = tb;
258 for (t = Scr->TBInfo.head; t->next; t = t->next);
265 for (t = Scr->TBInfo.head; t && !t->rightside; t = t->next) {
273 tb->next = Scr->TBInfo.head;
274 Scr->TBInfo.head = tb;
295 Scr->TBInfo.width = (Scr->TitleHeight -
296 2 * (Scr->FramePadding + Scr->ButtonIndent));
297 Scr->TBInfo.pad = ((Scr->TitlePadding > 1)
298 ? ((Scr->TitlePadding + 1) / 2) : 1);
299 h = Scr->TBInfo.width - 2 * Scr->TBInfo.border;
305 if (!Scr->NoDefaults) {
323 for (tb = Scr->TBInfo.head; tb; tb = tb->next) {
363 y_offset = mi->item_num * Scr->EntryHeight;
364 text_y = y_offset + Scr->MenuFont.y;
369 XSetForeground(dpy, Scr->NormalGC, mi->hi_back);
371 XFillRectangle(dpy, mr->w, Scr->NormalGC, 0, y_offset,
372 (unsigned) mr->width, (unsigned) Scr->EntryHeight);
374 MyFont_ChangeGC(mi->hi_fore, mi->hi_back, &Scr->MenuFont);
376 MyFont_DrawString(dpy, mr->w, &Scr->MenuFont, Scr->NormalGC, mi->x,
379 gc = Scr->NormalGC;
383 XSetForeground(dpy, Scr->NormalGC, mi->back);
385 XFillRectangle(dpy, mr->w, Scr->NormalGC, 0, y_offset,
387 (unsigned) Scr->EntryHeight);
389 MyFont_ChangeGC(mi->fore, mi->back, &Scr->MenuFont);
390 gc = Scr->NormalGC;
393 gc = Scr->MenuGC;
395 MyFont_DrawString(dpy, mr->w, &Scr->MenuFont, gc,
404 if (Scr->pullPm == None) {
405 Scr->pullPm = CreateMenuIcon(Scr->MenuFont.height,
406 &Scr->pullW, &Scr->pullH);
408 x = (int) ((unsigned) mr->width - (Scr->pullW + 5));
410 (((unsigned) Scr->MenuFont.height - Scr->pullH) / 2));
411 XCopyPlane(dpy, Scr->pullPm, mr->w, gc, 0, 0, Scr->pullW,
412 Scr->pullH, x, y, 1);
416 XSetForeground(dpy, Scr->NormalGC, mi->back);
419 XFillRectangle(dpy, mr->w, Scr->NormalGC, 0, y_offset,
420 (unsigned) mr->width, (unsigned) Scr->EntryHeight);
425 XSetForeground(dpy, Scr->NormalGC, mi->fore);
428 XDrawLine(dpy, mr->w, Scr->NormalGC, 0, y_offset,
430 y = ((mi->item_num + 1) * Scr->EntryHeight) - 1;
431 XDrawLine(dpy, mr->w, Scr->NormalGC, 0, y, mr->width, y);
434 MyFont_ChangeGC(mi->fore, mi->back, &Scr->MenuFont);
436 MyFont_DrawString(dpy, mr->w, &Scr->MenuFont, Scr->NormalGC, mi->x,
447 int y_offset = mi->item_num * Scr->EntryHeight;
452 if (e->xexpose.y < (y_offset + Scr->EntryHeight) &&
517 Scr = (struct ScreenInfo *) context_data;
529 entry = y / Scr->EntryHeight;
571 (savey + ActiveItem->item_num * Scr->EntryHeight)
572 /*(savey + ActiveItem->item_num * Scr->EntryHeight +
573 (Scr->EntryHeight >> 1)) */
622 if (Scr->MenuList == NULL) {
623 Scr->MenuList = tmp;
624 Scr->MenuList->next = NULL;
627 if (Scr->LastMenu == NULL) {
628 Scr->LastMenu = tmp;
629 Scr->LastMenu->next = NULL;
632 Scr->LastMenu->next = tmp;
633 Scr->LastMenu = tmp;
634 Scr->LastMenu->next = NULL;
638 Scr->Windows = tmp;
687 if (!Scr->HaveFonts)
689 width = MyFont_TextWidth(&Scr->MenuFont, item, tmp->strlen);
696 if (Scr->Monochrome == COLOR && fore != NULL) {
699 save = Scr->FirstTime;
700 Scr->FirstTime = TRUE;
703 Scr->FirstTime = (short) save;
720 for (mr = Scr->MenuList; mr != NULL; mr = mr->next) {
737 Colormap cmap = Scr->TwmRoot.cmaps.cwins[0]->colormap->c;
739 Scr->EntryHeight = Scr->MenuFont.height + 4;
758 MyFont_TextWidth(&Scr->MenuFont, cur->item,
763 mr->height = (short) (mr->items * Scr->EntryHeight);
766 if (Scr->Shadow) {
772 attributes.background_pixel = Scr->MenuShadowColor;
773 attributes.border_pixel = Scr->MenuShadowColor;
774 if (Scr->SaveUnder) {
778 mr->shadow = XCreateWindow(dpy, Scr->Root, 0, 0,
789 attributes.background_pixel = Scr->MenuC.back;
790 attributes.border_pixel = Scr->MenuBorderColor;
792 if (Scr->SaveUnder) {
796 if (Scr->BackingStore) {
800 mr->w = XCreateWindow(dpy, Scr->Root, 0, 0, (unsigned int) mr->width,
802 (unsigned int) Scr->MenuBorderWidth,
808 XSaveContext(dpy, mr->w, ScreenContext, (XPointer) Scr);
817 tmp->fore = Scr->MenuC.fore;
818 tmp->back = Scr->MenuC.back;
821 tmp->fore = Scr->MenuTitleC.fore;
822 tmp->back = Scr->MenuTitleC.back;
836 if (Scr->Monochrome == MONOCHROME || !Scr->InterpolateMenuColors)
926 (Scr->CaseSensitive ? strcmp : XmuCompareISOLatin1);
933 if (menu == Scr->Windows) {
949 for (tmp_win = Scr->TwmRoot.next, WindowNameCount = 0;
958 WindowNames[0] = Scr->TwmRoot.next;
960 for (tmp_win = Scr->TwmRoot.next->next, WindowNameCount = 1;
995 XGrabPointer(dpy, Scr->Root, True,
999 Scr->Root, Scr->MenuCursor, CurrentTime);
1007 y -= (Scr->EntryHeight / 2); /* sticky menus would be nice here */
1013 if (x + menu->width > Scr->MyDisplayWidth) {
1014 x = Scr->MyDisplayWidth - menu->width;
1018 if (y + menu->height > Scr->MyDisplayHeight) {
1019 y = Scr->MyDisplayHeight - menu->height;
1029 if (Scr->Shadow) {
1032 if (Scr->Shadow) {
1036 if (Scr->Shadow) {
1060 if (Scr->Shadow) {
1088 for (tmp = Scr->MenuList; tmp != NULL; tmp = tmp->next) {
1107 int nb = Scr->TBInfo.nleft + Scr->TBInfo.nright;
1133 XQueryPointer(dpy, Scr->Root, &wdummy,
1167 XQueryPointer(dpy, Scr->Root, &wdummy, &wdummy,
1198 if (Scr->WarpUnmapped || t->mapped) {
1201 if (!Scr->NoRaiseWarp)
1254 XGrabPointer(dpy, Scr->Root, True,
1257 Scr->Root, Scr->WaitCursor, CurrentTime);
1298 if (Scr->NoIconManagers)
1300 DeIconify(Scr->iconmgr.twm_win);
1301 XRaiseWindow(dpy, Scr->iconmgr.twm_win->frame);
1305 if (Scr->NoIconManagers)
1311 if (DeferExecution(context, func, Scr->SelectCursor))
1317 save_sort = Scr->SortIconMgr;
1318 Scr->SortIconMgr = TRUE;
1327 Scr->SortIconMgr = (short) save_sort;
1332 if (DeferExecution(context, func, Scr->SelectCursor))
1343 if (DeferExecution(context, func, Scr->SelectCursor))
1348 ++(Scr->NumAutoRaises);
1350 --(Scr->NumAutoRaises);
1359 if (Scr->WindowFunction.func != 0) {
1360 ExecuteFunction(Scr->WindowFunction.func,
1361 Scr->WindowFunction.item->action,
1373 if (DeferExecution(context, func, Scr->MoveCursor))
1379 XWarpPointer(dpy, None, Scr->Root,
1440 if (DeferExecution(context, func, Scr->SelectCursor))
1447 if (DeferExecution(context, func, Scr->MoveCursor))
1455 XWarpPointer(dpy, None, Scr->Root,
1462 if (!Scr->NoGrabServer || !Scr->OpaqueMove) {
1467 Scr->Root, Scr->MoveCursor, CurrentTime);
1527 if (!Scr->OpaqueMove) {
1529 if (!Scr->MoveDelta) {
1562 XWarpPointer(dpy, None, Scr->Root, 0, 0, 0, 0,
1595 if (Scr->OpaqueMove)
1598 MoveOutline(Scr->Root, 0, 0, 0, 0, 0, 0);
1617 if (!Scr->OpaqueMove)
1626 if (!Scr->OpaqueMove && menuFromFrameOrWindowOrTitlebar)
1642 abs(eventp->xmotion.x_root - origX) < Scr->MoveDelta &&
1643 abs(eventp->xmotion.y_root - origY) < Scr->MoveDelta)
1649 if (!Scr->NoRaiseMove && Scr->OpaqueMove) /* can't restore... */
1688 if (Scr->DontMoveOff && MoveFunction != F_FORCEMOVE) {
1694 if (xr > Scr->MyDisplayWidth)
1695 xl = Scr->MyDisplayWidth - w2;
1699 if (yb > Scr->MyDisplayHeight)
1700 yt = Scr->MyDisplayHeight - h;
1704 if (Scr->OpaqueMove)
1728 if (Scr->DontMoveOff && MoveFunction != F_FORCEMOVE) {
1734 if (xr > Scr->MyDisplayWidth)
1735 xl = Scr->MyDisplayWidth - w2;
1739 if (yb > Scr->MyDisplayHeight)
1740 yt = Scr->MyDisplayHeight - h;
1745 if (Scr->OpaqueMove)
1756 if (!Scr->OpaqueMove && DragWindow == None)
1772 DeferExecution(context, func, Scr->SelectCursor))
1786 if (DeferExecution(context, func, Scr->SelectCursor))
1799 if (DeferExecution(context, func, Scr->SelectCursor))
1813 if (DeferExecution(context, func, Scr->SelectCursor))
1825 if (DeferExecution(context, func, Scr->SelectCursor))
1836 if (DeferExecution(context, func, Scr->SelectCursor))
1840 if (!Scr->FocusRoot && Scr->Focus == tmp_win) {
1844 if (Scr->Focus != NULL) {
1845 SetBorder(Scr->Focus, False);
1846 if (Scr->Focus->hilite_w)
1847 XUnmapWindow(dpy, Scr->Focus->hilite_w);
1856 Scr->FocusRoot = FALSE;
1857 Scr->Focus = tmp_win;
1863 if (DeferExecution(context, func, Scr->DestroyCursor))
1873 if (DeferExecution(context, func, Scr->DestroyCursor))
1885 if (DeferExecution(context, func, Scr->SelectCursor))
1895 XCirculateSubwindowsUp(dpy, Scr->Root);
1899 XCirculateSubwindowsDown(dpy, Scr->Root);
1904 if (!Scr->NoGrabServer) {
1953 WarpToScreen(Scr->screen + 1, 1);
1956 WarpToScreen(Scr->screen - 1, -1);
1989 #define nwin(w) ((w) && (n=wseq(w)) != NULL && n != &Scr->TwmRoot ? n : l)
1990 #define bwin(w) (!(w)||(w)->iconmgr||(w)==of||!(Scr->WarpUnmapped||(w)->mapped))
1992 of = (Scr->Focus ? Scr->Focus : &Scr->TwmRoot);
1994 for (t = Scr->TwmRoot.next; t; t = t->next)
2003 l = Scr->TwmRoot.next;
2035 for (t = Scr->TwmRoot.next; t != NULL; t = t->next) {
2041 for (t = Scr->TwmRoot.next; t != NULL; t = t->next) {
2047 for (t = Scr->TwmRoot.next; t != NULL; t = t->next) {
2072 else if (Scr->iconmgr.active) {
2073 raisewin = Scr->iconmgr.twm_win->frame;
2074 iconwin = Scr->iconmgr.active->w;
2078 for (t = Scr->TwmRoot.next; t != NULL; t = t->next) {
2140 attributes.background_pixel = Scr->Black;
2143 w = XCreateWindow(dpy, Scr->Root, 0, 0,
2144 (unsigned int) Scr->MyDisplayWidth,
2145 (unsigned int) Scr->MyDisplayHeight,
2156 if (DeferExecution(context, func, Scr->SelectCursor))
2161 0, 0, 9999, 9999, 0, Scr->Black,
2162 Scr->Black);
2165 0, 0, 9999, 9999, 0, Scr->Black,
2166 Scr->Black);
2179 if (DeferExecution(context, func, Scr->SelectCursor))
2209 XGrabPointer(dpy, Scr->Root, True,
2212 Scr->Root, cursor, CurrentTime);
2228 XGrabPointer(dpy, Scr->Root, True,
2231 Scr->Root, LastCursor, CurrentTime);
2321 (void) sprintf(dot1, ".%d", Scr->screen);
2352 if (Scr->Focus != NULL) {
2353 SetBorder(Scr->Focus, False);
2354 if (Scr->Focus->hilite_w)
2355 XUnmapWindow(dpy, Scr->Focus->hilite_w);
2357 InstallWindowColormaps(0, &Scr->TwmRoot);
2358 Scr->Focus = NULL;
2359 Scr->FocusRoot = TRUE;
2372 for (t = Scr->TwmRoot.next; t != NULL; t = t->next) {
2383 if (Scr->NoRaiseDeicon)
2395 if ((Scr->WarpCursor ||
2396 LookInList(Scr->WarpCursorL, tmp_win->full_name, &tmp_win->xclass)) &&
2403 for (t = Scr->TwmRoot.next; t != NULL; t = t->next) {
2412 if (Scr->NoRaiseDeicon)
2455 for (t = Scr->TwmRoot.next; t != NULL; t = t->next) {
2479 if (t == Scr->Focus) {
2481 Scr->Focus = NULL;
2482 Scr->FocusRoot = TRUE;
2507 if (tmp_win == Scr->Focus) {
2509 Scr->Focus = NULL;
2510 Scr->FocusRoot = TRUE;
2539 (void) XTranslateCoordinates(dpy, t->w, Scr->Root, 0, 0, &x, &y, &junk);
2563 height = n * (Scr->DefaultFont.height + 2);
2566 int twidth = MyFont_TextWidth(&Scr->DefaultFont, Info[i],
2573 XUnmapWindow(dpy, Scr->InfoWindow);
2576 if (XQueryPointer(dpy, Scr->Root, &wdummy, &wdummy, &px, &py,
2580 if (px + width + BW2 >= Scr->MyDisplayWidth)
2581 px = Scr->MyDisplayWidth - width - BW2;
2582 if (py + height + BW2 >= Scr->MyDisplayHeight)
2583 py = Scr->MyDisplayHeight - height - BW2;
2592 XMoveResizeWindow(dpy, Scr->InfoWindow, px, py, (unsigned) width,
2594 XMapRaised(dpy, Scr->InfoWindow);
2664 if (Scr->screen == n)
2667 PreviousScreen = Scr->screen;
2668 XQueryPointer(dpy, Scr->Root, &dumwin, &dumwin, &x, &y,
2694 if ((previously_installed = (Scr->cmapInfo.cmaps == &tmp->cmaps &&
2729 SetMapStateProp(Scr->iconmgr.twm_win, WithdrawnState);
2730 XUnmapWindow(dpy, Scr->iconmgr.twm_win->frame);
2731 if (Scr->iconmgr.twm_win->icon_w)
2732 XUnmapWindow(dpy, Scr->iconmgr.twm_win->icon_w);
2733 Scr->iconmgr.twm_win->mapped = FALSE;
2734 Scr->iconmgr.twm_win->icon = TRUE;
2762 if (Scr->Shadow)
2784 if (Scr->RingLeader)
2785 head = Scr->RingLeader;
2786 else if (!(head = Scr->Ring))
2803 TwmWindow *p = Scr->RingLeader, *t;
2806 Scr->RingLeader = r;
2835 if (t->auto_raise || !Scr->NoRaiseWarp)