aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/layout/IHyprLayout.hpp
diff options
context:
space:
mode:
authoroutfoxxed <[email protected]>2023-09-12 14:37:08 -0700
committerGitHub <[email protected]>2023-09-12 22:37:08 +0100
commitb0d5e4008b96f2cdbb6f6c2449c790d921d1546b (patch)
tree4ea707d3f72e379d52a37da2ccaf8a3044784c72 /src/layout/IHyprLayout.hpp
parentbe19773aaa4507fe6246f318b3bb4b969d79dc97 (diff)
downloadHyprland-b0d5e4008b96f2cdbb6f6c2449c790d921d1546b.tar.gz
Hyprland-b0d5e4008b96f2cdbb6f6c2449c790d921d1546b.zip
layout: Allow the layout to control how windows are raised in groups (#3275)
* Allow the layout to control how windows are raised in groups Previously windows could only be focused if they weren't hidden or were part of a group. This shifts the logic for picking the window out of a group to the layout allowing for alternate group implementations to function normally. * Fix doc comment consistency * Fix tabs in comments
Diffstat (limited to 'src/layout/IHyprLayout.hpp')
-rw-r--r--src/layout/IHyprLayout.hpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/layout/IHyprLayout.hpp b/src/layout/IHyprLayout.hpp
index a0d5b2bb..282eb1ea 100644
--- a/src/layout/IHyprLayout.hpp
+++ b/src/layout/IHyprLayout.hpp
@@ -156,9 +156,21 @@ class IHyprLayout {
virtual void replaceWindowDataWith(CWindow* from, CWindow* to) = 0;
/*
+ Determines if a window can be focused. If hidden this usually means the window is part of a group.
+ */
+ virtual bool isWindowReachable(CWindow*);
+
+ /*
+ Called before an attempt is made to focus a window.
+ Brings the window to the top of any groups and ensures it is not hidden.
+ If the window is unmapped following this call, the focus attempt will fail.
+ */
+ virtual void bringWindowToTop(CWindow*);
+
+ /*
Called via the foreign toplevel activation protocol.
Focuses a window, bringing it to the top of its group if applicable.
- May be ignored.
+ May be ignored.
*/
virtual void requestFocusForWindow(CWindow*);