/** Process an enter notify event. */ void HandleEnterNotify(const XCrossingEvent *event) { ClientNode *np; Cursor cur; np = FindClient(event->window); if(np) { if( !(np->state.status & STAT_ACTIVE) && (settings.focusModel == FOCUS_SLOPPY)) { FocusClient(np); } if(np->parent == event->window) { np->borderAction = GetBorderActionType(np, event->x, event->y); cur = GetFrameCursor(np->borderAction); JXDefineCursor(display, np->parent, cur); } else if(np->borderAction != BA_NONE) { SetDefaultCursor(np->parent); np->borderAction = BA_NONE; } } }
/** Handle a motion notify event. */ void HandleMotionNotify(const XMotionEvent *event) { ClientNode *np; Cursor cur; if(event->is_hint) { return; } np = FindClientByParent(event->window); if(np) { BorderActionType action; action = GetBorderActionType(np, event->x, event->y); if(np->borderAction != action) { np->borderAction = action; cur = GetFrameCursor(action); JXDefineCursor(display, np->parent, cur); } } }
/** Handle a motion notify event. */ void HandleMotionNotify(const XMotionEvent *event) { ClientNode *np; Cursor cur; BorderActionType action; if(event->is_hint) { return; } SetMousePosition(event->x_root, event->y_root); np = FindClientByParent(event->window); if(np && (np->state.border & BORDER_OUTLINE)) { action = GetBorderActionType(np, event->x, event->y); if(np->borderAction != action) { np->borderAction = action; cur = GetFrameCursor(action); JXDefineCursor(display, np->parent, cur); } } }
/** Set the default cursor for a window. */ void SetDefaultCursor(Window w) { JXDefineCursor(display, w, defaultCursor); }
/** Set the default cursor for a window. */ void SetDefaultCursor(Window w) { JXDefineCursor(display, w, cursors[CURSOR_DEFAULT]); }