13#include <X11/extensions/shape.h>
15#include "ctwm_atoms.h"
27#define MAXANIMATIONSPEED 20
58 static unsigned long lastsec;
66 gettimeofday(&tp, NULL);
67 gap = ((tp.tv_sec - lastsec) * 1000000) + (tp.tv_usec - lastusec);
69 fprintf(
tracefile,
"Time = %lu, %ld, %ld, %ld, %lu\n", lastsec,
70 lastusec, (
long)tp.tv_sec, (
long)tp.tv_usec, gap);
83 lastusec = tp.tv_usec;
191 for(scrnum = 0; scrnum <
NumScreens; scrnum++) {
244 XSetWindowAttributes attr;
247 attr.background_pixmap = image->
pixmap;
248 XChangeWindowAttributes(
dpy, tbw->
window, CWBackPixmap, &attr);
258 XSetWindowAttributes attr;
261 attr.background_pixmap = image->
pixmap;
263 XChangeWindowAttributes(
dpy, t->
hilite_wl, CWBackPixmap, &attr);
267 XChangeWindowAttributes(
dpy, t->
hilite_wr, CWBackPixmap, &attr);
280 XSetWindowAttributes attr;
284 attr.background_pixmap = image->
pixmap;
285 XChangeWindowAttributes(
dpy, icon->
bm_w, CWBackPixmap, &attr);
287 if(image->
mask != None) {
289 XShapeCombineMask(
dpy, icon->
bm_w, ShapeBounding, 0, 0, image->
mask, ShapeSet);
297 ShapeBounding, ShapeSet);
298 XShapeCombineRectangles(
dpy, scr->
ShapeWindow, ShapeBounding, 0, 0, &rect, 1,
300 XShapeCombineShape(
dpy, icon->
w, ShapeBounding, 0, 0, scr->
ShapeWindow,
301 ShapeBounding, ShapeSet);
304 XShapeCombineShape(
dpy, icon->
w, ShapeBounding,
x, 0, icon->
bm_w,
305 ShapeBounding, ShapeSet);
324 maybeanimate =
false;
325 for(scrnum = 0; scrnum <
NumScreens; scrnum++) {
338 if((image == NULL) || (image->
next == NULL)) {
351 for(scrnum = 0; scrnum <
NumScreens; scrnum++) {
363 if((image == NULL) || (image->
next == NULL)) {
static void Animate(void)
static bool AnimateRoot(void)
static void AnimateButton(TBWindow *tbw)
#define MAXANIMATIONSPEED
void StartAnimation(void)
static void AnimateHighlight(TwmWindow *t)
static void AnimateIcons(ScreenInfo *scr, Icon *icon)
void SetAnimationSpeed(int speed)
void ModifyAnimationSpeed(int incr)
struct timeval AnimateTimeout
int NumScreens
How many Screens are on our display.
ScreenInfo ** ScreenList
List of ScreenInfo structs for each Screen.
MyFont IconFont
IconFont config var.
Window ShapeWindow
Utility window for animated icons.
Window Root
Root window for the current vscreen.
VirtualScreen * vScreenList
Linked list of per-VS info.
VirtualScreen * currentvs
Currently active VS.
Window hilite_wl
Left hilite window in titlebar.
Window hilite_wr
Right hilite window in titlebar.
Image * HiliteImage
Titlebar hilite backround.
TBWindow * titlebuttons
Button windows in the titlebar.
unsigned int title_height
Height of the full title bar.
int GetIconOffset(Icon *icon)
int nleft
numbers of buttons on left side
int nright
numbers of buttons on right side
Info and control for each X Screen we control.
TwmWindow * Focus
The twm window that has focus.
bool DontPaintRootWindow
DontPaintRootWindow config var.
WorkSpaceMgr workSpaceMgr
Info about the WorkSpaceManager (and Occupy window) for the screen.
bool workSpaceManagerActive
Whether the WSM is being shown.
struct ScreenInfo::_TBInfo TBInfo
Various titlebar buttons that will be put in the window decorations for the screen....
TwmWindow * FirstWindow
The head of the screen's twm window list.
Info and control for every X Window we take over.
struct TwmWindow * next
Next TwmWindow on the Screen.
bool titlehighlight
Should I highlight the title bar?
struct Icon * icon
The current icon.
bool mapped
Is the window mapped ?
bool icon_on
Is the icon visible.
struct VirtualScreen * next
struct WorkSpaceWindow * wsw
struct WorkSpace * workSpaceList
void send_clientmessage(Window w, Atom a, Time timestamp)
bool visible(const TwmWindow *tmp_win)