mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-25 17:21:54 -07:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
0bd541f2fd | ||
|
23d00cdd0d | ||
|
061241d3a2 | ||
|
b9df70be22 | ||
|
9583429eae | ||
|
747c38112b | ||
|
508e82341f | ||
|
ec0a38303b | ||
|
d0bffc4fa9 | ||
|
07a19e2c95 | ||
|
46d5b363fa |
@@ -284,8 +284,10 @@ int requestHyprpaper(std::string arg) {
|
||||
void batchRequest(std::string arg, bool json) {
|
||||
std::string commands = arg.substr(arg.find_first_of(' ') + 1);
|
||||
|
||||
if (json)
|
||||
if (json) {
|
||||
RE2::GlobalReplace(&commands, ";\\s*", ";j/");
|
||||
commands.insert(0, "j/");
|
||||
}
|
||||
|
||||
std::string rq = "[[BATCH]]" + commands;
|
||||
request(rq);
|
||||
|
@@ -73,7 +73,7 @@ int main(int argc, char** argv, char** envp) {
|
||||
|
||||
if (command.empty()) {
|
||||
std::println(stderr, "{}", HELP);
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
g_pPluginManager = std::make_unique<CPluginManager>();
|
||||
@@ -165,6 +165,7 @@ int main(int argc, char** argv, char** envp) {
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
return 1;
|
||||
} else if (notify && !notifyFail) {
|
||||
g_pPluginManager->notify(ICON_OK, 0, 4000, "[hyprpm] Loaded plugins");
|
||||
}
|
||||
|
@@ -1097,7 +1097,8 @@ void CCompositor::focusWindow(PHLWINDOW pWindow, SP<CWLSurfaceResource> pSurface
|
||||
const auto PWORKSPACE = pWindow->m_pWorkspace;
|
||||
// This is to fix incorrect feedback on the focus history.
|
||||
PWORKSPACE->m_pLastFocusedWindow = pWindow;
|
||||
PWORKSPACE->rememberPrevWorkspace(m_pLastMonitor->activeWorkspace);
|
||||
if (m_pLastMonitor->activeWorkspace)
|
||||
PWORKSPACE->rememberPrevWorkspace(m_pLastMonitor->activeWorkspace);
|
||||
if (PWORKSPACE->m_bIsSpecialWorkspace)
|
||||
m_pLastMonitor->changeWorkspace(PWORKSPACE, false, true); // if special ws, open on current monitor
|
||||
else if (PMONITOR)
|
||||
|
@@ -41,8 +41,6 @@ CWindowRule::CWindowRule(const std::string& rule, const std::string& value, bool
|
||||
ruleType = RULE_ANIMATION;
|
||||
else if (rule.starts_with("bordercolor"))
|
||||
ruleType = RULE_BORDERCOLOR;
|
||||
else if (rule.starts_with("bordersize"))
|
||||
ruleType = RULE_BORDERSIZE;
|
||||
else if (rule.starts_with("center"))
|
||||
ruleType = RULE_CENTER;
|
||||
else if (rule.starts_with("fullscreenstate"))
|
||||
@@ -65,12 +63,6 @@ CWindowRule::CWindowRule(const std::string& rule, const std::string& value, bool
|
||||
ruleType = RULE_PLUGIN;
|
||||
else if (rule.starts_with("pseudo"))
|
||||
ruleType = RULE_PSEUDO;
|
||||
else if (rule.starts_with("rounding"))
|
||||
ruleType = RULE_ROUNDING;
|
||||
else if (rule.starts_with("scrollmouse"))
|
||||
ruleType = RULE_SCROLLMOUSE;
|
||||
else if (rule.starts_with("scrolltouchpad"))
|
||||
ruleType = RULE_SCROLLTOUCHPAD;
|
||||
else if (rule.starts_with("size"))
|
||||
ruleType = RULE_SIZE;
|
||||
else if (rule.starts_with("suppressevent"))
|
||||
@@ -79,8 +71,6 @@ CWindowRule::CWindowRule(const std::string& rule, const std::string& value, bool
|
||||
ruleType = RULE_TAG;
|
||||
else if (rule.starts_with("workspace"))
|
||||
ruleType = RULE_WORKSPACE;
|
||||
else if (rule.starts_with("xray"))
|
||||
ruleType = RULE_XRAY;
|
||||
else if (rule.starts_with("prop"))
|
||||
ruleType = RULE_PROP;
|
||||
else {
|
||||
|
@@ -19,7 +19,6 @@ class CWindowRule {
|
||||
RULE_RENDERUNFOCUSED,
|
||||
RULE_ANIMATION,
|
||||
RULE_BORDERCOLOR,
|
||||
RULE_BORDERSIZE,
|
||||
RULE_CENTER,
|
||||
RULE_FULLSCREENSTATE,
|
||||
RULE_GROUP,
|
||||
@@ -31,14 +30,10 @@ class CWindowRule {
|
||||
RULE_OPACITY,
|
||||
RULE_PLUGIN,
|
||||
RULE_PSEUDO,
|
||||
RULE_ROUNDING,
|
||||
RULE_SCROLLMOUSE,
|
||||
RULE_SCROLLTOUCHPAD,
|
||||
RULE_SIZE,
|
||||
RULE_SUPPRESSEVENT,
|
||||
RULE_TAG,
|
||||
RULE_WORKSPACE,
|
||||
RULE_XRAY,
|
||||
RULE_PROP,
|
||||
};
|
||||
|
||||
|
@@ -20,9 +20,6 @@ void IHyprLayout::onWindowCreated(PHLWINDOW pWindow, eDirection direction) {
|
||||
|
||||
pWindow->m_vPseudoSize = pWindow->m_vLastFloatingSize;
|
||||
|
||||
if (!g_pXWaylandManager->shouldBeFloated(pWindow)) // do not apply group rules to child windows
|
||||
pWindow->applyGroupRules();
|
||||
|
||||
bool autoGrouped = IHyprLayout::onWindowCreatedAutoGroup(pWindow);
|
||||
if (autoGrouped)
|
||||
return;
|
||||
@@ -31,6 +28,9 @@ void IHyprLayout::onWindowCreated(PHLWINDOW pWindow, eDirection direction) {
|
||||
onWindowCreatedFloating(pWindow);
|
||||
else
|
||||
onWindowCreatedTiling(pWindow, direction);
|
||||
|
||||
if (!g_pXWaylandManager->shouldBeFloated(pWindow)) // do not apply group rules to child windows
|
||||
pWindow->applyGroupRules();
|
||||
}
|
||||
|
||||
void IHyprLayout::onWindowRemoved(PHLWINDOW pWindow) {
|
||||
|
@@ -47,7 +47,7 @@ void CHyprXWaylandManager::activateSurface(SP<CWLSurfaceResource> pSurface, bool
|
||||
}
|
||||
PWINDOW->m_pXWaylandSurface->activate(activate);
|
||||
}
|
||||
} else if (PWINDOW->m_pXDGSurface)
|
||||
} else if (PWINDOW->m_pXDGSurface && PWINDOW->m_pXDGSurface->toplevel)
|
||||
PWINDOW->m_pXDGSurface->toplevel->setActive(activate);
|
||||
}
|
||||
|
||||
|
@@ -7,6 +7,10 @@
|
||||
#include <unistd.h>
|
||||
#include <cstring>
|
||||
|
||||
// NOLINTNEXTLINE
|
||||
extern "C" char** environ;
|
||||
|
||||
//
|
||||
char const* sigGetenv(char const* name) {
|
||||
const size_t len = strlen(name);
|
||||
for (char** var = environ; *var != nullptr; var++) {
|
||||
|
@@ -1,10 +1,13 @@
|
||||
#include "Dnd.hpp"
|
||||
#ifndef NO_XWAYLAND
|
||||
#include "XWM.hpp"
|
||||
#include "XWayland.hpp"
|
||||
#include "Server.hpp"
|
||||
#endif
|
||||
#include "../managers/XWaylandManager.hpp"
|
||||
#include "../desktop/WLSurface.hpp"
|
||||
|
||||
#ifndef NO_XWAYLAND
|
||||
static xcb_atom_t dndActionToAtom(uint32_t actions) {
|
||||
if (actions & WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY)
|
||||
return HYPRATOMS["XdndActionCopy"];
|
||||
@@ -15,6 +18,7 @@ static xcb_atom_t dndActionToAtom(uint32_t actions) {
|
||||
|
||||
return XCB_ATOM_NONE;
|
||||
}
|
||||
#endif
|
||||
|
||||
eDataSourceType CX11DataOffer::type() {
|
||||
return DATA_SOURCE_TYPE_X11;
|
||||
|
@@ -633,7 +633,14 @@ void CXWM::handleSelectionRequest(xcb_selection_request_event_t* e) {
|
||||
|
||||
if (e->target == HYPRATOMS["TARGETS"]) {
|
||||
// send mime types
|
||||
auto mimes = g_pSeatManager->selection.currentSelection->mimes();
|
||||
std::vector<std::string> mimes;
|
||||
if (sel == &clipboard && g_pSeatManager->selection.currentSelection)
|
||||
mimes = g_pSeatManager->selection.currentSelection->mimes();
|
||||
else if (sel == &dndSelection && !dndDataOffers.empty() && dndDataOffers.at(0)->source)
|
||||
mimes = dndDataOffers.at(0)->source->mimes();
|
||||
|
||||
if (mimes.empty())
|
||||
Debug::log(WARN, "[xwm] WARNING: No mimes in TARGETS?");
|
||||
|
||||
std::vector<xcb_atom_t> atoms;
|
||||
atoms.push_back(HYPRATOMS["TIMESTAMP"]);
|
||||
|
Reference in New Issue
Block a user