don't set cursor when timeout reached

This commit is contained in:
Vaxry 2023-01-26 10:39:06 +00:00
parent fc89e70a1f
commit 06b17db227
2 changed files with 11 additions and 9 deletions

View file

@ -225,11 +225,13 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
if (!foundSurface) {
if (!m_bEmptyFocusCursorSet) {
if (g_pHyprRenderer->m_bHasARenderedCursor) {
// TODO: maybe wrap?
if (m_ecbClickBehavior == CLICKMODE_KILL)
wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "crosshair", g_pCompositor->m_sWLRCursor);
else
wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor);
}
m_bEmptyFocusCursorSet = true;
}

View file

@ -10,22 +10,21 @@
struct SMonitorRule;
// TODO: add fuller damage tracking for updating only parts of a window
enum DAMAGETRACKINGMODES
{
enum DAMAGETRACKINGMODES {
DAMAGE_TRACKING_INVALID = -1,
DAMAGE_TRACKING_NONE = 0,
DAMAGE_TRACKING_MONITOR,
DAMAGE_TRACKING_FULL
};
enum eRenderPassMode
{
enum eRenderPassMode {
RENDER_PASS_ALL = 0,
RENDER_PASS_MAIN,
RENDER_PASS_POPUP
};
class CToplevelExportProtocolManager;
class CInputManager;
class CHyprRenderer {
public:
@ -69,6 +68,7 @@ class CHyprRenderer {
friend class CHyprOpenGLImpl;
friend class CToplevelExportProtocolManager;
friend class CInputManager;
};
inline std::unique_ptr<CHyprRenderer> g_pHyprRenderer;