summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Slit.cc26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index c7da522..d61b411 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.50 2003/05/11 19:01:09 fluxgen Exp $ 25// $Id: Slit.cc,v 1.51 2003/05/13 13:28:28 fluxgen Exp $
26 26
27#include "Slit.hh" 27#include "Slit.hh"
28 28
@@ -306,7 +306,7 @@ Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename)
306 attrib.colormap = screen().rootWindow().colormap(); 306 attrib.colormap = screen().rootWindow().colormap();
307 attrib.override_redirect = True; 307 attrib.override_redirect = True;
308 attrib.event_mask = SubstructureRedirectMask | ButtonPressMask | 308 attrib.event_mask = SubstructureRedirectMask | ButtonPressMask |
309 EnterWindowMask | LeaveWindowMask; 309 EnterWindowMask | LeaveWindowMask | ExposureMask;
310 310
311 frame.x = frame.y = 0; 311 frame.x = frame.y = 0;
312 frame.width = frame.height = 1; 312 frame.width = frame.height = 1;
@@ -458,7 +458,7 @@ void Slit::addClient(Window w) {
458 458
459 // reactivate events for frame.window 459 // reactivate events for frame.window
460 frame.window.setEventMask(SubstructureRedirectMask | 460 frame.window.setEventMask(SubstructureRedirectMask |
461 ButtonPressMask | EnterWindowMask | LeaveWindowMask); 461 ButtonPressMask | EnterWindowMask | LeaveWindowMask | ExposureMask);
462 462
463 // setup event for slit client window 463 // setup event for slit client window
464 client->enableEvents(); 464 client->enableEvents();
@@ -524,7 +524,7 @@ void Slit::removeClient(SlitClient *client, bool remap, bool destroy) {
524 XChangeSaveSet(disp, client->window, SetModeDelete); 524 XChangeSaveSet(disp, client->window, SetModeDelete);
525 // reactivate events to frame.window 525 // reactivate events to frame.window
526 frame.window.setEventMask(SubstructureRedirectMask | ButtonPressMask | 526 frame.window.setEventMask(SubstructureRedirectMask | ButtonPressMask |
527 EnterWindowMask | LeaveWindowMask); 527 EnterWindowMask | LeaveWindowMask | ExposureMask);
528 XFlush(disp); 528 XFlush(disp);
529 } 529 }
530 530
@@ -638,13 +638,17 @@ void Slit::reconfigure() {
638 Pixmap tmp = frame.pixmap; 638 Pixmap tmp = frame.pixmap;
639 FbTk::ImageControl *image_ctrl = screen().getImageControl(); 639 FbTk::ImageControl *image_ctrl = screen().getImageControl();
640 const FbTk::Texture &texture = m_slit_theme->texture(); 640 const FbTk::Texture &texture = m_slit_theme->texture();
641 if (texture.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { 641 if (texture.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID) &&
642 texture.pixmap().drawable() == 0) {
642 frame.pixmap = None; 643 frame.pixmap = None;
643 frame.window.setBackgroundColor(texture.color()); 644 frame.window.setBackgroundColor(texture.color());
644 } else { 645 } else {
645 frame.pixmap = image_ctrl->renderImage(frame.width, frame.height, 646 frame.pixmap = image_ctrl->renderImage(frame.width, frame.height,
646 texture); 647 texture);
647 frame.window.setBackgroundPixmap(frame.pixmap); 648 if (frame.pixmap == 0)
649 frame.window.setBackgroundColor(texture.color());
650 else
651 frame.window.setBackgroundPixmap(frame.pixmap);
648 } 652 }
649 653
650 if (tmp) 654 if (tmp)
@@ -878,11 +882,11 @@ void Slit::reposition() {
878 } 882 }
879 883
880 if (isHidden()) { 884 if (isHidden()) {
881 frame.window.moveResize(frame.x_hidden, 885 frame.window.moveResize(frame.x_hidden, frame.y_hidden,
882 frame.y_hidden, frame.width, frame.height); 886 frame.width, frame.height);
883 } else { 887 } else {
884 frame.window.moveResize(frame.x, 888 frame.window.moveResize(frame.x, frame.y,
885 frame.y, frame.width, frame.height); 889 frame.width, frame.height);
886 } 890 }
887} 891}
888 892
@@ -1059,7 +1063,7 @@ void Slit::configureRequestEvent(XConfigureRequestEvent &event) {
1059 reconfigure(); 1063 reconfigure();
1060} 1064}
1061 1065
1062void Slit::exposeEvent(XExposeEvent &event) { 1066void Slit::exposeEvent(XExposeEvent &ev) {
1063 frame.window.clear(); 1067 frame.window.clear();
1064} 1068}
1065 1069