fg2bg.c

来自「seismic software,very useful」· C语言 代码 · 共 30 行

C
30
字号
#include "xplot.h"#include "par.h"/* save current window to background for later use */ void fg2bg(Display *dpy, Window win){        XWindowAttributes WinAttr;        Pixmap BGPix;        GC localGC;	/*	fprintf(stderr,"enter fd2bg program win=%x \n",win);	*/        XGetWindowAttributes(dpy, win, &WinAttr);        BGPix=XCreatePixmap(dpy, DefaultRootWindow(dpy),                WinAttr.width, WinAttr.height, WinAttr.depth);        localGC=XCreateGC(dpy, DefaultRootWindow(dpy), 0, 0);	/*        BGPix=XCreatePixmap(dpy, win,                WinAttr.width, WinAttr.height, WinAttr.depth);        localGC=XCreateGC(dpy, win, 0, 0);	*/        XCopyArea(dpy, win, BGPix, localGC,                0, 0, WinAttr.width, WinAttr.height, 0, 0);        XSetWindowBackgroundPixmap(dpy, win, BGPix);        XClearWindow(dpy, win);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?