all repos — fluxbox @ 28c32c087adde2b7b1ede54fd3d4db796259ec9f

custom fork of the fluxbox windowmanager

more X error fixing
rathnor rathnor
commit

28c32c087adde2b7b1ede54fd3d4db796259ec9f

parent

b063688992c877a19556b36e8140e4d4b6890a0c

4 files changed, 19 insertions(+), 7 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,6 +1,9 @@

(Format: Year/Month/Day) Changes for 0.9.11 *04/09/11: + * Fix some more X errors from XRender calls (Simon) + - also fixes some menu background update issues + FbTk/Menu.cc FbTk/Transparent.cc FbTk/FbWindow.cc * Ignore 32-bit visuals for now when selecting (Simon) - should fix problems with Composite being enabled in X.org FbRootWindow.cc
M src/FbTk/FbWindow.ccsrc/FbTk/FbWindow.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: FbWindow.cc,v 1.40 2004/09/11 12:33:14 rathnor Exp $ +// $Id: FbWindow.cc,v 1.41 2004/09/11 15:52:23 rathnor Exp $ #include "FbWindow.hh" #include "FbPixmap.hh"

@@ -110,6 +110,10 @@ setNew(client);

} FbWindow::~FbWindow() { + + // Need to free xrender pics before destroying window + if (m_transparent.get() != 0) + m_transparent.reset(0); if (m_window != 0) { // so we don't get any dangling eventhandler for this window
M src/FbTk/Menu.ccsrc/FbTk/Menu.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: Menu.cc,v 1.82 2004/09/11 13:45:16 fluxgen Exp $ +// $Id: Menu.cc,v 1.83 2004/09/11 15:52:23 rathnor Exp $ //use GNU extensions #ifndef _GNU_SOURCE

@@ -567,6 +567,8 @@

m_real_frame_pm = FbTk::FbPixmap(menu.frame.window(), menu.frame.width(), menu.frame.height(), menu.frame.depth()); + if (m_transp.get() != 0) + m_transp->setDest(m_real_frame_pm.drawable(), screenNumber()); menu.frame.setBackgroundPixmap(m_real_frame_pm.drawable()); GContext def_gc(menu.frame);

@@ -1385,7 +1387,6 @@

void Menu::reconfigure() { - if (alpha() == 255 && m_transp.get() != 0) { m_transp.reset(0); } else if (alpha () < 255) {

@@ -1394,8 +1395,13 @@ if (m_transp.get() == 0) {

m_transp.reset(new Transparent(FbPixmap::getRootPixmap(screenNumber()), m_real_frame_pm.drawable(), alpha(), screenNumber())); - } else + } else { + Pixmap root = FbPixmap::getRootPixmap(screenNumber()); + if (m_transp->source() != root) + m_transp->setSource(root, screenNumber()); + m_transp->setAlpha(alpha()); + } } m_need_update = true; // redraw items
M src/FbTk/Transparent.ccsrc/FbTk/Transparent.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: Transparent.cc,v 1.7 2004/09/10 16:48:15 akir Exp $ +// $Id: Transparent.cc,v 1.8 2004/09/11 15:52:23 rathnor Exp $ #include "Transparent.hh" #include "App.hh"

@@ -60,7 +60,7 @@ // create one pixel pixmap with depth 8 for alpha

Pixmap alpha_pm = XCreatePixmap(disp, drawable, 1, 1, 8); if (alpha_pm == 0) { - cerr<<"FbTk::Transparent: "<<_FBTKTEXT(Error, NoRenderPixmap, "Warning: Failed to create alpha pixmap.", "XCreatePixmap files for our transparency pixmap")<<endl; + cerr<<"FbTk::Transparent: "<<_FBTKTEXT(Error, NoRenderPixmap, "Warning: Failed to create alpha pixmap.", "XCreatePixmap failed for our transparency pixmap")<<endl; return 0; }

@@ -130,7 +130,6 @@

XRenderPictFormat *format = XRenderFindVisualFormat(disp, DefaultVisual(disp, screen_num)); - if (src != 0 && format != 0) { m_src_pic = XRenderCreatePicture(disp, src, format,