all repos — fluxbox @ 45e689d4a2c866d10d99b0920e0a7408b5a9aaab

custom fork of the fluxbox windowmanager

fixed slit redrawing bug
fluxgen fluxgen
commit

45e689d4a2c866d10d99b0920e0a7408b5a9aaab

parent

2afb87a4e48058aba8e58c37c6e4da62c5b8e80c

1 files changed, 15 insertions(+), 11 deletions(-)

jump to
M src/Slit.ccsrc/Slit.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: Slit.cc,v 1.50 2003/05/11 19:01:09 fluxgen Exp $ +// $Id: Slit.cc,v 1.51 2003/05/13 13:28:28 fluxgen Exp $ #include "Slit.hh"

@@ -306,7 +306,7 @@ screen().rootTheme().borderColor().pixel();

attrib.colormap = screen().rootWindow().colormap(); attrib.override_redirect = True; attrib.event_mask = SubstructureRedirectMask | ButtonPressMask | - EnterWindowMask | LeaveWindowMask; + EnterWindowMask | LeaveWindowMask | ExposureMask; frame.x = frame.y = 0; frame.width = frame.height = 1;

@@ -458,7 +458,7 @@ XChangeSaveSet(disp, client->window, SetModeInsert);

// reactivate events for frame.window frame.window.setEventMask(SubstructureRedirectMask | - ButtonPressMask | EnterWindowMask | LeaveWindowMask); + ButtonPressMask | EnterWindowMask | LeaveWindowMask | ExposureMask); // setup event for slit client window client->enableEvents();

@@ -524,7 +524,7 @@ client->x, client->y);

XChangeSaveSet(disp, client->window, SetModeDelete); // reactivate events to frame.window frame.window.setEventMask(SubstructureRedirectMask | ButtonPressMask | - EnterWindowMask | LeaveWindowMask); + EnterWindowMask | LeaveWindowMask | ExposureMask); XFlush(disp); }

@@ -638,13 +638,17 @@

Pixmap tmp = frame.pixmap; FbTk::ImageControl *image_ctrl = screen().getImageControl(); const FbTk::Texture &texture = m_slit_theme->texture(); - if (texture.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + if (texture.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID) && + texture.pixmap().drawable() == 0) { frame.pixmap = None; frame.window.setBackgroundColor(texture.color()); } else { frame.pixmap = image_ctrl->renderImage(frame.width, frame.height, texture); - frame.window.setBackgroundPixmap(frame.pixmap); + if (frame.pixmap == 0) + frame.window.setBackgroundColor(texture.color()); + else + frame.window.setBackgroundPixmap(frame.pixmap); } if (tmp)

@@ -878,11 +882,11 @@ break;

} if (isHidden()) { - frame.window.moveResize(frame.x_hidden, - frame.y_hidden, frame.width, frame.height); + frame.window.moveResize(frame.x_hidden, frame.y_hidden, + frame.width, frame.height); } else { - frame.window.moveResize(frame.x, - frame.y, frame.width, frame.height); + frame.window.moveResize(frame.x, frame.y, + frame.width, frame.height); } }

@@ -1059,7 +1063,7 @@ if (reconf)

reconfigure(); } -void Slit::exposeEvent(XExposeEvent &event) { +void Slit::exposeEvent(XExposeEvent &ev) { frame.window.clear(); }