mirror of https://github.com/hyprwm/Hyprland
Compare commits
5 Commits
6e1a20abb4
...
8652e99c01
Author | SHA1 | Date |
---|---|---|
|
8652e99c01 | |
|
9c5dd59d4b | |
|
d16c6aa1db | |
|
ac11771348 | |
|
65a94d064a |
|
@ -452,34 +452,31 @@ int main(int argc, char** argv) {
|
|||
batchRequest(fullRequest, json);
|
||||
else if (fullRequest.contains("/hyprpaper"))
|
||||
exitStatus = requestHyprpaper(fullRequest);
|
||||
else if (fullRequest.contains("/switchxkblayout"))
|
||||
exitStatus = request(fullRequest, 2);
|
||||
else if (fullRequest.contains("/seterror"))
|
||||
exitStatus = request(fullRequest, 1);
|
||||
else if (fullRequest.contains("/setprop"))
|
||||
exitStatus = request(fullRequest, 3);
|
||||
else if (fullRequest.contains("/plugin"))
|
||||
exitStatus = request(fullRequest, 1);
|
||||
else if (fullRequest.contains("/dismissnotify"))
|
||||
exitStatus = request(fullRequest, 0);
|
||||
else if (fullRequest.contains("/notify"))
|
||||
exitStatus = request(fullRequest, 2);
|
||||
else if (fullRequest.contains("/output"))
|
||||
exitStatus = request(fullRequest, 2);
|
||||
else if (fullRequest.contains("/setcursor"))
|
||||
exitStatus = request(fullRequest, 1);
|
||||
else if (fullRequest.contains("/dispatch"))
|
||||
exitStatus = request(fullRequest, 1);
|
||||
else if (fullRequest.contains("/keyword"))
|
||||
exitStatus = request(fullRequest, 2);
|
||||
else if (fullRequest.contains("/decorations"))
|
||||
exitStatus = request(fullRequest, 1);
|
||||
else if (fullRequest.contains("/--help"))
|
||||
std::cout << USAGE << std::endl;
|
||||
else if (fullRequest.contains("/rollinglog") && needRoll)
|
||||
exitStatus = request(fullRequest, 0, true);
|
||||
else {
|
||||
exitStatus = request(fullRequest);
|
||||
exitStatus = [&]() -> int{
|
||||
std::map<std::string,int> commands = {
|
||||
{"/switchxkblayout", 2},
|
||||
{"/seterror", 1},
|
||||
{"/setprop", 3},
|
||||
{"/plugin", 1},
|
||||
{"/dismissnotify", 0},
|
||||
{"/notify", 2},
|
||||
{"/output", 2},
|
||||
{"/setcursor", 1},
|
||||
{"/dispatch", 1},
|
||||
{"/keyword", 2},
|
||||
{"/decorations", 1}
|
||||
};
|
||||
for (const auto& [cmd, minArgs] : commands) {
|
||||
if(fullRequest.contains(cmd))
|
||||
return request(fullRequest, minArgs);
|
||||
}
|
||||
return request(fullRequest);
|
||||
}();
|
||||
}
|
||||
|
||||
std::cout << std::flush;
|
||||
|
|
|
@ -7,7 +7,9 @@ CWatchdog::~CWatchdog() {
|
|||
m_bExitThread = true;
|
||||
m_bNotified = true;
|
||||
m_cvWatchdogCondition.notify_all();
|
||||
m_pWatchdog.reset();
|
||||
|
||||
if (m_pWatchdog && m_pWatchdog->joinable())
|
||||
m_pWatchdog->join();
|
||||
}
|
||||
|
||||
CWatchdog::CWatchdog() {
|
||||
|
@ -33,8 +35,6 @@ CWatchdog::CWatchdog() {
|
|||
m_bNotified = false;
|
||||
}
|
||||
});
|
||||
|
||||
m_pWatchdog->detach();
|
||||
}
|
||||
|
||||
void CWatchdog::startWatching() {
|
||||
|
|
|
@ -1473,14 +1473,7 @@ void CInputManager::updateCapabilities() {
|
|||
if (h.expired())
|
||||
continue;
|
||||
|
||||
auto cap = h->getCapabilities();
|
||||
|
||||
if (cap & HID_INPUT_CAPABILITY_KEYBOARD)
|
||||
caps |= WL_SEAT_CAPABILITY_KEYBOARD;
|
||||
if (cap & HID_INPUT_CAPABILITY_POINTER)
|
||||
caps |= WL_SEAT_CAPABILITY_POINTER;
|
||||
if (cap & HID_INPUT_CAPABILITY_TOUCH)
|
||||
caps |= WL_SEAT_CAPABILITY_TOUCH;
|
||||
caps |= h->getCapabilities();
|
||||
}
|
||||
|
||||
g_pSeatManager->updateCapabilities(caps);
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
#define LOGM PROTO::constraints->protoLog
|
||||
|
||||
CPointerConstraint::CPointerConstraint(SP<CZwpLockedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region_, zwpPointerConstraintsV1Lifetime lifetime) :
|
||||
resourceL(resource_), locked(true) {
|
||||
CPointerConstraint::CPointerConstraint(SP<CZwpLockedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region_, zwpPointerConstraintsV1Lifetime lifetime_) :
|
||||
resourceL(resource_), locked(true), lifetime(lifetime_) {
|
||||
if (!resource_->resource())
|
||||
return;
|
||||
|
||||
|
@ -46,8 +46,8 @@ CPointerConstraint::CPointerConstraint(SP<CZwpLockedPointerV1> resource_, SP<CWL
|
|||
sharedConstructions();
|
||||
}
|
||||
|
||||
CPointerConstraint::CPointerConstraint(SP<CZwpConfinedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region_, zwpPointerConstraintsV1Lifetime lifetime) :
|
||||
resourceC(resource_), locked(false) {
|
||||
CPointerConstraint::CPointerConstraint(SP<CZwpConfinedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region_, zwpPointerConstraintsV1Lifetime lifetime_) :
|
||||
resourceC(resource_), locked(false), lifetime(lifetime_) {
|
||||
if (!resource_->resource())
|
||||
return;
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@ class CWLSurfaceResource;
|
|||
|
||||
class CPointerConstraint {
|
||||
public:
|
||||
CPointerConstraint(SP<CZwpLockedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region, zwpPointerConstraintsV1Lifetime lifetime);
|
||||
CPointerConstraint(SP<CZwpConfinedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region, zwpPointerConstraintsV1Lifetime lifetime);
|
||||
CPointerConstraint(SP<CZwpLockedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region, zwpPointerConstraintsV1Lifetime lifetime_);
|
||||
CPointerConstraint(SP<CZwpConfinedPointerV1> resource_, SP<CWLSurfaceResource> surf, wl_resource* region, zwpPointerConstraintsV1Lifetime lifetime_);
|
||||
~CPointerConstraint();
|
||||
|
||||
bool good();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <dlfcn.h>
|
||||
|
||||
CRenderbuffer::~CRenderbuffer() {
|
||||
if (!g_pCompositor)
|
||||
if (!g_pCompositor || g_pCompositor->m_bIsShuttingDown || !g_pHyprRenderer)
|
||||
return;
|
||||
|
||||
g_pHyprRenderer->makeEGLCurrent();
|
||||
|
|
|
@ -9,7 +9,7 @@ CTexture::CTexture() {
|
|||
}
|
||||
|
||||
CTexture::~CTexture() {
|
||||
if (m_bNonOwning)
|
||||
if (m_bNonOwning || !g_pCompositor || g_pCompositor->m_bIsShuttingDown || !g_pHyprRenderer)
|
||||
return;
|
||||
|
||||
g_pHyprRenderer->makeEGLCurrent();
|
||||
|
|
Loading…
Reference in New Issue