mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53: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"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1689720698,
|
"lastModified": 1689763185,
|
||||||
"narHash": "sha256-DjW5GZlzULXKdEVag13OEV3/hog1k/5ZjSIRIPOHrcQ=",
|
"narHash": "sha256-YOkboQ2w9Zz+jEeQBtFKQGBSYMPPNpFUrN+XYaslH8Q=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "81f4a4f47182c15ee9436d9ab7b2e425a096ce5b",
|
"rev": "5cd5631fb226e315a233473c961714ed1c73840f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -605,6 +605,12 @@ void Hy3Layout::replaceWindowDataWith(CWindow* from, CWindow* to) {
|
||||||
this->applyNodeDataToWindow(node);
|
this->applyNodeDataToWindow(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Hy3Layout::requestFocusForWindow(CWindow* window) {
|
||||||
|
auto node = this->getNodeFromWindow(window);
|
||||||
|
if (node == nullptr) return;
|
||||||
|
node->focusWindow();
|
||||||
|
}
|
||||||
|
|
||||||
void Hy3Layout::onEnable() {
|
void Hy3Layout::onEnable() {
|
||||||
for (auto& window: g_pCompositor->m_vWindows) {
|
for (auto& window: g_pCompositor->m_vWindows) {
|
||||||
if (window->isHidden() || !window->m_bIsMapped || window->m_bFadingOut || window->m_bIsFloating)
|
if (window->isHidden() || !window->m_bIsMapped || window->m_bFadingOut || window->m_bIsFloating)
|
||||||
|
|
|
@ -62,6 +62,7 @@ public:
|
||||||
virtual std::string getLayoutName();
|
virtual std::string getLayoutName();
|
||||||
virtual CWindow* getNextWindowCandidate(CWindow*);
|
virtual CWindow* getNextWindowCandidate(CWindow*);
|
||||||
virtual void replaceWindowDataWith(CWindow* from, CWindow* to);
|
virtual void replaceWindowDataWith(CWindow* from, CWindow* to);
|
||||||
|
virtual void requestFocusForWindow(CWindow*);
|
||||||
|
|
||||||
virtual void onEnable();
|
virtual void onEnable();
|
||||||
virtual void onDisable();
|
virtual void onDisable();
|
||||||
|
|
|
@ -132,6 +132,7 @@ bool Hy3Node::focusWindow() {
|
||||||
switch (this->data.type) {
|
switch (this->data.type) {
|
||||||
case Hy3NodeType::Window:
|
case Hy3NodeType::Window:
|
||||||
this->markFocused();
|
this->markFocused();
|
||||||
|
this->data.as_window->setHidden(false);
|
||||||
g_pCompositor->focusWindow(this->data.as_window);
|
g_pCompositor->focusWindow(this->data.as_window);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue