File: attributes.c

package info (click to toggle)
kdrill 6.5deb2-12
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,340 kB
  • sloc: ansic: 7,636; makefile: 47
file content (26 lines) | stat: -rw-r--r-- 775 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* atributes.c
 *  This file currently exists SOLELY to contain a quickly
 *  portable routine to turn on backing store.
 *  I don't actually use it any more, but this is an old traditional
 *  extra to kdrill, so I'll leave it in :-)
 *  I would NEVER want to turn OFF backing store,
 *  hence there is no UnsetBackingStore function given here:-)
 */
#include <stdio.h>
#include <X11/Xos.h>
#include <X11/Xlib.h>
static XSetWindowAttributes attribs;

int SetBackingStore(display,screen,win)
Display *display;
Screen *screen;
Window win;
{
	if(!DoesBackingStore(screen)){
		fprintf(stderr,"This aplication expects to have backing store available\n");
		return 0;
	}
	attribs.backing_store = Always;
	XChangeWindowAttributes(display,win,CWBackingStore,&attribs);
	return 1;
}