Add window_properties processing

This commit is contained in:
BigRedEye
2018-11-16 02:25:28 +03:00
parent b9d5a59ab8
commit b112daf4cb
3 changed files with 40 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include <cstdint>
#include <list>
#include <string>
#include <memory>
#include <vector>
@@ -165,6 +166,17 @@ enum class Position : char {
};
/**
* X11 window properties
*/
struct window_properties_t {
std::string xclass; /// X11 Window class (WM_CLASS class)
std::string instance; ///X11 Window class instance (WM_CLASS instance)
std::string window_role; /// X11 Window role (WM_WINDOW_ROLE)
std::string title; /// X11 UTF8 window title (_NET_WM_NAME)
uint64_t transient_for; /// Logical top-level window. Nonzero value is an X11 window ID of the parent window (WM_TRANSIENT_FOR)
};
/**
* A node of tree of windows
*/
@@ -186,6 +198,8 @@ struct container_t {
bool urgent;
bool focused;
window_properties_t window_properties; /// X11 window properties
std::list< std::shared_ptr<container_t> > nodes;
};