mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 10:43:40 +01:00
parent
51d3991783
commit
acf3c62aae
4 changed files with 11 additions and 3 deletions
6
flake.lock
generated
6
flake.lock
generated
|
@ -8,11 +8,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689720698,
|
||||
"narHash": "sha256-DjW5GZlzULXKdEVag13OEV3/hog1k/5ZjSIRIPOHrcQ=",
|
||||
"lastModified": 1689763185,
|
||||
"narHash": "sha256-YOkboQ2w9Zz+jEeQBtFKQGBSYMPPNpFUrN+XYaslH8Q=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "81f4a4f47182c15ee9436d9ab7b2e425a096ce5b",
|
||||
"rev": "5cd5631fb226e315a233473c961714ed1c73840f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -605,6 +605,12 @@ void Hy3Layout::replaceWindowDataWith(CWindow* from, CWindow* to) {
|
|||
this->applyNodeDataToWindow(node);
|
||||
}
|
||||
|
||||
void Hy3Layout::requestFocusForWindow(CWindow* window) {
|
||||
auto node = this->getNodeFromWindow(window);
|
||||
if (node == nullptr) return;
|
||||
node->focusWindow();
|
||||
}
|
||||
|
||||
void Hy3Layout::onEnable() {
|
||||
for (auto& window: g_pCompositor->m_vWindows) {
|
||||
if (window->isHidden() || !window->m_bIsMapped || window->m_bFadingOut || window->m_bIsFloating)
|
||||
|
|
|
@ -62,6 +62,7 @@ public:
|
|||
virtual std::string getLayoutName();
|
||||
virtual CWindow* getNextWindowCandidate(CWindow*);
|
||||
virtual void replaceWindowDataWith(CWindow* from, CWindow* to);
|
||||
virtual void requestFocusForWindow(CWindow*);
|
||||
|
||||
virtual void onEnable();
|
||||
virtual void onDisable();
|
||||
|
|
|
@ -132,6 +132,7 @@ bool Hy3Node::focusWindow() {
|
|||
switch (this->data.type) {
|
||||
case Hy3NodeType::Window:
|
||||
this->markFocused();
|
||||
this->data.as_window->setHidden(false);
|
||||
g_pCompositor->focusWindow(this->data.as_window);
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue