mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-30 03:13:48 -07:00
unfocus on destroy
This commit is contained in:
@@ -16,6 +16,8 @@ void CInputManager::newTabletTool(wlr_input_device* pDevice) {
|
||||
PNEWTABLET->hyprListener_Destroy.initCallback(&pDevice->events.destroy, [](void* owner, void* data) {
|
||||
const auto PTAB = (STablet*)owner;
|
||||
|
||||
g_pInputManager->unfocusAllTablets();
|
||||
|
||||
g_pInputManager->m_lTablets.remove(*PTAB);
|
||||
|
||||
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) {
|
||||
const auto PTOOL = (STabletTool*)owner;
|
||||
|
||||
g_pInputManager->unfocusAllTablets();
|
||||
|
||||
PTOOL->wlrTabletTool->data = nullptr;
|
||||
g_pInputManager->m_lTabletTools.remove(*PTOOL);
|
||||
}, PTOOL, "Tablet Tool V1");
|
||||
@@ -192,6 +196,8 @@ void CInputManager::newTabletPad(wlr_input_device* pDevice) {
|
||||
|
||||
const auto PPAD = (STabletPad*)owner;
|
||||
|
||||
g_pInputManager->unfocusAllTablets();
|
||||
|
||||
g_pInputManager->m_lTabletPads.remove(*PPAD);
|
||||
|
||||
Debug::log(LOG, "Removed a tablet pad");
|
||||
|
Reference in New Issue
Block a user