diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-30 21:51:50 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-30 21:51:50 +0000 |
| commit | 610950024f8d156a91ece7f5c05a0f949ec8727b (patch) | |
| tree | 328b9470f734fa8480089b6ab89264db419e5f0a /src | |
| parent | 5de35ba1f75b4004bebec70c582b17f2f8820439 (diff) | |
don't move the client if it isnt going anywhere
Diffstat (limited to 'src')
| -rw-r--r-- | src/client.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client.cc b/src/client.cc index 8e00198a..d25d458e 100644 --- a/src/client.cc +++ b/src/client.cc @@ -903,7 +903,8 @@ void Client::toggleClientBorder(bool addborder) // different position. // when re-adding the border to the client, the same operation needs to be // reversed. - int x = _area.x(), y = _area.y(); + int oldx = _area.x(), oldy = _area.y(); + int x = oldx, y = oldy; switch(_gravity) { default: case NorthWestGravity: @@ -952,7 +953,8 @@ void Client::toggleClientBorder(bool addborder) XSetWindowBorderWidth(**otk::display, _window, _border_width); // move the client so it is back it the right spot _with_ its border! - XMoveWindow(**otk::display, _window, x, y); + if (x != oldx || y != oldy) + XMoveWindow(**otk::display, _window, x, y); } else XSetWindowBorderWidth(**otk::display, _window, 0); } |
