mirror of https://github.com/hyprwm/Hyprland
erge branch 'main' into hyprcursor
This commit is contained in:
commit
89b6036175
|
@ -153,18 +153,18 @@
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"host": "gitlab.freedesktop.org",
|
"host": "gitlab.freedesktop.org",
|
||||||
"lastModified": 1708558866,
|
"lastModified": 1709983277,
|
||||||
"narHash": "sha256-Mz6hCtommq7RQfcPnxLINigO4RYSNt23HeJHC6mVmWI=",
|
"narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=",
|
||||||
"owner": "wlroots",
|
"owner": "wlroots",
|
||||||
"repo": "wlroots",
|
"repo": "wlroots",
|
||||||
"rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5",
|
"rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"host": "gitlab.freedesktop.org",
|
"host": "gitlab.freedesktop.org",
|
||||||
"owner": "wlroots",
|
"owner": "wlroots",
|
||||||
"repo": "wlroots",
|
"repo": "wlroots",
|
||||||
"rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5",
|
"rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
host = "gitlab.freedesktop.org";
|
host = "gitlab.freedesktop.org";
|
||||||
owner = "wlroots";
|
owner = "wlroots";
|
||||||
repo = "wlroots";
|
repo = "wlroots";
|
||||||
rev = "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5";
|
rev = "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ void Events::listener_newInput(wl_listener* listener, void* data) {
|
||||||
Debug::log(LOG, "Attached a touch device with name {}", DEVICE->name);
|
Debug::log(LOG, "Attached a touch device with name {}", DEVICE->name);
|
||||||
g_pInputManager->newTouchDevice(DEVICE);
|
g_pInputManager->newTouchDevice(DEVICE);
|
||||||
break;
|
break;
|
||||||
case WLR_INPUT_DEVICE_TABLET_TOOL:
|
case WLR_INPUT_DEVICE_TABLET:
|
||||||
Debug::log(LOG, "Attached a tablet tool with name {}", DEVICE->name);
|
Debug::log(LOG, "Attached a tablet tool with name {}", DEVICE->name);
|
||||||
g_pInputManager->newTabletTool(DEVICE);
|
g_pInputManager->newTabletTool(DEVICE);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -51,6 +51,7 @@ void Events::listener_newLayerSurface(wl_listener* listener, void* data) {
|
||||||
layerSurface->layer = WLRLAYERSURFACE->current.layer;
|
layerSurface->layer = WLRLAYERSURFACE->current.layer;
|
||||||
WLRLAYERSURFACE->data = layerSurface;
|
WLRLAYERSURFACE->data = layerSurface;
|
||||||
layerSurface->monitorID = PMONITOR->ID;
|
layerSurface->monitorID = PMONITOR->ID;
|
||||||
|
layerSurface->popupHead = std::make_unique<CPopup>(layerSurface);
|
||||||
|
|
||||||
layerSurface->forceBlur = g_pConfigManager->shouldBlurLS(layerSurface->szNamespace);
|
layerSurface->forceBlur = g_pConfigManager->shouldBlurLS(layerSurface->szNamespace);
|
||||||
|
|
||||||
|
@ -65,6 +66,8 @@ void Events::listener_destroyLayerSurface(void* owner, void* data) {
|
||||||
|
|
||||||
const auto PMONITOR = g_pCompositor->getMonitorFromID(layersurface->monitorID);
|
const auto PMONITOR = g_pCompositor->getMonitorFromID(layersurface->monitorID);
|
||||||
|
|
||||||
|
layersurface->popupHead.reset();
|
||||||
|
|
||||||
if (!g_pCompositor->getMonitorFromID(layersurface->monitorID))
|
if (!g_pCompositor->getMonitorFromID(layersurface->monitorID))
|
||||||
Debug::log(WARN, "Layersurface destroyed on an invalid monitor (removed?)");
|
Debug::log(WARN, "Layersurface destroyed on an invalid monitor (removed?)");
|
||||||
|
|
||||||
|
@ -111,8 +114,6 @@ void Events::listener_mapLayerSurface(void* owner, void* data) {
|
||||||
layersurface->keyboardExclusive = layersurface->layerSurface->current.keyboard_interactive;
|
layersurface->keyboardExclusive = layersurface->layerSurface->current.keyboard_interactive;
|
||||||
layersurface->surface = layersurface->layerSurface->surface;
|
layersurface->surface = layersurface->layerSurface->surface;
|
||||||
|
|
||||||
layersurface->popupHead = std::make_unique<CPopup>(layersurface);
|
|
||||||
|
|
||||||
// fix if it changed its mon
|
// fix if it changed its mon
|
||||||
const auto PMONITOR = g_pCompositor->getMonitorFromOutput(layersurface->layerSurface->output);
|
const auto PMONITOR = g_pCompositor->getMonitorFromOutput(layersurface->layerSurface->output);
|
||||||
|
|
||||||
|
@ -184,8 +185,6 @@ void Events::listener_unmapLayerSurface(void* owner, void* data) {
|
||||||
|
|
||||||
std::erase(g_pInputManager->m_dExclusiveLSes, layersurface);
|
std::erase(g_pInputManager->m_dExclusiveLSes, layersurface);
|
||||||
|
|
||||||
layersurface->popupHead.reset();
|
|
||||||
|
|
||||||
if (!g_pInputManager->m_dExclusiveLSes.empty())
|
if (!g_pInputManager->m_dExclusiveLSes.empty())
|
||||||
g_pCompositor->focusSurface(g_pInputManager->m_dExclusiveLSes[0]->layerSurface->surface);
|
g_pCompositor->focusSurface(g_pInputManager->m_dExclusiveLSes[0]->layerSurface->surface);
|
||||||
|
|
||||||
|
|
|
@ -319,6 +319,7 @@ bool CKeybindManager::onKeyEvent(wlr_keyboard_key_event* e, SKeyboard* pKeyboard
|
||||||
.keycode = KEYCODE,
|
.keycode = KEYCODE,
|
||||||
.modmaskAtPressTime = MODS,
|
.modmaskAtPressTime = MODS,
|
||||||
.sent = true,
|
.sent = true,
|
||||||
|
.submapAtPress = m_szCurrentSelectedSubmap,
|
||||||
};
|
};
|
||||||
|
|
||||||
bool suppressEvent = false;
|
bool suppressEvent = false;
|
||||||
|
@ -349,7 +350,8 @@ bool CKeybindManager::onKeyEvent(wlr_keyboard_key_event* e, SKeyboard* pKeyboard
|
||||||
bool foundInPressedKeys = false;
|
bool foundInPressedKeys = false;
|
||||||
for (auto it = m_dPressedKeys.begin(); it != m_dPressedKeys.end();) {
|
for (auto it = m_dPressedKeys.begin(); it != m_dPressedKeys.end();) {
|
||||||
if (it->keycode == KEYCODE) {
|
if (it->keycode == KEYCODE) {
|
||||||
suppressEvent = handleKeybinds(MODS, *it, false);
|
if (it->submapAtPress == m_szCurrentSelectedSubmap)
|
||||||
|
handleKeybinds(MODS, *it, false);
|
||||||
foundInPressedKeys = true;
|
foundInPressedKeys = true;
|
||||||
suppressEvent = !it->sent;
|
suppressEvent = !it->sent;
|
||||||
it = m_dPressedKeys.erase(it);
|
it = m_dPressedKeys.erase(it);
|
||||||
|
@ -382,12 +384,12 @@ bool CKeybindManager::onAxisEvent(wlr_pointer_axis_event* e) {
|
||||||
m_tScrollTimer.reset();
|
m_tScrollTimer.reset();
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
if (e->source == WLR_AXIS_SOURCE_WHEEL && e->orientation == WLR_AXIS_ORIENTATION_VERTICAL) {
|
if (e->source == WL_POINTER_AXIS_SOURCE_WHEEL && e->orientation == WL_POINTER_AXIS_VERTICAL_SCROLL) {
|
||||||
if (e->delta < 0)
|
if (e->delta < 0)
|
||||||
found = handleKeybinds(MODS, SPressedKeyWithMods{.keyName = "mouse_down"}, true);
|
found = handleKeybinds(MODS, SPressedKeyWithMods{.keyName = "mouse_down"}, true);
|
||||||
else
|
else
|
||||||
found = handleKeybinds(MODS, SPressedKeyWithMods{.keyName = "mouse_up"}, true);
|
found = handleKeybinds(MODS, SPressedKeyWithMods{.keyName = "mouse_up"}, true);
|
||||||
} else if (e->source == WLR_AXIS_SOURCE_WHEEL && e->orientation == WLR_AXIS_ORIENTATION_HORIZONTAL) {
|
} else if (e->source == WL_POINTER_AXIS_SOURCE_WHEEL && e->orientation == WL_POINTER_AXIS_HORIZONTAL_SCROLL) {
|
||||||
if (e->delta < 0)
|
if (e->delta < 0)
|
||||||
found = handleKeybinds(MODS, SPressedKeyWithMods{.keyName = "mouse_left"}, true);
|
found = handleKeybinds(MODS, SPressedKeyWithMods{.keyName = "mouse_left"}, true);
|
||||||
else
|
else
|
||||||
|
@ -418,7 +420,7 @@ bool CKeybindManager::onMouseEvent(wlr_pointer_button_event* e) {
|
||||||
.modmaskAtPressTime = MODS,
|
.modmaskAtPressTime = MODS,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (e->state == WLR_BUTTON_PRESSED) {
|
if (e->state == WL_POINTER_BUTTON_STATE_PRESSED) {
|
||||||
m_dPressedKeys.push_back(KEY);
|
m_dPressedKeys.push_back(KEY);
|
||||||
|
|
||||||
suppressEvent = handleKeybinds(MODS, KEY, true);
|
suppressEvent = handleKeybinds(MODS, KEY, true);
|
||||||
|
@ -452,7 +454,7 @@ bool CKeybindManager::onMouseEvent(wlr_pointer_button_event* e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CKeybindManager::resizeWithBorder(wlr_pointer_button_event* e) {
|
void CKeybindManager::resizeWithBorder(wlr_pointer_button_event* e) {
|
||||||
if (e->state == WLR_BUTTON_PRESSED) {
|
if (e->state == WL_POINTER_BUTTON_STATE_PRESSED) {
|
||||||
mouse("1resizewindow");
|
mouse("1resizewindow");
|
||||||
} else {
|
} else {
|
||||||
mouse("0resizewindow");
|
mouse("0resizewindow");
|
||||||
|
@ -1855,20 +1857,20 @@ void CKeybindManager::pass(std::string regexp) {
|
||||||
if (g_pKeybindManager->m_uLastCode != 0)
|
if (g_pKeybindManager->m_uLastCode != 0)
|
||||||
wlr_seat_keyboard_notify_key(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastCode - 8, WLR_BUTTON_PRESSED);
|
wlr_seat_keyboard_notify_key(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastCode - 8, WLR_BUTTON_PRESSED);
|
||||||
else
|
else
|
||||||
wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastMouseCode, WLR_BUTTON_PRESSED);
|
wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastMouseCode, WL_POINTER_BUTTON_STATE_PRESSED);
|
||||||
} else if (g_pKeybindManager->m_iPassPressed == 0)
|
} else if (g_pKeybindManager->m_iPassPressed == 0)
|
||||||
if (g_pKeybindManager->m_uLastCode != 0)
|
if (g_pKeybindManager->m_uLastCode != 0)
|
||||||
wlr_seat_keyboard_notify_key(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastCode - 8, WLR_BUTTON_RELEASED);
|
wlr_seat_keyboard_notify_key(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastCode - 8, WLR_BUTTON_RELEASED);
|
||||||
else
|
else
|
||||||
wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastMouseCode, WLR_BUTTON_RELEASED);
|
wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastMouseCode, WL_POINTER_BUTTON_STATE_RELEASED);
|
||||||
else {
|
else {
|
||||||
// dynamic call of the dispatcher
|
// dynamic call of the dispatcher
|
||||||
if (g_pKeybindManager->m_uLastCode != 0) {
|
if (g_pKeybindManager->m_uLastCode != 0) {
|
||||||
wlr_seat_keyboard_notify_key(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastCode - 8, WLR_BUTTON_PRESSED);
|
wlr_seat_keyboard_notify_key(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastCode - 8, WLR_BUTTON_PRESSED);
|
||||||
wlr_seat_keyboard_notify_key(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastCode - 8, WLR_BUTTON_RELEASED);
|
wlr_seat_keyboard_notify_key(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastCode - 8, WLR_BUTTON_RELEASED);
|
||||||
} else {
|
} else {
|
||||||
wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastMouseCode, WLR_BUTTON_PRESSED);
|
wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastMouseCode, WL_POINTER_BUTTON_STATE_PRESSED);
|
||||||
wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastMouseCode, WLR_BUTTON_RELEASED);
|
wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, g_pKeybindManager->m_uTimeLastMs, g_pKeybindManager->m_uLastMouseCode, WL_POINTER_BUTTON_STATE_RELEASED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ struct SPressedKeyWithMods {
|
||||||
uint32_t keycode = 0;
|
uint32_t keycode = 0;
|
||||||
uint32_t modmaskAtPressTime = 0;
|
uint32_t modmaskAtPressTime = 0;
|
||||||
bool sent = false;
|
bool sent = false;
|
||||||
|
std::string submapAtPress = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SParsedKey {
|
struct SParsedKey {
|
||||||
|
|
|
@ -439,7 +439,7 @@ void CInputManager::onMouseButton(wlr_pointer_button_event* e) {
|
||||||
|
|
||||||
m_tmrLastCursorMovement.reset();
|
m_tmrLastCursorMovement.reset();
|
||||||
|
|
||||||
if (e->state == WLR_BUTTON_PRESSED) {
|
if (e->state == WL_POINTER_BUTTON_STATE_PRESSED) {
|
||||||
m_lCurrentlyHeldButtons.push_back(e->button);
|
m_lCurrentlyHeldButtons.push_back(e->button);
|
||||||
} else {
|
} else {
|
||||||
if (std::find_if(m_lCurrentlyHeldButtons.begin(), m_lCurrentlyHeldButtons.end(), [&](const auto& other) { return other == e->button; }) == m_lCurrentlyHeldButtons.end())
|
if (std::find_if(m_lCurrentlyHeldButtons.begin(), m_lCurrentlyHeldButtons.end(), [&](const auto& other) { return other == e->button; }) == m_lCurrentlyHeldButtons.end())
|
||||||
|
@ -453,7 +453,7 @@ void CInputManager::onMouseButton(wlr_pointer_button_event* e) {
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_bFocusHeldByButtons && m_lCurrentlyHeldButtons.empty() && e->state == WLR_BUTTON_RELEASED) {
|
if (m_bFocusHeldByButtons && m_lCurrentlyHeldButtons.empty() && e->state == WL_POINTER_BUTTON_STATE_RELEASED) {
|
||||||
if (m_bRefocusHeldByButtons)
|
if (m_bRefocusHeldByButtons)
|
||||||
refocus();
|
refocus();
|
||||||
else
|
else
|
||||||
|
@ -597,7 +597,7 @@ void CInputManager::processMouseDownNormal(wlr_pointer_button_event* e) {
|
||||||
|
|
||||||
// clicking on border triggers resize
|
// clicking on border triggers resize
|
||||||
// TODO detect click on LS properly
|
// TODO detect click on LS properly
|
||||||
if (*PRESIZEONBORDER && !m_bLastFocusOnLS && e->state == WLR_BUTTON_PRESSED) {
|
if (*PRESIZEONBORDER && !m_bLastFocusOnLS && e->state == WL_POINTER_BUTTON_STATE_PRESSED) {
|
||||||
if (w && !w->m_bIsFullscreen) {
|
if (w && !w->m_bIsFullscreen) {
|
||||||
const CBox real = {w->m_vRealPosition.value().x, w->m_vRealPosition.value().y, w->m_vRealSize.value().x, w->m_vRealSize.value().y};
|
const CBox real = {w->m_vRealPosition.value().x, w->m_vRealPosition.value().y, w->m_vRealSize.value().x, w->m_vRealSize.value().y};
|
||||||
const CBox grab = {real.x - BORDER_GRAB_AREA, real.y - BORDER_GRAB_AREA, real.width + 2 * BORDER_GRAB_AREA, real.height + 2 * BORDER_GRAB_AREA};
|
const CBox grab = {real.x - BORDER_GRAB_AREA, real.y - BORDER_GRAB_AREA, real.width + 2 * BORDER_GRAB_AREA, real.height + 2 * BORDER_GRAB_AREA};
|
||||||
|
@ -669,7 +669,7 @@ void CInputManager::onMouseWheel(wlr_pointer_axis_event* e) {
|
||||||
static auto PINPUTSCROLLFACTOR = CConfigValue<Hyprlang::FLOAT>("input:scroll_factor");
|
static auto PINPUTSCROLLFACTOR = CConfigValue<Hyprlang::FLOAT>("input:scroll_factor");
|
||||||
static auto PTOUCHPADSCROLLFACTOR = CConfigValue<Hyprlang::FLOAT>("input:touchpad:scroll_factor");
|
static auto PTOUCHPADSCROLLFACTOR = CConfigValue<Hyprlang::FLOAT>("input:touchpad:scroll_factor");
|
||||||
|
|
||||||
auto factor = (*PTOUCHPADSCROLLFACTOR <= 0.f || e->source == WLR_AXIS_SOURCE_FINGER ? *PTOUCHPADSCROLLFACTOR : *PINPUTSCROLLFACTOR);
|
auto factor = (*PTOUCHPADSCROLLFACTOR <= 0.f || e->source == WL_POINTER_AXIS_SOURCE_FINGER ? *PTOUCHPADSCROLLFACTOR : *PINPUTSCROLLFACTOR);
|
||||||
|
|
||||||
const auto EMAP = std::unordered_map<std::string, std::any>{{"event", e}};
|
const auto EMAP = std::unordered_map<std::string, std::any>{{"event", e}};
|
||||||
EMIT_HOOK_EVENT_CANCELLABLE("mouseAxis", EMAP);
|
EMIT_HOOK_EVENT_CANCELLABLE("mouseAxis", EMAP);
|
||||||
|
@ -690,7 +690,7 @@ void CInputManager::onMouseWheel(wlr_pointer_axis_event* e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
wlr_seat_pointer_notify_axis(g_pCompositor->m_sSeat.seat, e->time_msec, e->orientation, factor * e->delta, std::round(factor * e->delta_discrete), e->source,
|
wlr_seat_pointer_notify_axis(g_pCompositor->m_sSeat.seat, e->time_msec, e->orientation, factor * e->delta, std::round(factor * e->delta_discrete), e->source,
|
||||||
WLR_AXIS_RELATIVE_DIRECTION_IDENTICAL);
|
WL_POINTER_AXIS_RELATIVE_DIRECTION_IDENTICAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector2D CInputManager::getMouseCoordsInternal() {
|
Vector2D CInputManager::getMouseCoordsInternal() {
|
||||||
|
@ -1545,7 +1545,7 @@ void CInputManager::releaseAllMouseButtons() {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (auto& mb : buttonsCopy) {
|
for (auto& mb : buttonsCopy) {
|
||||||
wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, 0, mb, WLR_BUTTON_RELEASED);
|
wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, 0, mb, WL_POINTER_BUTTON_STATE_RELEASED);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_lCurrentlyHeldButtons.clear();
|
m_lCurrentlyHeldButtons.clear();
|
||||||
|
|
|
@ -19,7 +19,7 @@ void CInputManager::onTouchDown(wlr_touch_down_event* e) {
|
||||||
|
|
||||||
if (m_ecbClickBehavior == CLICKMODE_KILL) {
|
if (m_ecbClickBehavior == CLICKMODE_KILL) {
|
||||||
wlr_pointer_button_event e;
|
wlr_pointer_button_event e;
|
||||||
e.state = WLR_BUTTON_PRESSED;
|
e.state = WL_POINTER_BUTTON_STATE_PRESSED;
|
||||||
g_pInputManager->processMouseDownKill(&e);
|
g_pInputManager->processMouseDownKill(&e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -430,15 +430,15 @@ bool CHyprGroupBarDecoration::onMouseButtonOnDeco(const Vector2D& pos, wlr_point
|
||||||
if (e->button == 274) {
|
if (e->button == 274) {
|
||||||
static Vector2D pressedCursorPos;
|
static Vector2D pressedCursorPos;
|
||||||
|
|
||||||
if (e->state == WLR_BUTTON_PRESSED)
|
if (e->state == WL_POINTER_BUTTON_STATE_PRESSED)
|
||||||
pressedCursorPos = pos;
|
pressedCursorPos = pos;
|
||||||
else if (e->state == WLR_BUTTON_RELEASED && pressedCursorPos == pos)
|
else if (e->state == WL_POINTER_BUTTON_STATE_RELEASED && pressedCursorPos == pos)
|
||||||
g_pXWaylandManager->sendCloseWindow(m_pWindow->getGroupWindowByIndex(WINDOWINDEX));
|
g_pXWaylandManager->sendCloseWindow(m_pWindow->getGroupWindowByIndex(WINDOWINDEX));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e->state != WLR_BUTTON_PRESSED)
|
if (e->state != WL_POINTER_BUTTON_STATE_PRESSED)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// click on padding
|
// click on padding
|
||||||
|
|
Loading…
Reference in New Issue