mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-09-01 12:23:48 -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);
|
||||
|
@@ -14,6 +14,7 @@ public:
|
||||
void activateSurface(wlr_surface*, bool);
|
||||
void getGeometryForWindow(CWindow*, wlr_box*);
|
||||
std::string getTitle(CWindow*);
|
||||
std::string getAppIDClass(CWindow*);
|
||||
void sendCloseWindow(CWindow*);
|
||||
void setWindowSize(CWindow*, const Vector2D&);
|
||||
void setWindowStyleTiled(CWindow*, uint32_t);
|
||||
|
Reference in New Issue
Block a user