swindow: add cursor_set()
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
3cf79072cd
commit
5a4784b646
14
swindow.c
14
swindow.c
|
@ -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
|
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||||
|
|
|
@ -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_width_set(simple_window_t *, uint32_t);
|
||||||
void simplewindow_border_color_set(simple_window_t *, const xcolor_t *);
|
void simplewindow_border_color_set(simple_window_t *, const xcolor_t *);
|
||||||
void simplewindow_orientation_set(simple_window_t *, orientation_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.
|
/** Refresh the window content by copying its pixmap data to its window.
|
||||||
* \param sw The simple window to refresh.
|
* \param sw The simple window to refresh.
|
||||||
|
|
Loading…
Reference in New Issue