annotate dep/animia/src/win/x11.cc @ 166:54c5d80a737e

dep/animia: add libutil method I changed the "linux" method to be "proc", because it isn't exactly Linux specific this commit also has some changes to the x11 stuff: instead of enumerating over only top-level windows, we iterate over ALL of them this is because many X11 apps actually use multiple windows for some reason, I still can't get it to work with VLC, but it picks up Firefox...
author paper@DavesDouble.local
date Sun, 19 Nov 2023 04:21:56 -0500
parents 80d6b28eb29f
children 31735c8592bc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
157
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
1 #include "animia/win/x11.h"
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
2 #include "animia/win.h"
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
3 #include "animia.h"
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
4
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
5 #include <X11/Xlib.h>
157
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
6 #include <X11/Xutil.h>
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
7 #include <X11/Xatom.h> // XA_*
158
80d6b28eb29f dep/animia: fix most X11 stuff
Paper <mrpapersonic@gmail.com>
parents: 157
diff changeset
8
157
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
9 #include <cstdint>
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
10 #include <string>
158
80d6b28eb29f dep/animia: fix most X11 stuff
Paper <mrpapersonic@gmail.com>
parents: 157
diff changeset
11 #include <set>
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
12
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
13 /* The code for this is very fugly because X11 uses lots of generic type names
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
14 (i.e., Window, Display), so I have to use :: when defining vars to distinguish
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
15 between Animia's types and X11's types */
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
16
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
17 namespace animia::internal::x11 {
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
18
157
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
19 /* should return UTF8_STRING or STRING */
158
80d6b28eb29f dep/animia: fix most X11 stuff
Paper <mrpapersonic@gmail.com>
parents: 157
diff changeset
20 static bool GetWindowPropertyAsString(::Display* display, ::Window window, ::Atom atom, std::string& result, ::Atom reqtype = AnyPropertyType) {
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
21 int format;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
22 unsigned long leftover_bytes, num_of_items;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
23 ::Atom type;
157
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
24 unsigned char* data;
166
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
25
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
26 int status = ::XGetWindowProperty(display, window, atom, 0L, (~0L), False, reqtype,
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
27 &type, &format, &num_of_items, &leftover_bytes, &data);
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
28 if (status != Success || !(reqtype == AnyPropertyType || type == reqtype) || !num_of_items)
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
29 return false;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
30
157
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
31 result = std::string((char*)data, num_of_items);
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
32
166
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
33 ::XFree(data);
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
34
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
35 return true;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
36 }
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
37
157
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
38 /* this should return CARDINAL, a 32-bit integer */
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
39 static bool GetWindowPID(::Display* display, ::Window window, pid_t& result) {
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
40 int format;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
41 unsigned long leftover_bytes, num_of_items;
158
80d6b28eb29f dep/animia: fix most X11 stuff
Paper <mrpapersonic@gmail.com>
parents: 157
diff changeset
42 ::Atom atom = ::XInternAtom(display, "_NET_WM_PID", False), type;
157
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
43 unsigned char* data;
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
44
166
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
45 int status = ::XGetWindowProperty(display, window, atom, 0L, (~0L), False, XA_CARDINAL,
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
46 &type, &format, &num_of_items, &leftover_bytes, &data);
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
47 if (status != Success || type != XA_CARDINAL || num_of_items < 1)
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
48 return false;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
49
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
50 result = static_cast<pid_t>(*(uint32_t*)data);
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
51
166
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
52 ::XFree(data);
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
53
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
54 return true;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
55 }
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
56
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
57 static bool FetchName(::Display* display, ::Window window, std::string& result) {
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
58 /* TODO: Check if XInternAtom created None or not... */
158
80d6b28eb29f dep/animia: fix most X11 stuff
Paper <mrpapersonic@gmail.com>
parents: 157
diff changeset
59 if (GetWindowPropertyAsString(display, window, ::XInternAtom(display, "_NET_WM_NAME", False),
166
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
60 result, ::XInternAtom(display, "UTF8_STRING", False)))
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
61 return true;
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
62
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
63 if (GetWindowPropertyAsString(display, window, ::XInternAtom(display, "WM_NAME", False),
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
64 result, XA_STRING))
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
65 return true;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
66
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
67 /* Fallback to XGetWMName() */
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
68 XTextProperty text;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
69
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
70 {
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
71 int status = ::XGetWMName(display, window, &text);
157
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
72 if (!status || !text.value || !text.nitems)
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
73 return false;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
74 }
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
75
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
76 char** list;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
77
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
78 {
157
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
79 int count;
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
80
157
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
81 int status = ::XmbTextPropertyToTextList(display, &text, &list, &count);
166
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
82 if (status != Success || !count || !*list)
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
83 return false;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
84 }
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
85
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
86 ::XFree(text.value);
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
87
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
88 result = *list;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
89
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
90 ::XFreeStringList(list);
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
91
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
92 return true;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
93 }
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
94
166
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
95 static bool WalkWindows(::Display* display, std::set<::Window>& children, const std::set<::Window>& windows) {
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
96 if (windows.empty())
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
97 return false;
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
98
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
99 for (const ::Window& window : windows) {
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
100 unsigned int num_children = 0;
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
101 ::Window* children_arr = nullptr;
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
102
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
103 ::Window root_return;
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
104 ::Window parent_return;
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
105
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
106 int status = ::XQueryTree(display, window, &root_return, &parent_return, &children_arr, &num_children);
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
107 if (status < Success)
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
108 continue;
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
109
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
110 if (num_children < 1) {
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
111 ::XFree(children_arr);
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
112 continue;
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
113 }
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
114
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
115 for (int i = 0; i < num_children; i++)
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
116 if (!children.count(children_arr[i]))
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
117 children.insert(children_arr[i]);
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
118
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
119 ::XFree(children_arr);
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
120
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
121 std::set<::Window> children_children;
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
122
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
123 if (!WalkWindows(display, children_children, children))
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
124 children.insert(children_children.begin(), children_children.end());
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
125 }
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
126
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
127 return true;
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
128 }
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
129
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
130 bool X11WinTools::EnumerateWindows(window_proc_t window_proc) {
158
80d6b28eb29f dep/animia: fix most X11 stuff
Paper <mrpapersonic@gmail.com>
parents: 157
diff changeset
131 if (!window_proc)
80d6b28eb29f dep/animia: fix most X11 stuff
Paper <mrpapersonic@gmail.com>
parents: 157
diff changeset
132 return false;
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
133
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
134 ::Display* display = ::XOpenDisplay(nullptr);
166
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
135 if (!display)
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
136 return false;
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
137
157
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
138 ::Window root = DefaultRootWindow(display);
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
139
166
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
140 std::set<::Window> windows;
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
141 WalkWindows(display, windows, {root});
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
142
166
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
143 for (const auto& window : windows) {
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
144 Window win;
158
80d6b28eb29f dep/animia: fix most X11 stuff
Paper <mrpapersonic@gmail.com>
parents: 157
diff changeset
145 win.id = window;
157
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
146 {
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
147 ::XClassHint* hint = ::XAllocClassHint();
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
148 if (::XGetClassHint(display, window, hint)) {
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
149 win.class_name = hint->res_class;
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
150 ::XFree(hint);
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
151 }
18c8eb5d1edc x11: make it work
Paper <mrpapersonic@gmail.com>
parents: 156
diff changeset
152 }
166
54c5d80a737e dep/animia: add libutil method
paper@DavesDouble.local
parents: 158
diff changeset
153 FetchName(display, window, win.text);
156
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
154
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
155 Process proc;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
156 GetWindowPID(display, window, proc.pid);
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
157
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
158 if (!window_proc(proc, win))
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
159 return false;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
160 }
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
161
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
162 return true;
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
163 }
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
164
cdf79282d647 dep/animia: add VERY early x11 window stuff
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
165 }