From 94e3fa88fcede0b0e20d39dd577c85d9321b415d Mon Sep 17 00:00:00 2001 From: simonb Date: Thu, 28 Apr 2005 14:20:59 +0000 Subject: revert mathias last change, and fix it differently using info already there --- ChangeLog | 3 +++ src/FbTk/FbWindow.cc | 23 +++++++++-------------- src/FbTk/FbWindow.hh | 5 ----- src/FbWinFrame.cc | 2 -- 4 files changed, 12 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index b346667..9c424ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ (Format: Year/Month/Day) Changes for 0.9.13 +*05/04/28: + * Revert Mathias's little change to my patch, and fix it properly :) (Simon) + FbTk/FbWindow.cc/hh FbWinFrame.cc *05/04/27: * Fix some initialisation, plus setting background too much (Simon + Mathias) FbTk/FbWindow.cc/hh FbWinFrame.cc diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index d3a7736..de6b197 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc @@ -46,7 +46,7 @@ namespace FbTk { FbWindow::FbWindow():FbDrawable(), m_parent(0), m_screen_num(0), m_window(0), m_x(0), m_y(0), m_width(0), m_height(0), m_border_width(0), m_depth(0), m_destroy(true), - m_lastbg_color_set(false), m_lastbg_color(0), m_lastbg_pm(0), m_renderer(0), m_is_carrier(false) { + m_lastbg_color_set(false), m_lastbg_color(0), m_lastbg_pm(0), m_renderer(0) { } @@ -58,8 +58,7 @@ FbWindow::FbWindow(const FbWindow& the_copy):FbDrawable(), m_border_width(the_copy.borderWidth()), m_depth(the_copy.depth()), m_destroy(true), m_lastbg_color_set(false), m_lastbg_color(0), - m_lastbg_pm(0), m_renderer(the_copy.m_renderer), - m_is_carrier(false) { + m_lastbg_pm(0), m_renderer(the_copy.m_renderer) { the_copy.m_window = 0; } @@ -77,7 +76,7 @@ FbWindow::FbWindow(int screen_num, m_destroy(true), m_lastbg_color_set(false), m_lastbg_color(0), - m_lastbg_pm(0), m_renderer(0), m_is_carrier(false) { + m_lastbg_pm(0), m_renderer(0) { create(RootWindow(display(), screen_num), x, y, width, height, eventmask, @@ -94,7 +93,7 @@ FbWindow::FbWindow(const FbWindow &parent, m_screen_num(parent.screenNumber()), m_destroy(true), m_lastbg_color_set(false), m_lastbg_color(0), - m_lastbg_pm(0), m_renderer(0), m_is_carrier(false) { + m_lastbg_pm(0), m_renderer(0) { create(parent.window(), x, y, width, height, eventmask, override_redirect, save_unders, depth, class_type); @@ -111,7 +110,7 @@ FbWindow::FbWindow(Window client):FbDrawable(), m_parent(0), m_depth(0), m_destroy(false), // don't destroy this window m_lastbg_color_set(false), m_lastbg_color(0), - m_lastbg_pm(0), m_renderer(0), m_is_carrier(false) { + m_lastbg_pm(0), m_renderer(0) { setNew(client); } @@ -151,14 +150,10 @@ void FbWindow::setBackgroundPixmap(Pixmap bg_pixmap) { } void FbWindow::updateBackground(bool only_if_alpha) { - - if (isCarrier()) - return; - Pixmap newbg = m_lastbg_pm; unsigned char alpha = 255; bool free_newbg = false; - + if (m_lastbg_pm == None && !m_lastbg_color_set) return; @@ -168,9 +163,9 @@ void FbWindow::updateBackground(bool only_if_alpha) { if (only_if_alpha && alpha == 255) return; - // still use bg buffer pixmap if transparent - // cause it does nice caching things - if (m_lastbg_pm != ParentRelative) { + // still use bg buffer pixmap if not transparent + // cause it does nice caching things, assuming we have a renderer + if (m_lastbg_pm != ParentRelative && (m_renderer || alpha != 255)) { // update source and destination if needed Pixmap root = FbPixmap::getRootPixmap(screenNumber()); if (alpha != 255 && m_transparent->source() != root) diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh index a630f4f..b08df5e 100644 --- a/src/FbTk/FbWindow.hh +++ b/src/FbTk/FbWindow.hh @@ -187,9 +187,6 @@ public: void setRenderer(FbWindowRenderer &renderer) { m_renderer = &renderer; } void sendConfigureNotify(int x, int y, unsigned int width, unsigned int height); - /// this window is basicly a carrier and does not need background-updates - void setCarrier(bool flag) { m_is_carrier = flag; } - bool isCarrier() const { return m_is_carrier; } /// forces full background change, recalcing of alpha values if necessary void updateBackground(bool only_if_alpha); @@ -224,8 +221,6 @@ private: Pixmap m_lastbg_pm; FbWindowRenderer *m_renderer; - - bool m_is_carrier; }; bool operator == (Window win, const FbWindow &fbwin); diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 8313f4a..a1745ef 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc @@ -86,8 +86,6 @@ FbWinFrame::FbWinFrame(FbWinFrameTheme &theme, FbTk::ImageControl &imgctrl, m_themelistener(*this), m_shape(new Shape(m_window, theme.shapePlace())) { m_theme.reconfigSig().attach(&m_themelistener); - m_window.setCarrier(true); - m_clientarea.setCarrier(true); init(); } -- cgit v0.11.2