Move current cursor value to bar class
It doesn't really belong to bar_settings
This commit is contained in:
parent
ae32b5ff29
commit
d018adcf91
@ -99,6 +99,11 @@ class bar : public xpp::event::sink<evt::button_press, evt::expose, evt::propert
|
|||||||
|
|
||||||
bar_settings m_opts{};
|
bar_settings m_opts{};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of currently active cursor
|
||||||
|
*/
|
||||||
|
string m_cursor{};
|
||||||
|
|
||||||
string m_lastinput{};
|
string m_lastinput{};
|
||||||
bool m_dblclicks{false};
|
bool m_dblclicks{false};
|
||||||
|
|
||||||
|
@ -211,11 +211,6 @@ struct bar_settings {
|
|||||||
|
|
||||||
int double_click_interval{400};
|
int double_click_interval{400};
|
||||||
|
|
||||||
/**
|
|
||||||
* Name of currently active cursor
|
|
||||||
*/
|
|
||||||
string cursor{};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of cursor to use for clickable areas
|
* Name of cursor to use for clickable areas
|
||||||
*/
|
*/
|
||||||
|
@ -918,11 +918,11 @@ bool bar::on(const signals::ui::dim_window& sig) {
|
|||||||
#if WITH_XCURSOR
|
#if WITH_XCURSOR
|
||||||
void bar::change_cursor(const string& name) {
|
void bar::change_cursor(const string& name) {
|
||||||
// This is already the same cursor, no need to update
|
// This is already the same cursor, no need to update
|
||||||
if (m_opts.cursor == name) {
|
if (m_cursor == name) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
m_cursor = name;
|
||||||
|
|
||||||
m_opts.cursor = name;
|
|
||||||
if (!cursor_util::set_cursor(m_connection, m_connection.screen(), m_opts.window, name)) {
|
if (!cursor_util::set_cursor(m_connection, m_connection.screen(), m_opts.window, name)) {
|
||||||
m_log.warn("Failed to create cursor context for cursor name '%s'", name);
|
m_log.warn("Failed to create cursor context for cursor name '%s'", name);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user