input: try to refocus a focusable window when seat grabs are reset (#7669)

This commit is contained in:
outfoxxed 2024-09-06 17:06:55 -07:00 committed by GitHub
parent b0fca6eaf0
commit 0500213086
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 50 additions and 11 deletions

View file

@ -202,6 +202,13 @@ void CPopup::reposition() {
m_pResource->applyPositioning(box, COORDS);
}
SP<CWLSurface> CPopup::getT1Owner() {
if (m_pWindowOwner)
return m_pWindowOwner->m_pWLSurface;
else
return m_pLayerOwner->surface;
}
Vector2D CPopup::coordsRelativeToParent() {
Vector2D offset;

View file

@ -18,21 +18,22 @@ class CPopup {
~CPopup();
Vector2D coordsRelativeToParent();
Vector2D coordsGlobal();
SP<CWLSurface> getT1Owner();
Vector2D coordsRelativeToParent();
Vector2D coordsGlobal();
Vector2D size();
Vector2D size();
void onNewPopup(SP<CXDGPopupResource> popup);
void onDestroy();
void onMap();
void onUnmap();
void onCommit(bool ignoreSiblings = false);
void onReposition();
void onNewPopup(SP<CXDGPopupResource> popup);
void onDestroy();
void onMap();
void onUnmap();
void onCommit(bool ignoreSiblings = false);
void onReposition();
void recheckTree();
void recheckTree();
bool visible();
bool visible();
// will also loop over this node
void breadthfirst(std::function<void(CPopup*, void*)> fn, void* data);