}
static void
-weston_wm_frame_set_cursor(struct weston_wm *wm,
- struct weston_wm_window *window, int cursor)
+weston_wm_window_set_cursor(struct weston_wm *wm, xcb_window_t window_id,
+ int cursor)
{
uint32_t cursor_value_list;
- if (!window->frame_id)
- return;
-
if (wm->last_cursor == cursor)
return;
wm->last_cursor = cursor;
cursor_value_list = wm->cursors[cursor];
- xcb_change_window_attributes (wm->conn, window->frame_id,
+ xcb_change_window_attributes (wm->conn, window_id,
XCB_CW_CURSOR, &cursor_value_list);
xcb_flush(wm->conn);
}
cursor = get_cursor_for_location(wm->theme, width, height,
motion->event_x, motion->event_y);
- weston_wm_frame_set_cursor(wm, window, cursor);
+ weston_wm_window_set_cursor(wm, window->frame_id, cursor);
}
static void
cursor = get_cursor_for_location(wm->theme, width, height,
enter->event_x, enter->event_y);
- weston_wm_frame_set_cursor(wm, window, cursor);
+ weston_wm_window_set_cursor(wm, window->frame_id, cursor);
}
static void
if (!window)
return;
- weston_wm_frame_set_cursor(wm, window, XWM_CURSOR_LEFT_PTR);
+ weston_wm_window_set_cursor(wm, window->frame_id, XWM_CURSOR_LEFT_PTR);
}
static int
&wm->activate_listener);
weston_wm_create_cursors(wm);
+ weston_wm_window_set_cursor(wm, wm->screen->root, XWM_CURSOR_LEFT_PTR);
weston_log("created wm\n");