swindow: add cursor_set()

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-11-13 11:02:57 +01:00
parent 3cf79072cd
commit 5a4784b646
2 changed files with 15 additions and 0 deletions

View File

@ -288,4 +288,18 @@ simplewindow_orientation_set(simple_window_t *sw, orientation_t o)
}
}
/** Set simple window cursor.
* \param sw The simple window.
* \param c The cursor.
*/
void
simplewindow_cursor_set(simple_window_t *sw, xcb_cursor_t c)
{
if(sw->window)
{
const uint32_t change_win_vals[] = { c };
xcb_change_window_attributes(globalconf.connection, sw->window, XCB_CW_CURSOR, change_win_vals);
}
}
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80

View File

@ -63,6 +63,7 @@ void simplewindow_refresh_pixmap_partial(simple_window_t *, int16_t, int16_t, ui
void simplewindow_border_width_set(simple_window_t *, uint32_t);
void simplewindow_border_color_set(simple_window_t *, const xcolor_t *);
void simplewindow_orientation_set(simple_window_t *, orientation_t);
void simplewindow_cursor_set(simple_window_t *, xcb_cursor_t);
/** Refresh the window content by copying its pixmap data to its window.
* \param sw The simple window to refresh.