summaryrefslogtreecommitdiff
path: root/src/desktop
diff options
context:
space:
mode:
authoroutfoxxed <outfoxxed@outfoxxed.me>2024-09-06 17:06:55 -0700
committerGitHub <noreply@github.com>2024-09-07 01:06:55 +0100
commit0500213086f8402ccbdb2acb4748dbc6d22e21f6 (patch)
treece3154cab29fd2437af4d55e53ef994c0d6a72d2 /src/desktop
parentb0fca6eaf00a2c5061f499c76ec8d60772b6a719 (diff)
input: try to refocus a focusable window when seat grabs are reset (#7669)
Diffstat (limited to 'src/desktop')
-rw-r--r--src/desktop/Popup.cpp7
-rw-r--r--src/desktop/Popup.hpp23
2 files changed, 19 insertions, 11 deletions
diff --git a/src/desktop/Popup.cpp b/src/desktop/Popup.cpp
index a4952ef7..9e254fa6 100644
--- a/src/desktop/Popup.cpp
+++ b/src/desktop/Popup.cpp
@@ -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;
diff --git a/src/desktop/Popup.hpp b/src/desktop/Popup.hpp
index eea3fb84..04996612 100644
--- a/src/desktop/Popup.hpp
+++ b/src/desktop/Popup.hpp
@@ -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);