Răsfoiți Sursa

Add system tray orientation property

Thomas Dy 7 ani în urmă
părinte
comite
3de96c53a0
2 a modificat fișierele cu 7 adăugiri și 0 ștergeri
  1. 1 0
      src/atom.rs
  2. 6 0
      src/tray.rs

+ 1 - 0
src/atom.rs

@@ -11,6 +11,7 @@ macro_rules! atoms {
 
 atoms!(
     _NET_SYSTEM_TRAY_S0,
+    _NET_SYSTEM_TRAY_ORIENTATION,
     _NET_WM_WINDOW_TYPE,
     _NET_WM_WINDOW_TYPE_DOCK,
     MANAGER

+ 6 - 0
src/tray.rs

@@ -90,6 +90,12 @@ impl<'a> Tray<'a> {
             8,
             format!("{0}\0{0}", ::PROGRAM).as_bytes()
         );
+        self.set_property(
+            self.atoms.get(atom::_NET_SYSTEM_TRAY_ORIENTATION),
+            xcb::ATOM_CARDINAL,
+            32,
+            &[0 as u32] // 0 is horizontal, 1 is vertical
+        );
         self.conn.flush();
     }