all repos — fluxbox @ 6d9afb845384a72be3ff87c6c6b9a684100256dc

custom fork of the fluxbox windowmanager

no graphics exposure by default
fluxgen fluxgen
commit

6d9afb845384a72be3ff87c6c6b9a684100256dc

parent

dd0aad54c0571785849c2ac5d3a46a0c0c1516ea

2 files changed, 23 insertions(+), 5 deletions(-)

jump to
M src/FbTk/GContext.ccsrc/FbTk/GContext.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: GContext.cc,v 1.1 2003/08/27 13:45:11 fluxgen Exp $ +// $Id: GContext.cc,v 1.2 2003/09/10 21:27:02 fluxgen Exp $ #include "GContext.hh"

@@ -35,12 +35,14 @@ GContext::GContext(const FbTk::FbDrawable &drawable):

m_gc(XCreateGC(FbTk::App::instance()->display(), drawable.drawable(), 0, 0)) { + setGraphicsExposure(false); } GContext::GContext(Drawable drawable): m_gc(XCreateGC(FbTk::App::instance()->display(), drawable, 0, 0)) { + setGraphicsExposure(false); } GContext::~GContext() {

@@ -49,13 +51,21 @@ XFreeGC(FbTk::App::instance()->display(), m_gc);

} void GContext::setForeground(const FbTk::Color &color) { + setForeground(color.pixel()); +} + +void GContext::setForeground(long pixel_value) { XSetForeground(FbTk::App::instance()->display(), m_gc, - color.pixel()); + pixel_value); } void GContext::setBackground(const FbTk::Color &color) { + setBackground(color.pixel()); +} + +void GContext::setBackground(long pixel_value) { XSetBackground(FbTk::App::instance()->display(), m_gc, - color.pixel()); + pixel_value); } /// not implemented!

@@ -71,6 +81,11 @@

void GContext::setClipOrigin(int x, int y) { XSetClipOrigin(FbTk::App::instance()->display(), m_gc, x, y); +} + +void GContext::setGraphicsExposure(bool flag) { + XSetGraphicsExposures(FbTk::App::instance()->display(), m_gc, + flag); } } // end namespace FbTk
M src/FbTk/GContext.hhsrc/FbTk/GContext.hh

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: GContext.hh,v 1.1 2003/08/27 13:45:11 fluxgen Exp $ +// $Id: GContext.hh,v 1.2 2003/09/10 21:27:02 fluxgen Exp $ #ifndef FBTK_GCONTEXT_HH #define FBTK_GCONTEXT_HH

@@ -44,11 +44,14 @@

virtual ~GContext(); void setForeground(const FbTk::Color &color); + void setForeground(long pixel_value); void setBackground(const FbTk::Color &color); + void setBackground(long pixel_value); void setFont(const FbTk::Font &font); void setClipMask(const FbTk::FbPixmap &pm); void setClipOrigin(int x, int y); - + void setGraphicsExposure(bool value); + GC gc() const { return m_gc; } private: