aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--src/FbTk/FbWindow.cc6
-rw-r--r--src/FbTk/Menu.cc12
-rw-r--r--src/FbTk/Transparent.cc5
4 files changed, 19 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 8ac150a..845f093 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.11 2Changes for 0.9.11
3*04/09/11: 3*04/09/11:
4 * Fix some more X errors from XRender calls (Simon)
5 - also fixes some menu background update issues
6 FbTk/Menu.cc FbTk/Transparent.cc FbTk/FbWindow.cc
4 * Ignore 32-bit visuals for now when selecting (Simon) 7 * Ignore 32-bit visuals for now when selecting (Simon)
5 - should fix problems with Composite being enabled in X.org 8 - should fix problems with Composite being enabled in X.org
6 FbRootWindow.cc 9 FbRootWindow.cc
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc
index 2a4aafa..1656942 100644
--- a/src/FbTk/FbWindow.cc
+++ b/src/FbTk/FbWindow.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbWindow.cc,v 1.40 2004/09/11 12:33:14 rathnor Exp $ 22// $Id: FbWindow.cc,v 1.41 2004/09/11 15:52:23 rathnor Exp $
23 23
24#include "FbWindow.hh" 24#include "FbWindow.hh"
25#include "FbPixmap.hh" 25#include "FbPixmap.hh"
@@ -111,6 +111,10 @@ FbWindow::FbWindow(Window client):FbDrawable(), m_parent(0),
111 111
112FbWindow::~FbWindow() { 112FbWindow::~FbWindow() {
113 113
114 // Need to free xrender pics before destroying window
115 if (m_transparent.get() != 0)
116 m_transparent.reset(0);
117
114 if (m_window != 0) { 118 if (m_window != 0) {
115 // so we don't get any dangling eventhandler for this window 119 // so we don't get any dangling eventhandler for this window
116 FbTk::EventManager::instance()->remove(m_window); 120 FbTk::EventManager::instance()->remove(m_window);
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index a82f441..b79f1b6 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Menu.cc,v 1.82 2004/09/11 13:45:16 fluxgen Exp $ 25// $Id: Menu.cc,v 1.83 2004/09/11 15:52:23 rathnor Exp $
26 26
27//use GNU extensions 27//use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -567,6 +567,8 @@ void Menu::update(int active_index) {
567 m_real_frame_pm = FbTk::FbPixmap(menu.frame.window(), 567 m_real_frame_pm = FbTk::FbPixmap(menu.frame.window(),
568 menu.frame.width(), menu.frame.height(), 568 menu.frame.width(), menu.frame.height(),
569 menu.frame.depth()); 569 menu.frame.depth());
570 if (m_transp.get() != 0)
571 m_transp->setDest(m_real_frame_pm.drawable(), screenNumber());
570 572
571 menu.frame.setBackgroundPixmap(m_real_frame_pm.drawable()); 573 menu.frame.setBackgroundPixmap(m_real_frame_pm.drawable());
572 GContext def_gc(menu.frame); 574 GContext def_gc(menu.frame);
@@ -1385,7 +1387,6 @@ void Menu::keyPressEvent(XKeyEvent &event) {
1385 1387
1386void Menu::reconfigure() { 1388void Menu::reconfigure() {
1387 1389
1388
1389 if (alpha() == 255 && m_transp.get() != 0) { 1390 if (alpha() == 255 && m_transp.get() != 0) {
1390 m_transp.reset(0); 1391 m_transp.reset(0);
1391 } else if (alpha () < 255) { 1392 } else if (alpha () < 255) {
@@ -1394,8 +1395,13 @@ void Menu::reconfigure() {
1394 m_transp.reset(new Transparent(FbPixmap::getRootPixmap(screenNumber()), 1395 m_transp.reset(new Transparent(FbPixmap::getRootPixmap(screenNumber()),
1395 m_real_frame_pm.drawable(), alpha(), 1396 m_real_frame_pm.drawable(), alpha(),
1396 screenNumber())); 1397 screenNumber()));
1397 } else 1398 } else {
1399 Pixmap root = FbPixmap::getRootPixmap(screenNumber());
1400 if (m_transp->source() != root)
1401 m_transp->setSource(root, screenNumber());
1402
1398 m_transp->setAlpha(alpha()); 1403 m_transp->setAlpha(alpha());
1404 }
1399 } 1405 }
1400 1406
1401 m_need_update = true; // redraw items 1407 m_need_update = true; // redraw items
diff --git a/src/FbTk/Transparent.cc b/src/FbTk/Transparent.cc
index 9cc377e..b6521b9 100644
--- a/src/FbTk/Transparent.cc
+++ b/src/FbTk/Transparent.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Transparent.cc,v 1.7 2004/09/10 16:48:15 akir Exp $ 22// $Id: Transparent.cc,v 1.8 2004/09/11 15:52:23 rathnor Exp $
23 23
24#include "Transparent.hh" 24#include "Transparent.hh"
25#include "App.hh" 25#include "App.hh"
@@ -60,7 +60,7 @@ Picture createAlphaPic(Window drawable, unsigned char alpha) {
60 Pixmap alpha_pm = XCreatePixmap(disp, drawable, 60 Pixmap alpha_pm = XCreatePixmap(disp, drawable,
61 1, 1, 8); 61 1, 1, 8);
62 if (alpha_pm == 0) { 62 if (alpha_pm == 0) {
63 cerr<<"FbTk::Transparent: "<<_FBTKTEXT(Error, NoRenderPixmap, "Warning: Failed to create alpha pixmap.", "XCreatePixmap files for our transparency pixmap")<<endl; 63 cerr<<"FbTk::Transparent: "<<_FBTKTEXT(Error, NoRenderPixmap, "Warning: Failed to create alpha pixmap.", "XCreatePixmap failed for our transparency pixmap")<<endl;
64 return 0; 64 return 0;
65 } 65 }
66 66
@@ -131,7 +131,6 @@ Transparent::Transparent(Drawable src, Drawable dest, unsigned char alpha, int s
131 XRenderFindVisualFormat(disp, 131 XRenderFindVisualFormat(disp,
132 DefaultVisual(disp, screen_num)); 132 DefaultVisual(disp, screen_num));
133 133
134
135 if (src != 0 && format != 0) { 134 if (src != 0 && format != 0) {
136 m_src_pic = XRenderCreatePicture(disp, src, format, 135 m_src_pic = XRenderCreatePicture(disp, src, format,
137 0, 0); 136 0, 0);