mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 14:11:59 -07:00
Added window rules
This commit is contained in:
@@ -54,11 +54,7 @@ std::string CHyprXWaylandManager::getTitle(CWindow* pWindow) {
|
||||
if (pWindow->m_uSurface.xwayland) {
|
||||
return std::string(pWindow->m_uSurface.xwayland->title);
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (pWindow->m_uSurface.xdg) {
|
||||
} else if (pWindow->m_uSurface.xdg) {
|
||||
if (pWindow->m_uSurface.xdg->toplevel) {
|
||||
return std::string(pWindow->m_uSurface.xdg->toplevel->title);
|
||||
}
|
||||
@@ -72,6 +68,26 @@ std::string CHyprXWaylandManager::getTitle(CWindow* pWindow) {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string CHyprXWaylandManager::getAppIDClass(CWindow* pWindow) {
|
||||
try {
|
||||
if (pWindow->m_bIsX11) {
|
||||
if (pWindow->m_uSurface.xwayland) {
|
||||
return std::string(pWindow->m_uSurface.xwayland->_class);
|
||||
}
|
||||
} else if (pWindow->m_uSurface.xdg) {
|
||||
if (pWindow->m_uSurface.xdg->toplevel) {
|
||||
return std::string(pWindow->m_uSurface.xdg->toplevel->app_id);
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
} catch (std::logic_error& e) {
|
||||
Debug::log(ERR, "Error in getAppIDClass: %s", e.what());
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
void CHyprXWaylandManager::sendCloseWindow(CWindow* pWindow) {
|
||||
if (pWindow->m_bIsX11) {
|
||||
wlr_xwayland_surface_close(pWindow->m_uSurface.xwayland);
|
||||
|
Reference in New Issue
Block a user