- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
do {
XLoop:
XNextEvent(dpy,&event);
switch(event.type) {
case ResizeRequest:
if (event.xresizerequest.window!=win_main)
goto XLoop;
resize_main:
xswa.event_mask&= ~ResizeRedirectMask;
XChangeWindowAttributes(dpy,win_main,CWEventMask, &xswa);
XSync(dpy,0); /* very important, otherwise we loop endlessly ! */
XResizeWindow(dpy, win_main,event.xresizerequest.width,event.xresizerequest.height);
XSync(dpy,0); /* very important, otherwise we loop endlessly ! */
xswa.event_mask|= ResizeRedirectMask;
XChangeWindowAttributes(dpy,win_main,CWEventMask, &xswa);
resize=1;
XSync(dpy,0); /* another one, just in case... */
goto redisplay;
case Expose:
if (event.xexpose.count|moving_button1|vmoving_button)
goto XLoop;
.....// и дальше такой же хрени типа нарисовать и goto XLoop; :)