aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-07-06 10:47:36 (GMT)
committerfluxgen <fluxgen>2004-07-06 10:47:36 (GMT)
commitc213fb6ca2ed68722152df2d07ede6860846786b (patch)
treed294c151d95a0a01829cc35e42300bc84e83cb08 /src/FbTk
parent5bb98e087509b0b28b65888243856f5fec5eb922 (diff)
downloadfluxbox-c213fb6ca2ed68722152df2d07ede6860846786b.zip
fluxbox-c213fb6ca2ed68722152df2d07ede6860846786b.tar.bz2
fixed minor bug
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/FbPixmap.cc16
-rw-r--r--src/FbTk/GContext.hh6
2 files changed, 13 insertions, 9 deletions
diff --git a/src/FbTk/FbPixmap.cc b/src/FbTk/FbPixmap.cc
index cac6cf0..bbc1906 100644
--- a/src/FbTk/FbPixmap.cc
+++ b/src/FbTk/FbPixmap.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbPixmap.cc,v 1.11 2004/07/05 23:51:57 fluxgen Exp $ 22// $Id: FbPixmap.cc,v 1.12 2004/07/06 10:47:36 fluxgen Exp $
23 23
24#include "FbPixmap.hh" 24#include "FbPixmap.hh"
25#include "App.hh" 25#include "App.hh"
@@ -253,19 +253,19 @@ void FbPixmap::tile(unsigned int dest_width, unsigned int dest_height) {
253 (dest_width == width() && dest_height == height())) 253 (dest_width == width() && dest_height == height()))
254 return; 254 return;
255 255
256 Display *dpy = FbTk::App::instance()->display();
257
258 FbPixmap new_pm(drawable(), width(), height(), depth()); 256 FbPixmap new_pm(drawable(), width(), height(), depth());
259 257
260 new_pm.copy(m_pm); 258 new_pm.copy(m_pm);
261 259
262 resize(dest_width,dest_height); 260 resize(dest_width, dest_height);
263 261
264 GC gc = XCreateGC(dpy, drawable(), 0, NULL); 262 FbTk::GContext gc(*this);
263
264 gc.setTile(new_pm);
265 gc.setFillStyle(FillTiled);
265 266
266 XSetTile(dpy,gc,new_pm.release()); 267 fillRectangle(gc.gc(), 0, 0, dest_width, dest_height);
267 XSetFillStyle(dpy, gc, FillTiled); 268
268 XFillRectangle(dpy,drawable(),gc, 0, 0, dest_width, dest_height);
269} 269}
270 270
271 271
diff --git a/src/FbTk/GContext.hh b/src/FbTk/GContext.hh
index 57a467e..4327c97 100644
--- a/src/FbTk/GContext.hh
+++ b/src/FbTk/GContext.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: GContext.hh,v 1.9 2004/03/22 20:56:15 fluxgen Exp $ 22// $Id: GContext.hh,v 1.10 2004/07/06 10:47:36 fluxgen Exp $
23 23
24#ifndef FBTK_GCONTEXT_HH 24#ifndef FBTK_GCONTEXT_HH
25#define FBTK_GCONTEXT_HH 25#define FBTK_GCONTEXT_HH
@@ -66,6 +66,10 @@ public:
66 XSetBackground(m_display, m_gc, pixel_value); 66 XSetBackground(m_display, m_gc, pixel_value);
67 } 67 }
68 68
69 inline void setTile(const FbTk::FbPixmap &draw) {
70 XSetTile(m_display, m_gc, draw.drawable());
71 }
72
69 /// not implemented 73 /// not implemented
70 inline void setFont(const FbTk::Font &) {} 74 inline void setFont(const FbTk::Font &) {}
71 75