40 if(
Scr->use3Dborders) {
58 XSetWindowBorderPixmap(
dpy, tmp_win->
frame, tmp_win->
gray);
110 bs = focus ?
on :
off;
113 Scr->TBInfo.rightoff -
Scr->TitlePadding,
114 Scr->TitleHeight,
Scr->TitleShadowDepth,
115 tmp_win->
title, bs,
false,
false);
130 Window w = (tmp_win ? tmp_win->
w : PointerRoot);
131 bool f_iconmgr =
false;
133 if(
Scr->Focus && (
Scr->Focus->isiconmgr)) {
136 if(
Scr->SloppyFocus && (w == PointerRoot) && (!f_iconmgr)) {
140 XSetInputFocus(
dpy, w, RevertToPointerRoot, tim);
144 if(
Scr->Focus == tmp_win) {
149 if(
Scr->Focus->AutoSqueeze && !
Scr->Focus->squeezed) {
178 Scr->Focus = tmp_win;
193 if(!
Scr->ClickToFocus) {
194 Scr->FocusRoot =
true;
210 if(
Scr->RaiseWhenAutoUnSqueeze && tmp_win->
squeezed) {
225 long fx, fy, savex, savey;
228 int grav = ((tmp_win->
hints.flags & PWinGravity)
229 ? tmp_win->
hints.win_gravity : NorthWestGravity);
237 XMapWindow(
dpy, tmp_win->
w);
251 case SouthWestGravity :
253 case SouthEastGravity :
282 XUnmapWindow(
dpy, tmp_win->
w);
285 if(fx + neww >=
Scr->rootw -
Scr->BorderRight) {
286 fx =
Scr->rootw -
Scr->BorderRight - neww;
288 if(fy + newh >=
Scr->rooth -
Scr->BorderBottom) {
289 fy =
Scr->rooth -
Scr->BorderBottom - newh;
319 static int lastx = 0;
320 static int lasty = 0;
321 static int lastWidth = 0;
322 static int lastHeight = 0;
323 static int lastBW = 0;
324 static int lastTH = 0;
325 int xl, xr, yt, yb, xinnerl, xinnerr, yinnert, yinnerb;
327 XSegment outline[18];
330 if(
x == lastx &&
y == lasty && width == lastWidth && height == lastHeight
331 && lastBW == bw && th == lastTH) {
338 if (lastWidth || lastHeight) \
341 xr = lastx + lastWidth - 1; \
343 yb = lasty + lastHeight - 1; \
344 xinnerl = xl + lastBW; \
345 xinnerr = xr - lastBW; \
346 yinnert = yt + lastTH + lastBW; \
347 yinnerb = yb - lastBW; \
348 xthird = (xinnerr - xinnerl) / 3; \
349 ythird = (yinnerb - yinnert) / 3; \
375 r->x1 = xinnerl + xthird; \
381 r->x1 = xinnerl + (2 * xthird); \
388 r->y1 = yinnert + ythird; \
394 r->y1 = yinnert + (2 * ythird); \
401 r->y1 = yt + lastTH; \
425 XDrawSegments(
dpy,
root,
Scr->DrawGC, outline, r - outline);
bool InstallColormaps(int type, Colormaps *cmaps)
void Draw3DBorder(Window w, int x, int y, int width, int height, int bw, ColorPair cp, ButtonState state, bool fill, bool forcebw)
void EwmhSet_NET_ACTIVE_WINDOW(Window w)
void EwmhSet_NET_WM_STATE(TwmWindow *twm_win, int changes)
#define EWMH_STATE_SHADED
int frame_x
X position on screen of frame.
Window hilite_wl
Left hilite window in titlebar.
int actual_frame_x
Saved frame_x when squeezed.
int actual_frame_y
Saved frame_y when squeezed.
Window lolite_wl
Left lolite window in titlebar.
unsigned int title_width
Width of the full title bar.
Window hilite_wr
Right hilite window in titlebar.
int title_x
X coord of window title relative to title_w.
unsigned int actual_frame_height
Saved frame_height when squeezed.
Image * HiliteImage
Titlebar hilite backround.
int frame_y
Y position on screen of frame.
unsigned int actual_frame_width
Saved frame_width when squeezed.
Window frame
The X window for the overall frame.
Window lolite_wr
Right lolite window in titlebar.
int frame_bw
2d border width.
unsigned int title_height
Height of the full title bar.
Window title_w
The title bar Window.
unsigned int frame_width
Width of frame.
Pixmap gray
Pixmap to which the border is set to when window isn't focused.
unsigned int frame_height
Height of frame.
int frame_bw3D
3d border width.
void NotActiveIconManager(WList *active)
void ActiveIconManager(WList *active)
void OtpUnfocusWindow(TwmWindow *twm_win)
Unfocus a window.
void OtpFocusWindow(TwmWindow *twm_win)
Focus a window.
bool OtpIsFocusDependent(TwmWindow *twm_win)
void OtpRaise(TwmWindow *twm_win, WinType wintype)
Info and control for every X Window we take over.
bool isiconmgr
This is an icon manager window.
Window w
The actual X Window handle.
bool AlwaysSqueezeToGravity
SqueezeInfo * squeeze_info
Control info for title squeezing.
bool hasfocusvisible
The window visibly has focus.
XSizeHints hints
Window size hints.
ColorPair borderC
ColorPair for focused window borders.
ColorPair title
ColorPair for various other titlebar bits.
struct WList * iconmanagerlist
List of the icon managers the window is in.
bool highlight
Should highlight this window.
bool isicon
Is the window an icon now ?
bool squeezed
Is the window squeezed ?
void SetupWindow(TwmWindow *tmp_win, int x, int y, int w, int h, int bw)
void PaintBorders(TwmWindow *tmp_win, bool focus)
void UnmapTransients(TwmWindow *tmp_win, bool iconify, long eventMask)
void ReMapTransients(TwmWindow *tmp_win)
void Squeeze(TwmWindow *tmp_win)
void SetFocusVisualAttributes(TwmWindow *tmp_win, bool focus)
void SetFocus(TwmWindow *tmp_win, Time tim)
void MoveOutline(Window root, int x, int y, int width, int height, int bw, int th)
void AutoSqueeze(TwmWindow *tmp_win)
int restore_mask(Window w, long restore)
long mask_out_event(Window w, long ignore_event)