avoid drawing the resize outline when not really resizing, caused flickering.
This commit is contained in:
parent
850d366dad
commit
42afb46169
2 changed files with 33 additions and 18 deletions
|
@ -1,5 +1,8 @@
|
||||||
(Format: Year/Month/Day)
|
(Format: Year/Month/Day)
|
||||||
Changes for 0.9.15:
|
Changes for 0.9.15:
|
||||||
|
*05/10/04:
|
||||||
|
* Avoid drawing the resize outline if not really resizing (Mathias)
|
||||||
|
Window.cc
|
||||||
*05/09/25:
|
*05/09/25:
|
||||||
* added nls for "-screen" argument (Thanks php-coder)
|
* added nls for "-screen" argument (Thanks php-coder)
|
||||||
nls/*/Translation.m, nls/fluxbox-nls.hh
|
nls/*/Translation.m, nls/fluxbox-nls.hh
|
||||||
|
|
|
@ -2824,14 +2824,14 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
|
||||||
m_resize_corner = (me.y < cy) ? RIGHTTOP : RIGHTBOTTOM;
|
m_resize_corner = (me.y < cy) ? RIGHTTOP : RIGHTBOTTOM;
|
||||||
|
|
||||||
startResizing(me.window, me.x, me.y);
|
startResizing(me.window, me.x, me.y);
|
||||||
|
|
||||||
} else if (resizing) {
|
} else if (resizing) {
|
||||||
// draw over old rect
|
|
||||||
parent().drawRectangle(screen().rootTheme().opGC(),
|
int old_resize_x = m_last_resize_x;
|
||||||
m_last_resize_x, m_last_resize_y,
|
int old_resize_y = m_last_resize_y;
|
||||||
m_last_resize_w - 1 + 2 * frame().window().borderWidth(),
|
int old_resize_w = m_last_resize_w;
|
||||||
m_last_resize_h - 1 + 2 * frame().window().borderWidth());
|
int old_resize_h = m_last_resize_h;
|
||||||
|
|
||||||
|
|
||||||
// move rectangle
|
// move rectangle
|
||||||
int gx = 0, gy = 0;
|
int gx = 0, gy = 0;
|
||||||
|
|
||||||
|
@ -2854,13 +2854,25 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
|
||||||
|
|
||||||
fixsize(&gx, &gy);
|
fixsize(&gx, &gy);
|
||||||
|
|
||||||
// draw resize rectangle
|
if (old_resize_x != m_last_resize_x ||
|
||||||
parent().drawRectangle(screen().rootTheme().opGC(),
|
old_resize_y != m_last_resize_y ||
|
||||||
m_last_resize_x, m_last_resize_y,
|
old_resize_w != m_last_resize_w ||
|
||||||
m_last_resize_w - 1 + 2 * frame().window().borderWidth(),
|
old_resize_h != m_last_resize_h ) {
|
||||||
m_last_resize_h - 1 + 2 * frame().window().borderWidth());
|
|
||||||
|
|
||||||
screen().showGeometry(gx, gy);
|
// draw over old rect
|
||||||
|
parent().drawRectangle(screen().rootTheme().opGC(),
|
||||||
|
old_resize_x, old_resize_y,
|
||||||
|
old_resize_w - 1 + 2 * frame().window().borderWidth(),
|
||||||
|
old_resize_h - 1 + 2 * frame().window().borderWidth());
|
||||||
|
|
||||||
|
// draw resize rectangle
|
||||||
|
parent().drawRectangle(screen().rootTheme().opGC(),
|
||||||
|
m_last_resize_x, m_last_resize_y,
|
||||||
|
m_last_resize_w - 1 + 2 * frame().window().borderWidth(),
|
||||||
|
m_last_resize_h - 1 + 2 * frame().window().borderWidth());
|
||||||
|
|
||||||
|
screen().showGeometry(gx, gy);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (functions.tabable &&
|
} else if (functions.tabable &&
|
||||||
(me.state & Button2Mask) && inside_titlebar && (client != 0 || m_attaching_tab != 0)) {
|
(me.state & Button2Mask) && inside_titlebar && (client != 0 || m_attaching_tab != 0)) {
|
||||||
|
@ -3355,6 +3367,7 @@ void FluxboxWindow::doSnapping(int &orig_left, int &orig_top) {
|
||||||
|
|
||||||
|
|
||||||
void FluxboxWindow::startResizing(Window win, int x, int y) {
|
void FluxboxWindow::startResizing(Window win, int x, int y) {
|
||||||
|
|
||||||
if (s_num_grabs > 0 || isShaded() || isIconic() )
|
if (s_num_grabs > 0 || isShaded() || isIconic() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -3379,18 +3392,17 @@ void FluxboxWindow::startResizing(Window win, int x, int y) {
|
||||||
|
|
||||||
fixsize(&gx, &gy);
|
fixsize(&gx, &gy);
|
||||||
|
|
||||||
|
|
||||||
screen().showGeometry(gx, gy);
|
screen().showGeometry(gx, gy);
|
||||||
|
|
||||||
parent().drawRectangle(screen().rootTheme().opGC(),
|
parent().drawRectangle(screen().rootTheme().opGC(),
|
||||||
m_last_resize_x, m_last_resize_y,
|
m_last_resize_x, m_last_resize_y,
|
||||||
m_last_resize_w - 1 + 2 * frame().window().borderWidth(),
|
m_last_resize_w - 1 + 2 * frame().window().borderWidth(),
|
||||||
m_last_resize_h - 1 + 2 * frame().window().borderWidth());
|
m_last_resize_h - 1 + 2 * frame().window().borderWidth());
|
||||||
}
|
}
|
||||||
|
|
||||||
void FluxboxWindow::stopResizing(bool interrupted) {
|
void FluxboxWindow::stopResizing(bool interrupted) {
|
||||||
resizing = false;
|
resizing = false;
|
||||||
|
|
||||||
parent().drawRectangle(screen().rootTheme().opGC(),
|
parent().drawRectangle(screen().rootTheme().opGC(),
|
||||||
m_last_resize_x, m_last_resize_y,
|
m_last_resize_x, m_last_resize_y,
|
||||||
m_last_resize_w - 1 + 2 * frame().window().borderWidth(),
|
m_last_resize_w - 1 + 2 * frame().window().borderWidth(),
|
||||||
|
|
Loading…
Reference in a new issue