1 /* cc transient.c -o transient -lX11 */
10 Window r
, f
, t
= None
;
14 d
= XOpenDisplay(NULL
);
17 r
= DefaultRootWindow(d
);
19 f
= XCreateSimpleWindow(d
, r
, 100, 100, 400, 400, 0, 0, 0);
20 h
.min_width
= h
.max_width
= h
.min_height
= h
.max_height
= 400;
21 h
.flags
= PMinSize
| PMaxSize
;
22 XSetWMNormalHints(d
, f
, &h
);
23 XStoreName(d
, f
, "floating");
26 XSelectInput(d
, f
, ExposureMask
);
32 t
= XCreateSimpleWindow(d
, r
, 50, 50, 100, 100, 0, 0, 0);
33 XSetTransientForHint(d
, t
, f
);
34 XStoreName(d
, t
, "transient");
36 XSelectInput(d
, t
, ExposureMask
);