more X error fixing
This commit is contained in:
parent
b063688992
commit
28c32c087a
4 changed files with 19 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
// 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"
|
||||
|
@ -111,6 +111,10 @@ FbWindow::FbWindow(Window client):FbDrawable(), m_parent(0),
|
|||
|
||||
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
|
||||
FbTk::EventManager::instance()->remove(m_window);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// 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 @@ void Menu::update(int active_index) {
|
|||
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::keyPressEvent(XKeyEvent &event) {
|
|||
|
||||
void Menu::reconfigure() {
|
||||
|
||||
|
||||
if (alpha() == 255 && m_transp.get() != 0) {
|
||||
m_transp.reset(0);
|
||||
} else if (alpha () < 255) {
|
||||
|
@ -1394,8 +1395,13 @@ void Menu::reconfigure() {
|
|||
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
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
// 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 @@ Picture createAlphaPic(Window drawable, unsigned char 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;
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,6 @@ Transparent::Transparent(Drawable src, Drawable dest, unsigned char alpha, int s
|
|||
XRenderFindVisualFormat(disp,
|
||||
DefaultVisual(disp, screen_num));
|
||||
|
||||
|
||||
if (src != 0 && format != 0) {
|
||||
m_src_pic = XRenderCreatePicture(disp, src, format,
|
||||
0, 0);
|
||||
|
|
Loading…
Reference in a new issue