aboutsummaryrefslogtreecommitdiff
path: root/src/Slit.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Slit.cc')
-rw-r--r--src/Slit.cc45
1 files changed, 6 insertions, 39 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index 2ef77c4..c5a74a4 100644
--- a/src/Slit.cc
+++ b/src/Slit.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: Slit.cc,v 1.93 2004/04/19 22:42:05 fluxgen Exp $ 25// $Id: Slit.cc,v 1.94 2004/05/17 15:20:32 rathnor Exp $
26 26
27#include "Slit.hh" 27#include "Slit.hh"
28 28
@@ -310,10 +310,8 @@ Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename)
310 create_mask, &attrib); 310 create_mask, &attrib);
311 311
312 FbTk::EventManager::instance()->add(*this, frame.window); 312 FbTk::EventManager::instance()->add(*this, frame.window);
313 m_transp.reset(new FbTk::Transparent(screen().rootPixmap(), frame.window.drawable(), 313
314 *m_rc_alpha, 314 frame.window.setAlpha(*m_rc_alpha);
315 screen().screenNumber()));
316
317 m_layeritem.reset(new FbTk::XLayerItem(frame.window, layer)); 315 m_layeritem.reset(new FbTk::XLayerItem(frame.window, layer));
318 moveToLayer((*m_rc_layernum).getNum()); 316 moveToLayer((*m_rc_layernum).getNum());
319 317
@@ -689,15 +687,7 @@ void Slit::reconfigure() {
689 if (tmp) 687 if (tmp)
690 image_ctrl.removeImage(tmp); 688 image_ctrl.removeImage(tmp);
691 689
692 if (m_transp.get()) { 690 frame.window.setAlpha(*m_rc_alpha);
693 if (frame.pixmap == 0)
694 m_transp->setDest(frame.window.drawable(), frame.window.screenNumber());
695 else
696 m_transp->setDest(frame.pixmap, frame.window.screenNumber());
697
698 m_transp->setAlpha(*m_rc_alpha);
699 }
700
701 clearWindow(); 691 clearWindow();
702 692
703 int x = 0, y = 0; 693 int x = 0, y = 0;
@@ -1041,18 +1031,7 @@ void Slit::exposeEvent(XExposeEvent &ev) {
1041 // we don't need to clear the entire window 1031 // we don't need to clear the entire window
1042 // just the are that gets exposed 1032 // just the are that gets exposed
1043 frame.window.clearArea(ev.x, ev.y, ev.width, ev.height); 1033 frame.window.clearArea(ev.x, ev.y, ev.width, ev.height);
1044 if (m_transp.get()) { 1034 frame.window.updateTransparent(ev.x, ev.y, ev.width, ev.height);
1045 if ((int)m_transp->alpha() != *m_rc_alpha)
1046 m_transp->setAlpha(*m_rc_alpha);
1047
1048 if (screen().rootPixmap() != m_transp->source())
1049 m_transp->setSource(screen().rootPixmap(), screen().screenNumber());
1050
1051 m_transp->render(frame.window.x() + ev.x, frame.window.y() + ev.y,
1052 ev.x, ev.y,
1053 ev.width, ev.height);
1054
1055 }
1056} 1035}
1057 1036
1058void Slit::update(FbTk::Subject *subj) { 1037void Slit::update(FbTk::Subject *subj) {
@@ -1061,19 +1040,7 @@ void Slit::update(FbTk::Subject *subj) {
1061 1040
1062void Slit::clearWindow() { 1041void Slit::clearWindow() {
1063 frame.window.clear(); 1042 frame.window.clear();
1064 if (m_transp.get()) { 1043 frame.window.updateTransparent();
1065 if ((int)m_transp->alpha() != *m_rc_alpha)
1066 m_transp->setAlpha(*m_rc_alpha);
1067
1068 if (screen().rootPixmap() != m_transp->source())
1069 m_transp->setSource(screen().rootPixmap(), screen().screenNumber());
1070
1071 m_transp->render(frame.window.x(), frame.window.y(),
1072 0, 0,
1073 frame.window.width(), frame.window.height());
1074
1075 }
1076
1077} 1044}
1078 1045
1079void Slit::toggleHidden() { 1046void Slit::toggleHidden() {