mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-12-27 20:09:48 +01:00
input-capture: inhibit inputs
This commit is contained in:
parent
3b12e2998e
commit
7ff7fcff62
1 changed files with 4 additions and 3 deletions
|
@ -422,6 +422,8 @@ void CInputCapturePortal::activate(sdbus::ObjectPath sessionHandle, double x, do
|
||||||
if (!session->activate(x, y, borderId))
|
if (!session->activate(x, y, borderId))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
m_sState.manager->sendCapture();
|
||||||
|
|
||||||
auto signal = m_pObject->createSignal(INTERFACE_NAME, "Activated");
|
auto signal = m_pObject->createSignal(INTERFACE_NAME, "Activated");
|
||||||
signal << sessionHandle;
|
signal << sessionHandle;
|
||||||
|
|
||||||
|
@ -445,7 +447,6 @@ bool CInputCapturePortal::Session::activate(double x, double y, uint32_t borderI
|
||||||
status = ACTIVATED;
|
status = ACTIVATED;
|
||||||
Debug::log(LOG, "[input-capture] Input captured for {} activationId: {}", sessionHandle.c_str(), activationId);
|
Debug::log(LOG, "[input-capture] Input captured for {} activationId: {}", sessionHandle.c_str(), activationId);
|
||||||
eis->startEmulating(activationId);
|
eis->startEmulating(activationId);
|
||||||
//TODO: capture the pointer
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -458,6 +459,8 @@ void CInputCapturePortal::deactivate(sdbus::ObjectPath sessionHandle) {
|
||||||
if (!session->deactivate())
|
if (!session->deactivate())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
m_sState.manager->sendRelease();
|
||||||
|
|
||||||
auto signal = m_pObject->createSignal(INTERFACE_NAME, "Deactivated");
|
auto signal = m_pObject->createSignal(INTERFACE_NAME, "Deactivated");
|
||||||
signal << sessionHandle;
|
signal << sessionHandle;
|
||||||
std::unordered_map<std::string, sdbus::Variant> options;
|
std::unordered_map<std::string, sdbus::Variant> options;
|
||||||
|
@ -465,8 +468,6 @@ void CInputCapturePortal::deactivate(sdbus::ObjectPath sessionHandle) {
|
||||||
signal << options;
|
signal << options;
|
||||||
|
|
||||||
m_pObject->emitSignal(signal);
|
m_pObject->emitSignal(signal);
|
||||||
|
|
||||||
//TODO: release the pointer
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CInputCapturePortal::Session::deactivate() {
|
bool CInputCapturePortal::Session::deactivate() {
|
||||||
|
|
Loading…
Reference in a new issue