updateFocusMousePosition() before some actions

in particular artificial geometry updates that should not
update the focus and are prone to a static cursor

BUG: 343319
REVIEW: 122299
FIXED-IN: 5.2.1
icc-effect-5.14.5
Thomas Lübking 2015-01-29 00:14:47 +01:00
parent 96628a698c
commit f496a91e59
2 changed files with 31 additions and 2 deletions

View File

@ -3092,6 +3092,11 @@ void Client::setQuickTileMode(QuickTileMode mode, bool keyboard)
if (!isResizable() && maximizeMode() != MaximizeFull)
return;
// this might move the window away from the cursor pos what will cause a leave event
// since this is not due to a cursor move and we didn't receive motion events in the active
// window, we need to udpate the focus mouse position here
workspace()->updateFocusMousePosition(Cursor::pos());
GeometryUpdatesBlocker blocker(this);
if (mode == QuickTileMaximize) {

View File

@ -663,6 +663,11 @@ const char* Placement::policyToString(Policy policy)
void Client::packTo(int left, int top)
{
// this might move the window away from the cursor pos what will cause a leave event
// since this is not due to a cursor move and we didn't receive motion events in the active
// window, we need to udpate the focus mouse position here
workspace()->updateFocusMousePosition(Cursor::pos());
const int oldScreen = screen();
move(left, top);
if (screen() != oldScreen) {
@ -725,6 +730,11 @@ void Client::growHorizontal()
geom.setRight(newright);
}
geom.setSize(adjustedSize(geom.size(), SizemodeFixedW));
geom.setSize(adjustedSize(geom.size(), SizemodeFixedH));
// this might move an inactive window under the cursor pos what will cause an enter event
// since this is not due to a cursor move and we didn't receive motion events in the active
// window, we need to udpate the focus mouse position here
workspace()->updateFocusMousePosition(Cursor::pos());
setGeometry(geom);
}
@ -743,8 +753,13 @@ void Client::shrinkHorizontal()
if (geom.width() <= 1)
return;
geom.setSize(adjustedSize(geom.size(), SizemodeFixedW));
if (geom.width() > 20)
if (geom.width() > 20) {
// this might move the window away from the cursor pos what will cause a leave event
// since this is not due to a cursor move and we didn't receive motion events in the active
// window, we need to udpate the focus mouse position here
workspace()->updateFocusMousePosition(Cursor::pos());
setGeometry(geom);
}
}
void Workspace::slotWindowGrowVertical()
@ -768,6 +783,10 @@ void Client::growVertical()
geom.setBottom(newbottom);
}
geom.setSize(adjustedSize(geom.size(), SizemodeFixedH));
// this might move an inactive window under the cursor pos what will cause an enter event
// since this is not due to a cursor move and we didn't receive motion events in the active
// window, we need to udpate the focus mouse position here
workspace()->updateFocusMousePosition(Cursor::pos());
setGeometry(geom);
}
@ -787,8 +806,13 @@ void Client::shrinkVertical()
if (geom.height() <= 1)
return;
geom.setSize(adjustedSize(geom.size(), SizemodeFixedH));
if (geom.height() > 20)
if (geom.height() > 20) {
// this might move the window away from the cursor pos what will cause a leave event
// since this is not due to a cursor move and we didn't receive motion events in the active
// window, we need to udpate the focus mouse position here
workspace()->updateFocusMousePosition(Cursor::pos());
setGeometry(geom);
}
}