]>
Dogcows Code - chaz/openbox/blob - cwmcc/root_props.c
7339cbbac2a102de2868409088201decfb4b2960
1 #include "cwmcc_internal.h"
4 #include "client_props.h"
5 #include "render/render.h"
12 void cwmcc_root_get_supported(Window win
, Atom
**atoms
)
16 if (!prop_get_array32(win
, CWMCC_ATOM(root
, net_supported
),
17 CWMCC_ATOM(type
, atom
), atoms
, &num
)) {
18 g_warning("Failed to read NET_SUPPORTED from 0x%lx", win
);
23 void cwmcc_root_get_client_list(Window win
, Window
**windows
)
27 if (!prop_get_array32(win
, CWMCC_ATOM(root
, net_client_list
),
28 CWMCC_ATOM(type
, window
), windows
, &num
)) {
29 g_warning("Failed to read NET_CLIENT_LIST from 0x%lx", win
);
34 void cwmcc_root_get_client_list_stacking(Window win
, Window
**windows
)
38 if (!prop_get_array32(win
, CWMCC_ATOM(root
, net_client_list_stacking
),
39 CWMCC_ATOM(type
, window
), windows
, &num
)) {
40 g_warning("Failed to read NET_CLIENT_LIST_STACKING from 0x%lx", win
);
45 void cwmcc_root_get_number_of_desktops(Window win
, gulong
*desktops
)
47 if (!prop_get32(win
, CWMCC_ATOM(root
, net_number_of_desktops
),
48 CWMCC_ATOM(type
, cardinal
), desktops
)) {
49 g_warning("Failed to read NET_NUMBER_OF_DESKTOPS from 0x%lx", win
);
54 void cwmcc_root_get_desktop_geometry(Window win
, gulong
*w
, gulong
*h
)
56 gulong
*data
= NULL
, num
;
58 if (!prop_get_array32(win
, CWMCC_ATOM(root
, net_desktop_geometry
),
59 CWMCC_ATOM(type
, cardinal
), &data
, &num
)) {
60 g_warning("Failed to read NET_DESKTOP_GEOMETRY from 0x%lx", win
);
62 } else if (num
!= 2) {
63 g_warning("Read invalid NET_DESKTOP_GEOMETRY from 0x%lx", win
);
72 void cwmcc_root_get_desktop_viewport(Window win
, gulong
*x
, gulong
*y
)
74 gulong
*data
= NULL
, num
;
76 if (!prop_get_array32(win
, CWMCC_ATOM(root
, net_desktop_viewport
),
77 CWMCC_ATOM(type
, cardinal
), &data
, &num
)) {
78 g_warning("Failed to read NET_DESKTOP_VIEWPORT from 0x%lx", win
);
80 } else if (num
!= 2) {
81 g_warning("Read invalid NET_DESKTOP_VIEWPORT from 0x%lx", win
);
90 void cwmcc_root_get_current_desktop(Window win
, gulong
*desktop
)
92 if (!prop_get32(win
, CWMCC_ATOM(root
, net_current_desktop
),
93 CWMCC_ATOM(type
, cardinal
), desktop
)) {
94 g_warning("Failed to read NET_CURRENT_DESKTOP from 0x%lx", win
);
99 void cwmcc_root_get_desktop_names(Window win
, char ***names
)
101 if (!prop_get_strings_utf8(win
,
102 CWMCC_ATOM(root
, net_desktop_names
), names
)) {
103 g_warning("Failed to read NET_DESKTOP_NAMES from 0x%lx", win
);
108 void cwmcc_root_get_active_window(Window win
, Window
*window
)
110 if (!prop_get32(win
, CWMCC_ATOM(root
, net_active_window
),
111 CWMCC_ATOM(type
, window
), window
)) {
112 g_warning("Failed to read NET_ACTIVE_WINDOW from 0x%lx", win
);
This page took 0.041205 seconds and 4 git commands to generate.