mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-02 03:45:58 +01:00
fix crash when click on no window
This commit is contained in:
parent
4c2c0031e2
commit
f41b69f69d
1 changed files with 5 additions and 2 deletions
|
@ -394,8 +394,11 @@ void CInputManager::processMouseDownNormal(wlr_pointer_button_event* e) {
|
||||||
if (!PASS && !*PPASSMOUSE)
|
if (!PASS && !*PPASSMOUSE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (*PBORDERRESIZE && g_pCompositor->m_pLastWindow) {
|
// TODO also check surfaces, maybe move into the switch statement below (focuses window first),
|
||||||
const auto w = g_pCompositor->vectorToWindowIdeal(getMouseCoordsInternal());
|
// so that I don't have to find surfaces myself, plus no need for vectorToWindowIdeal to find the window
|
||||||
|
const auto w = g_pCompositor->vectorToWindowIdeal(getMouseCoordsInternal());
|
||||||
|
// TODO exclude if fullscreen
|
||||||
|
if (*PBORDERRESIZE && w) {
|
||||||
const wlr_box box = w->getFullWindowBoundingBox();
|
const wlr_box box = w->getFullWindowBoundingBox();
|
||||||
const wlr_box real = {w->m_vRealPosition.vec().x, w->m_vRealPosition.vec().y, w->m_vRealSize.vec().x, w->m_vRealSize.vec().y};
|
const wlr_box real = {w->m_vRealPosition.vec().x, w->m_vRealPosition.vec().y, w->m_vRealSize.vec().x, w->m_vRealSize.vec().y};
|
||||||
// check if clicked on gaps/border (borders are hard to click on, doesn't matter how thick it is)
|
// check if clicked on gaps/border (borders are hard to click on, doesn't matter how thick it is)
|
||||||
|
|
Loading…
Reference in a new issue