mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 14:05:58 +01:00
unfocus on destroy
This commit is contained in:
parent
09b130374d
commit
506977c13d
1 changed files with 6 additions and 0 deletions
|
@ -16,6 +16,8 @@ void CInputManager::newTabletTool(wlr_input_device* pDevice) {
|
||||||
PNEWTABLET->hyprListener_Destroy.initCallback(&pDevice->events.destroy, [](void* owner, void* data) {
|
PNEWTABLET->hyprListener_Destroy.initCallback(&pDevice->events.destroy, [](void* owner, void* data) {
|
||||||
const auto PTAB = (STablet*)owner;
|
const auto PTAB = (STablet*)owner;
|
||||||
|
|
||||||
|
g_pInputManager->unfocusAllTablets();
|
||||||
|
|
||||||
g_pInputManager->m_lTablets.remove(*PTAB);
|
g_pInputManager->m_lTablets.remove(*PTAB);
|
||||||
|
|
||||||
Debug::log(LOG, "Removed a tablet");
|
Debug::log(LOG, "Removed a tablet");
|
||||||
|
@ -133,6 +135,8 @@ STabletTool* CInputManager::ensureTabletToolPresent(wlr_tablet_tool* pTool) {
|
||||||
PTOOL->hyprListener_TabletToolDestroy.initCallback(&pTool->events.destroy, [](void* owner, void* data) {
|
PTOOL->hyprListener_TabletToolDestroy.initCallback(&pTool->events.destroy, [](void* owner, void* data) {
|
||||||
const auto PTOOL = (STabletTool*)owner;
|
const auto PTOOL = (STabletTool*)owner;
|
||||||
|
|
||||||
|
g_pInputManager->unfocusAllTablets();
|
||||||
|
|
||||||
PTOOL->wlrTabletTool->data = nullptr;
|
PTOOL->wlrTabletTool->data = nullptr;
|
||||||
g_pInputManager->m_lTabletTools.remove(*PTOOL);
|
g_pInputManager->m_lTabletTools.remove(*PTOOL);
|
||||||
}, PTOOL, "Tablet Tool V1");
|
}, PTOOL, "Tablet Tool V1");
|
||||||
|
@ -192,6 +196,8 @@ void CInputManager::newTabletPad(wlr_input_device* pDevice) {
|
||||||
|
|
||||||
const auto PPAD = (STabletPad*)owner;
|
const auto PPAD = (STabletPad*)owner;
|
||||||
|
|
||||||
|
g_pInputManager->unfocusAllTablets();
|
||||||
|
|
||||||
g_pInputManager->m_lTabletPads.remove(*PPAD);
|
g_pInputManager->m_lTabletPads.remove(*PPAD);
|
||||||
|
|
||||||
Debug::log(LOG, "Removed a tablet pad");
|
Debug::log(LOG, "Removed a tablet pad");
|
||||||
|
|
Loading…
Reference in a new issue