mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-12 02:25:54 -07:00
fix crash when yanking mouse before init
This commit is contained in:
@@ -74,6 +74,8 @@ public:
|
|||||||
|
|
||||||
SSeat m_sSeat;
|
SSeat m_sSeat;
|
||||||
|
|
||||||
|
bool m_bReadyToProcess = false;
|
||||||
|
|
||||||
// ------------------------------------------------- //
|
// ------------------------------------------------- //
|
||||||
|
|
||||||
SMonitor* getMonitorFromID(const int&);
|
SMonitor* getMonitorFromID(const int&);
|
||||||
|
@@ -122,6 +122,9 @@ void Events::listener_newOutput(wl_listener* listener, void* data) {
|
|||||||
|
|
||||||
if (!g_pCompositor->m_pLastMonitor) // set the last monitor if it isnt set yet
|
if (!g_pCompositor->m_pLastMonitor) // set the last monitor if it isnt set yet
|
||||||
g_pCompositor->m_pLastMonitor = PNEWMONITOR;
|
g_pCompositor->m_pLastMonitor = PNEWMONITOR;
|
||||||
|
|
||||||
|
// ready to process cuz we have a monitor
|
||||||
|
g_pCompositor->m_bReadyToProcess = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_monitorFrame(void* owner, void* data) {
|
void Events::listener_monitorFrame(void* owner, void* data) {
|
||||||
|
@@ -23,6 +23,9 @@ void CInputManager::onMouseWarp(wlr_pointer_motion_absolute_event* e) {
|
|||||||
|
|
||||||
void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
||||||
|
|
||||||
|
if (!g_pCompositor->m_bReadyToProcess)
|
||||||
|
return;
|
||||||
|
|
||||||
// update stuff
|
// update stuff
|
||||||
updateDragIcon();
|
updateDragIcon();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user