// changing its gravity
if (frame && _gravity != oldgravity) {
// move our idea of the client's position based on its new gravity
- int x, y;
+ int x = frame->rect().x(), y = frame->rect().y();
frame->frameGravity(x, y);
_area.setPos(x, y);
}
}
-void Client::move(int x, int y)
+void Client::move(int x, int y, bool framepos)
{
if (!(_functions & Func_Move)) return;
+ if (framepos)
+ frame->frameGravity(x, y);
internal_move(x, y);
}
_gravity = StaticGravity;
// adjust our idea of position based on StaticGravity, so we stay put
// unless asked
+ x = frame->rect().x();
+ y = frame->rect().y();
frame->frameGravity(x, y);
if (savearea) {
if (max) {
// because of my little gravity trick in here, we have to set the position
// of the client to what it really is
- int x, y;
+ int x = frame->rect().x(), y = frame->rect().y();
frame->frameGravity(x, y);
_area.setPos(x, y);
}
/*!
@param x The X coordinate to move to.
@param y The Y coordinate to move to.
+ @param bool framepos True if the frame should be moved to the position
+ instead of the client. This makes it ignore the gravity.
*/
- void move(int x, int y);
+ void move(int x, int y, bool framepos = false);
//! Resizes the client window, anchoring it in a given corner
/*!
void Frame::adjustPosition()
{
int x, y;
+ x = _client->area().x();
+ y = _client->area().y();
clientGravity(x, y);
move(x, y);
}
void Frame::clientGravity(int &x, int &y)
{
- x = _client->area().x();
- y = _client->area().y();
-
// horizontal
switch (_client->gravity()) {
default:
void Frame::frameGravity(int &x, int &y)
{
- x = rect().x();
- y = rect().y();
-
// horizontal
switch (_client->gravity()) {
default: