fixed copy x pixmap bug
This commit is contained in:
parent
eada72fae3
commit
c6a969f61b
1 changed files with 7 additions and 5 deletions
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: FbPixmap.cc,v 1.6 2003/08/11 14:58:49 fluxgen Exp $
|
// $Id: FbPixmap.cc,v 1.7 2003/08/12 00:25:23 fluxgen Exp $
|
||||||
|
|
||||||
#include "FbPixmap.hh"
|
#include "FbPixmap.hh"
|
||||||
#include "App.hh"
|
#include "App.hh"
|
||||||
|
@ -152,15 +152,17 @@ void FbPixmap::copy(Pixmap pm) {
|
||||||
&bpp);
|
&bpp);
|
||||||
// create new pixmap and copy area
|
// create new pixmap and copy area
|
||||||
create(root, new_width, new_height, bpp);
|
create(root, new_width, new_height, bpp);
|
||||||
// determine screen gc
|
|
||||||
Display *disp = FbTk::App::instance()->display();
|
Display *disp = FbTk::App::instance()->display();
|
||||||
XWindowAttributes attr;
|
|
||||||
XGetWindowAttributes(disp, root, &attr);
|
GC gc = XCreateGC(disp, drawable(), 0, 0);
|
||||||
GC gc = DefaultGCOfScreen(attr.screen);
|
|
||||||
XCopyArea(disp, pm, drawable(), gc,
|
XCopyArea(disp, pm, drawable(), gc,
|
||||||
0, 0,
|
0, 0,
|
||||||
width(), height(),
|
width(), height(),
|
||||||
0, 0);
|
0, 0);
|
||||||
|
|
||||||
|
XFreeGC(disp, gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FbPixmap::rotate() {
|
void FbPixmap::rotate() {
|
||||||
|
|
Loading…
Reference in a new issue