aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-09-07 10:41:26 (GMT)
committerfluxgen <fluxgen>2002-09-07 10:41:26 (GMT)
commit8b60a62d4740d174020c2c977a7077ebd9d02ca6 (patch)
tree90bf3264ff4d690cca1ff1fa98fbb04c1399864a
parent52f1975a113117cb0a2f128bca8c4ffa2e23e102 (diff)
downloadfluxbox-8b60a62d4740d174020c2c977a7077ebd9d02ca6.zip
fluxbox-8b60a62d4740d174020c2c977a7077ebd9d02ca6.tar.bz2
fixed outlined size when resizing
-rw-r--r--src/Window.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/Window.cc b/src/Window.cc
index b1e1089..2c6499e 100644
--- a/src/Window.cc
+++ b/src/Window.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: Window.cc,v 1.77 2002/09/01 11:44:56 fluxgen Exp $ 25// $Id: Window.cc,v 1.78 2002/09/07 10:41:26 fluxgen Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -3326,7 +3326,7 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent *me) {
3326 } else if (resizing) { 3326 } else if (resizing) {
3327 XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(), 3327 XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(),
3328 frame.resize_x, frame.resize_y, 3328 frame.resize_x, frame.resize_y,
3329 frame.resize_w, frame.resize_h); 3329 frame.resize_w-1, frame.resize_h-1);
3330 3330
3331 int gx, gy; 3331 int gx, gy;
3332 3332
@@ -3350,7 +3350,7 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent *me) {
3350 3350
3351 XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(), 3351 XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(),
3352 frame.resize_x, frame.resize_y, 3352 frame.resize_x, frame.resize_y,
3353 frame.resize_w, frame.resize_h); 3353 frame.resize_w-1, frame.resize_h-1);
3354 3354
3355 if (screen->doShowWindowPos()) 3355 if (screen->doShowWindowPos())
3356 screen->showGeometry(gx, gy); 3356 screen->showGeometry(gx, gy);
@@ -3600,7 +3600,7 @@ void FluxboxWindow::startResizing(XMotionEvent *me, bool left) {
3600 3600
3601 XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(), 3601 XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(),
3602 frame.resize_x, frame.resize_y, 3602 frame.resize_x, frame.resize_y,
3603 frame.resize_w, frame.resize_h); 3603 frame.resize_w-1, frame.resize_h-1);
3604} 3604}
3605 3605
3606void FluxboxWindow::stopResizing(Window win) { 3606void FluxboxWindow::stopResizing(Window win) {
@@ -3608,7 +3608,7 @@ void FluxboxWindow::stopResizing(Window win) {
3608 3608
3609 XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(), 3609 XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(),
3610 frame.resize_x, frame.resize_y, 3610 frame.resize_x, frame.resize_y,
3611 frame.resize_w, frame.resize_h); 3611 frame.resize_w-1, frame.resize_h-1);
3612 3612
3613 screen->hideGeometry(); 3613 screen->hideGeometry();
3614 3614
@@ -3979,7 +3979,7 @@ void FluxboxWindow::right_fixsize(int *gx, int *gy) {
3979 int dx = frame.resize_w - client.base_width - (frame.mwm_border_w * 2) - 3979 int dx = frame.resize_w - client.base_width - (frame.mwm_border_w * 2) -
3980 screen->getBorderWidth2x(); 3980 screen->getBorderWidth2x();
3981 int dy = frame.resize_h - frame.y_border - client.base_height - 3981 int dy = frame.resize_h - frame.y_border - client.base_height -
3982 frame.handle_h - (screen->getBorderWidth() * 3) - (frame.mwm_border_w * 2); 3982 frame.handle_h - (screen->getBorderWidth() * (2+decorations.border)) - (frame.mwm_border_w * 2);
3983 3983
3984 if (dx < (signed) client.min_width) 3984 if (dx < (signed) client.min_width)
3985 dx = client.min_width; 3985 dx = client.min_width;
@@ -4001,7 +4001,8 @@ void FluxboxWindow::right_fixsize(int *gx, int *gy) {
4001 4001
4002 frame.resize_w = dx + (frame.mwm_border_w * 2) + screen->getBorderWidth2x(); 4002 frame.resize_w = dx + (frame.mwm_border_w * 2) + screen->getBorderWidth2x();
4003 frame.resize_h = dy + frame.y_border + frame.handle_h + 4003 frame.resize_h = dy + frame.y_border + frame.handle_h +
4004 (frame.mwm_border_w * 2) + (screen->getBorderWidth() * 3); 4004 (frame.mwm_border_w * 2) + (screen->getBorderWidth() *
4005 (2+decorations.border));
4005} 4006}
4006 4007
4007 4008
@@ -4011,7 +4012,7 @@ void FluxboxWindow::left_fixsize(int *gx, int *gy) {
4011 int dx = frame.x + frame.width - frame.resize_x - client.base_width - 4012 int dx = frame.x + frame.width - frame.resize_x - client.base_width -
4012 (frame.mwm_border_w * 2); 4013 (frame.mwm_border_w * 2);
4013 int dy = frame.resize_h - frame.y_border - client.base_height - 4014 int dy = frame.resize_h - frame.y_border - client.base_height -
4014 frame.handle_h - (screen->getBorderWidth() * 3) - (frame.mwm_border_w * 2); 4015 frame.handle_h - (screen->getBorderWidth() * (2+decorations.border)) - (frame.mwm_border_w * 2);
4015 4016
4016 if (dx < (signed) client.min_width) dx = client.min_width; 4017 if (dx < (signed) client.min_width) dx = client.min_width;
4017 if (dy < (signed) client.min_height) dy = client.min_height; 4018 if (dy < (signed) client.min_height) dy = client.min_height;
@@ -4029,7 +4030,8 @@ void FluxboxWindow::left_fixsize(int *gx, int *gy) {
4029 4030
4030 frame.resize_w = dx + (frame.mwm_border_w * 2) + screen->getBorderWidth2x(); 4031 frame.resize_w = dx + (frame.mwm_border_w * 2) + screen->getBorderWidth2x();
4031 frame.resize_x = frame.x + frame.width - frame.resize_w + 4032 frame.resize_x = frame.x + frame.width - frame.resize_w +
4032 screen->getBorderWidth2x(); 4033 screen->getBorderWidth2x();
4033 frame.resize_h = dy + frame.y_border + frame.handle_h + 4034 frame.resize_h = dy + frame.y_border + frame.handle_h +
4034 (frame.mwm_border_w * 2) + (screen->getBorderWidth() * 3); 4035 (frame.mwm_border_w * 2) + (screen->getBorderWidth() *
4036 (2+decorations.border));
4035} 4037}