tray: Set _NET_SYSTEM_TRAY_ORIENTATION
This commit is contained in:
parent
63c6b13cbf
commit
627d43dad2
@ -91,6 +91,7 @@ class tray_manager : public xpp::event::sink<evt::expose, evt::client_message, e
|
|||||||
|
|
||||||
void query_atom();
|
void query_atom();
|
||||||
void set_tray_colors();
|
void set_tray_colors();
|
||||||
|
void set_tray_orientation();
|
||||||
|
|
||||||
bool acquire_selection(xcb_window_t& other_owner);
|
bool acquire_selection(xcb_window_t& other_owner);
|
||||||
void notify_clients();
|
void notify_clients();
|
||||||
|
@ -57,7 +57,7 @@ renderer::renderer(connection& conn, signal_emitter& sig, const config& conf, co
|
|||||||
throw application_error("Could not find a 24 or 32-bit TrueColor visual");
|
throw application_error("Could not find a 24 or 32-bit TrueColor visual");
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.info("renderer: Using %d-bit TrueColor visual", m_depth);
|
m_log.info("renderer: Using %d-bit TrueColor visual: 0x%x", m_depth, m_visual->visual_id);
|
||||||
|
|
||||||
m_log.trace("renderer: Allocate colormap");
|
m_log.trace("renderer: Allocate colormap");
|
||||||
m_colormap = m_connection.generate_id();
|
m_colormap = m_connection.generate_id();
|
||||||
|
@ -131,6 +131,7 @@ void tray_manager::activate() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
set_tray_colors();
|
set_tray_colors();
|
||||||
|
set_tray_orientation();
|
||||||
} catch (const exception& err) {
|
} catch (const exception& err) {
|
||||||
m_log.err(err.what());
|
m_log.err(err.what());
|
||||||
m_log.err("Cannot activate tray manager... failed to setup window");
|
m_log.err("Cannot activate tray manager... failed to setup window");
|
||||||
@ -350,6 +351,16 @@ void tray_manager::set_tray_colors() {
|
|||||||
XCB_PROP_MODE_REPLACE, m_opts.selection_owner, _NET_SYSTEM_TRAY_COLORS, XCB_ATOM_CARDINAL, 32, 12, colors);
|
XCB_PROP_MODE_REPLACE, m_opts.selection_owner, _NET_SYSTEM_TRAY_COLORS, XCB_ATOM_CARDINAL, 32, 12, colors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the _NET_SYSTEM_TRAY_ORIENTATION atom
|
||||||
|
*/
|
||||||
|
void tray_manager::set_tray_orientation() {
|
||||||
|
const uint32_t orientation = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
|
||||||
|
m_log.trace("tray: Set _NET_SYSTEM_TRAY_ORIENTATION to 0x%x", orientation);
|
||||||
|
m_connection.change_property_checked(XCB_PROP_MODE_REPLACE, m_opts.selection_owner, _NET_SYSTEM_TRAY_ORIENTATION,
|
||||||
|
XCB_ATOM_CARDINAL, 32, 1, &orientation);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Acquire the systray selection
|
* Acquire the systray selection
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user