don't move the client if it isnt going anywhere
This commit is contained in:
parent
5de35ba1f7
commit
610950024f
1 changed files with 4 additions and 2 deletions
|
@ -903,7 +903,8 @@ void Client::toggleClientBorder(bool addborder)
|
||||||
// different position.
|
// different position.
|
||||||
// when re-adding the border to the client, the same operation needs to be
|
// when re-adding the border to the client, the same operation needs to be
|
||||||
// reversed.
|
// reversed.
|
||||||
int x = _area.x(), y = _area.y();
|
int oldx = _area.x(), oldy = _area.y();
|
||||||
|
int x = oldx, y = oldy;
|
||||||
switch(_gravity) {
|
switch(_gravity) {
|
||||||
default:
|
default:
|
||||||
case NorthWestGravity:
|
case NorthWestGravity:
|
||||||
|
@ -952,6 +953,7 @@ void Client::toggleClientBorder(bool addborder)
|
||||||
XSetWindowBorderWidth(**otk::display, _window, _border_width);
|
XSetWindowBorderWidth(**otk::display, _window, _border_width);
|
||||||
|
|
||||||
// move the client so it is back it the right spot _with_ its border!
|
// move the client so it is back it the right spot _with_ its border!
|
||||||
|
if (x != oldx || y != oldy)
|
||||||
XMoveWindow(**otk::display, _window, x, y);
|
XMoveWindow(**otk::display, _window, x, y);
|
||||||
} else
|
} else
|
||||||
XSetWindowBorderWidth(**otk::display, _window, 0);
|
XSetWindowBorderWidth(**otk::display, _window, 0);
|
||||||
|
|
Loading…
Reference in a new issue