- fleshing out event system and window manager

- added tests back in for window management
This commit is contained in:
2025-12-27 07:19:53 -05:00
parent 184bc7fcdf
commit ecf1cfc29c
12 changed files with 116 additions and 52 deletions

View File

@@ -24,9 +24,14 @@ namespace fennec
{
window::window(display_server* server, const config& conf, window* parent)
: server(server), parent(parent)
, cfg(conf), state(), root(nullptr) {
: server(server), parent(parent), root(parent ? parent : this)
, cfg(conf), state() {
state.mode = conf.mode;
while (root != nullptr and root->is_popup()) {
root = root->get_parent();
}
assertf(root != nullptr, "Failed to find appropriate top-level window.");
}
window::~window() {