aboutsummaryrefslogtreecommitdiffhomepage
path: root/hyprctl
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-10-26 13:11:05 +0100
committervaxerski <[email protected]>2022-10-26 13:11:05 +0100
commit46e51a81c4c457078ac144c010d9d4d64d02f9df (patch)
treef8e18b5c7a40fadb1ec8829c2e5de9c3e77ed0b4 /hyprctl
parent83ad59fae7d3d3afa6d827d918d32b7077a6b400 (diff)
downloadHyprland-46e51a81c4c457078ac144c010d9d4d64d02f9df.tar.gz
Hyprland-46e51a81c4c457078ac144c010d9d4d64d02f9df.zip
unrestrict hyprctl message size
Diffstat (limited to 'hyprctl')
-rw-r--r--hyprctl/main.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/hyprctl/main.cpp b/hyprctl/main.cpp
index d407f206..a216b1a0 100644
--- a/hyprctl/main.cpp
+++ b/hyprctl/main.cpp
@@ -80,6 +80,7 @@ void request(std::string arg) {
return;
}
+ std::string reply = "";
char buffer[8192] = {0};
sizeWritten = read(SERVERSOCKET, buffer, 8192);
@@ -89,9 +90,20 @@ void request(std::string arg) {
return;
}
+ reply += std::string(buffer, sizeWritten);
+
+ while (sizeWritten == 8192) {
+ sizeWritten = read(SERVERSOCKET, buffer, 8192);
+ if (sizeWritten < 0) {
+ std::cout << "Couldn't read (5)";
+ return;
+ }
+ reply += std::string(buffer, sizeWritten);
+ }
+
close(SERVERSOCKET);
- std::cout << std::string(buffer);
+ std::cout << reply;
}
void requestHyprpaper(std::string arg) {