fix e3768b4355
accidentally picked the patch from the wrong branch just about comments
This commit is contained in:
parent
92aa2fb553
commit
ff700a8db5
4 changed files with 16 additions and 26 deletions
|
@ -1599,7 +1599,7 @@ bool Unmanaged::windowEvent(xcb_generic_event_t *e)
|
|||
release(ReleaseReason::Destroyed);
|
||||
break;
|
||||
case XCB_UNMAP_NOTIFY:{
|
||||
workspace()->updateFocusMousePosition(Cursor::pos());
|
||||
workspace()->updateFocusMousePosition(Cursor::pos()); // may cause leave event
|
||||
|
||||
// unmap notify might have been emitted due to a destroy notify
|
||||
// but unmap notify gets emitted before the destroy notify, nevertheless at this
|
||||
|
|
|
@ -2405,7 +2405,7 @@ void Client::setFullScreen(bool set, bool user)
|
|||
setShade(ShadeNone);
|
||||
bool was_fs = isFullScreen();
|
||||
if (was_fs)
|
||||
workspace()->updateFocusMousePosition(Cursor::pos());
|
||||
workspace()->updateFocusMousePosition(Cursor::pos()); // may cause leave event
|
||||
else
|
||||
geom_fs_restore = geometry();
|
||||
fullscreen_mode = set ? FullScreenNormal : FullScreenNone;
|
||||
|
@ -3126,10 +3126,7 @@ 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());
|
||||
workspace()->updateFocusMousePosition(Cursor::pos()); // may cause leave event
|
||||
|
||||
GeometryUpdatesBlocker blocker(this);
|
||||
|
||||
|
|
|
@ -663,10 +663,7 @@ 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());
|
||||
workspace()->updateFocusMousePosition(Cursor::pos()); // may cause leave event;
|
||||
|
||||
const int oldScreen = screen();
|
||||
move(left, top);
|
||||
|
@ -731,10 +728,7 @@ void Client::growHorizontal()
|
|||
}
|
||||
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());
|
||||
workspace()->updateFocusMousePosition(Cursor::pos()); // may cause leave event;
|
||||
setGeometry(geom);
|
||||
}
|
||||
|
||||
|
@ -754,10 +748,7 @@ void Client::shrinkHorizontal()
|
|||
return;
|
||||
geom.setSize(adjustedSize(geom.size(), SizemodeFixedW));
|
||||
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());
|
||||
workspace()->updateFocusMousePosition(Cursor::pos()); // may cause leave event;
|
||||
setGeometry(geom);
|
||||
}
|
||||
}
|
||||
|
@ -783,10 +774,7 @@ 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());
|
||||
workspace()->updateFocusMousePosition(Cursor::pos()); // may cause leave event;
|
||||
setGeometry(geom);
|
||||
}
|
||||
|
||||
|
@ -807,10 +795,7 @@ void Client::shrinkVertical()
|
|||
return;
|
||||
geom.setSize(adjustedSize(geom.size(), SizemodeFixedH));
|
||||
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());
|
||||
workspace()->updateFocusMousePosition(Cursor::pos()); // may cause leave event;
|
||||
setGeometry(geom);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -314,6 +314,14 @@ public:
|
|||
|
||||
void cancelDelayFocus();
|
||||
void requestDelayFocus(Client*);
|
||||
|
||||
/**
|
||||
* updates the mouse position to track whether a focus follow mouse focus change was caused by
|
||||
* an actual mouse move
|
||||
* is esp. called on enter/motion events of inactive windows
|
||||
* since an active window doesn't receive mouse events, it must also be invoked if a (potentially)
|
||||
* active window might be moved/resize away from the cursor (causing a leave event)
|
||||
*/
|
||||
void updateFocusMousePosition(const QPoint& pos);
|
||||
QPoint focusMousePosition() const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue