all repos — fluxbox @ f604debc9feb28affd8e9108f4fd897017f704bd

custom fork of the fluxbox windowmanager

texture passed as const referens to BImageControl's renderImage
fluxgen fluxgen
commit

f604debc9feb28affd8e9108f4fd897017f704bd

parent

c9e62e7aee97862ec0e0527b4a963bc9d244e41c

5 files changed, 33 insertions(+), 33 deletions(-)

jump to
M src/IconBar.ccsrc/IconBar.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: IconBar.cc,v 1.18 2002/10/29 15:53:45 fluxgen Exp $ +// $Id: IconBar.cc,v 1.19 2002/11/27 21:46:14 fluxgen Exp $ #include "IconBar.hh" #include "i18n.hh"

@@ -118,7 +118,7 @@ //--------------------------------------

void IconBar::loadTheme(unsigned int width, unsigned int height) { BImageControl *image_ctrl = m_screen->getImageControl(); Pixmap tmp = m_focus_pm; - FbTk::Texture *texture = &(m_screen->getWindowStyle()->tab.l_focus); + const FbTk::Texture *texture = &(m_screen->getWindowStyle()->tab.l_focus); //If we are working on a PARENTRELATIVE, change to right focus value if (texture->type() & FbTk::Texture::PARENTRELATIVE ) {

@@ -130,7 +130,7 @@ m_focus_pm = None;

m_focus_pixel = texture->color().pixel(); } else { m_focus_pm = - image_ctrl->renderImage(width, height, texture); + image_ctrl->renderImage(width, height, *texture); } if (tmp)
M src/Slit.ccsrc/Slit.cc

@@ -22,7 +22,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: Slit.cc,v 1.27 2002/11/27 12:30:38 fluxgen Exp $ +// $Id: Slit.cc,v 1.28 2002/11/27 21:50:09 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE

@@ -414,11 +414,10 @@ XMapWindow(disp, frame.window);

Pixmap tmp = frame.pixmap; BImageControl *image_ctrl = screen()->getImageControl(); - const FbTk::Texture *texture = &(screen()->getTheme()->getSlitTexture()); - if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + const FbTk::Texture &texture = screen()->getTheme()->getSlitTexture(); + if (texture.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { frame.pixmap = None; - XSetWindowBackground(disp, frame.window, - texture->color().pixel()); + XSetWindowBackground(disp, frame.window, texture.color().pixel()); } else { frame.pixmap = image_ctrl->renderImage(frame.width, frame.height, texture);
M src/Tab.ccsrc/Tab.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: Tab.cc,v 1.44 2002/11/27 13:03:04 fluxgen Exp $ +// $Id: Tab.cc,v 1.45 2002/11/27 21:51:33 fluxgen Exp $ #include "Tab.hh"

@@ -191,13 +191,13 @@ //------------------------------------------

void Tab::loadTheme() { BImageControl *image_ctrl = m_win->getScreen()->getImageControl(); Pixmap tmp = m_focus_pm; - FbTk::Texture *texture = &(m_win->getScreen()->getWindowStyle()->tab.l_focus); + const FbTk::Texture *texture = &(m_win->getScreen()->getWindowStyle()->tab.l_focus); if (texture->type() & FbTk::Texture::PARENTRELATIVE ) { - FbTk::Texture *pt = &(m_win->getScreen()->getWindowStyle()->tab.t_focus); - if (pt->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + const FbTk::Texture &pt = m_win->getScreen()->getWindowStyle()->tab.t_focus; + if (pt.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { m_focus_pm = None; - m_focus_pixel = pt->color().pixel(); + m_focus_pixel = pt.color().pixel(); } else m_focus_pm = image_ctrl->renderImage(m_size_w, m_size_h, pt);

@@ -210,7 +210,7 @@ m_focus_pm = None;

m_focus_pixel = texture->color().pixel(); } else m_focus_pm = - image_ctrl->renderImage(m_size_w, m_size_h, texture); + image_ctrl->renderImage(m_size_w, m_size_h, *texture); if (tmp) image_ctrl->removeImage(tmp); }

@@ -218,10 +218,10 @@ tmp = m_unfocus_pm;

texture = &(m_win->getScreen()->getWindowStyle()->tab.l_unfocus); if (texture->type() & FbTk::Texture::PARENTRELATIVE ) { - FbTk::Texture *pt = &(m_win->getScreen()->getWindowStyle()->tab.t_unfocus); - if (pt->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + const FbTk::Texture &pt = m_win->getScreen()->getWindowStyle()->tab.t_unfocus; + if (pt.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { m_unfocus_pm = None; - m_unfocus_pixel = pt->color().pixel(); + m_unfocus_pixel = pt.color().pixel(); } else m_unfocus_pm = image_ctrl->renderImage(m_size_w, m_size_h, pt);

@@ -231,7 +231,7 @@ m_unfocus_pm = None;

m_unfocus_pixel = texture->color().pixel(); } else m_unfocus_pm = - image_ctrl->renderImage(m_size_w, m_size_h, texture); + image_ctrl->renderImage(m_size_w, m_size_h, *texture); } if (tmp) image_ctrl->removeImage(tmp);
M src/Toolbar.ccsrc/Toolbar.cc

@@ -22,7 +22,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: Toolbar.cc,v 1.42 2002/11/27 12:20:23 fluxgen Exp $ +// $Id: Toolbar.cc,v 1.43 2002/11/27 21:48:41 fluxgen Exp $ #include "Toolbar.hh"

@@ -384,14 +384,14 @@ frame.bevel_w, frame.bevel_w, frame.clock_w,

frame.label_h); Pixmap tmp = frame.base; - FbTk::Texture *texture = &(screen()->getToolbarStyle()->toolbar); + const FbTk::Texture *texture = &(screen()->getToolbarStyle()->toolbar); if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { frame.base = None; XSetWindowBackground(display, frame.window, texture->color().pixel()); } else { frame.base = - image_ctrl->renderImage(frame.width, frame.height, texture); + image_ctrl->renderImage(frame.width, frame.height, *texture); XSetWindowBackgroundPixmap(display, frame.window, frame.base); } if (tmp) image_ctrl->removeImage(tmp);

@@ -404,7 +404,7 @@ XSetWindowBackground(display, frame.window_label,

texture->color().pixel()); } else { frame.label = - image_ctrl->renderImage(frame.window_label_w, frame.label_h, texture); + image_ctrl->renderImage(frame.window_label_w, frame.label_h, *texture); XSetWindowBackgroundPixmap(display, frame.window_label, frame.label); } if (tmp) image_ctrl->removeImage(tmp);

@@ -417,7 +417,7 @@ XSetWindowBackground(display, frame.workspace_label,

texture->color().pixel()); } else { frame.wlabel = - image_ctrl->renderImage(frame.workspace_label_w, frame.label_h, texture); + image_ctrl->renderImage(frame.workspace_label_w, frame.label_h, *texture); XSetWindowBackgroundPixmap(display, frame.workspace_label, frame.wlabel); } if (tmp) image_ctrl->removeImage(tmp);

@@ -426,11 +426,10 @@ tmp = frame.clk;

texture = &(screen()->getToolbarStyle()->clock); if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { frame.clk = None; - XSetWindowBackground(display, frame.clock, - texture->color().pixel()); + XSetWindowBackground(display, frame.clock, texture->color().pixel()); } else { frame.clk = - image_ctrl->renderImage(frame.clock_w, frame.label_h, texture); + image_ctrl->renderImage(frame.clock_w, frame.label_h, *texture); XSetWindowBackgroundPixmap(display, frame.clock, frame.clk); } if (tmp) image_ctrl->removeImage(tmp);

@@ -447,14 +446,15 @@ XSetWindowBackground(display, frame.pwbutton, frame.button_pixel);

XSetWindowBackground(display, frame.nwbutton, frame.button_pixel); } else { frame.button = - image_ctrl->renderImage(frame.button_w, frame.button_w, texture); + image_ctrl->renderImage(frame.button_w, frame.button_w, *texture); XSetWindowBackgroundPixmap(display, frame.psbutton, frame.button); XSetWindowBackgroundPixmap(display, frame.nsbutton, frame.button); XSetWindowBackgroundPixmap(display, frame.pwbutton, frame.button); XSetWindowBackgroundPixmap(display, frame.nwbutton, frame.button); } - if (tmp) image_ctrl->removeImage(tmp); + if (tmp) + image_ctrl->removeImage(tmp); tmp = frame.pbutton; texture = &(screen()->getToolbarStyle()->pressed);

@@ -463,8 +463,9 @@ frame.pbutton = None;

frame.pbutton_pixel = texture->color().pixel(); } else frame.pbutton = - image_ctrl->renderImage(frame.button_w, frame.button_w, texture); - if (tmp) image_ctrl->removeImage(tmp); + image_ctrl->renderImage(frame.button_w, frame.button_w, *texture); + if (tmp) + image_ctrl->removeImage(tmp); XSetWindowBorder(display, frame.window, screen()->getBorderColor()->pixel());
M util/bsetroot.ccutil/bsetroot.cc

@@ -18,7 +18,7 @@ // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER

// 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 -// $Id: bsetroot.cc,v 1.11 2002/11/26 17:48:58 fluxgen Exp $ +// $Id: bsetroot.cc,v 1.12 2002/11/27 21:52:34 fluxgen Exp $ #include "bsetroot.hh"

@@ -349,7 +349,7 @@ if (! texture.colorTo().isAllocated())

texture.colorTo().setPixel(BlackPixel(getXDisplay(), screen)); tmp = img_ctrl[screen]->renderImage(getScreenInfo(screen)->getWidth(), - getScreenInfo(screen)->getHeight(), &texture); + getScreenInfo(screen)->getHeight(), texture); pixmaps[screen] = XCreatePixmap(getXDisplay(), getScreenInfo(screen)->getRootWindow(),

@@ -365,7 +365,7 @@ 0, 0);

setRootAtoms(pixmaps[screen], screen); - XSetWindowBackgroundPixmap(getXDisplay(), + XSetWindowBackgroundPixmap(getXDisplay(), getScreenInfo(screen)->getRootWindow(), pixmaps[screen]); XClearWindow(getXDisplay(), getScreenInfo(screen)->getRootWindow());