Mercurial > minori
diff dep/animia/src/win/wayland.cc @ 219:2f6d27fcdf7d
dep/animia: wayland: fixup wlroots code
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Sun, 07 Jan 2024 13:37:50 -0500 |
parents | 8a482049b968 |
children | 53211cb1e7f5 |
line wrap: on
line diff
--- a/dep/animia/src/win/wayland.cc Sun Jan 07 13:28:00 2024 -0500 +++ b/dep/animia/src/win/wayland.cc Sun Jan 07 13:37:50 2024 -0500 @@ -136,7 +136,7 @@ struct global_data* global = reinterpret_cast<struct global_data*>(data); if (!std::strcmp(interface, ext_foreign_toplevel_list_v1_interface.name)) { - if (!global->zwlr_toplevel_mgr || version < 3) + if (global->zwlr_toplevel_mgr) return; // we don't need this then global->ext_toplevel_list = reinterpret_cast<struct ext_foreign_toplevel_list_v1*>( @@ -145,7 +145,7 @@ ext_foreign_toplevel_list_v1_add_listener(global->ext_toplevel_list, &ext_toplevel_list_listener, &global->windows); } else if (!std::strcmp(interface, zwlr_foreign_toplevel_manager_v1_interface.name)) { - if (!global->ext_toplevel_list) + if (global->ext_toplevel_list || version < 3) return; // we don't need this then global->zwlr_toplevel_mgr = reinterpret_cast<struct zwlr_foreign_toplevel_manager_v1*>( @@ -185,7 +185,7 @@ sync->callback = nullptr; if (sync->sync == 0) { - if (!sync->global.ext_toplevel_list || !sync->global.zwlr_toplevel_mgr) { + if (!sync->global.ext_toplevel_list && !sync->global.zwlr_toplevel_mgr) { std::cerr << "animia/wayland: Wayland server doesn't support ext-foreign-toplevel-list-v1 nor " "wlr-foreign-toplevel-management-unstable-v1!" << std::endl;