Skip to content

Commit

Permalink
feat(server): support wlr_output_management_unstable_v1
Browse files Browse the repository at this point in the history
We already provided support for the protocol in our client library. Now also
add support for it in the server library and extend the unit test.
  • Loading branch information
romangg committed Mar 31, 2023
1 parent e2f5e12 commit 8b6a490
Show file tree
Hide file tree
Showing 26 changed files with 1,662 additions and 125 deletions.
12 changes: 12 additions & 0 deletions autotests/client/registry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <wayland-text-input-v3-client-protocol.h>
#include <wayland-virtual-keyboard-v1-client-protocol.h>
#include <wayland-wlr-data-control-v1-client-protocol.h>
#include <wayland-wlr-output-management-v1-client-protocol.h>
#include <wayland-xdg-decoration-unstable-v1-client-protocol.h>
#include <wayland-xdg-shell-client-protocol.h>

Expand Down Expand Up @@ -137,6 +138,7 @@ private Q_SLOTS:
void testBindPrimarySelectionDeviceManager();
void testBindIdleNotifierV1();
void testBindIdleIhibitManagerUnstableV1();
void testBindWlrOutputManagerUnstableV1();
void testRemoval();
void testOutOfSyncRemoval();
void testDestroy();
Expand Down Expand Up @@ -184,6 +186,7 @@ void TestWaylandRegistry::init()
= std::make_unique<Wrapland::Server::drm_lease_device_v1>(server.display.get());
server.globals.output_manager->create_management_v1();
server.globals.output_manager->create_xdg_manager();
server.globals.output_manager->create_wlr_manager_v1();
server.globals.blur_manager
= std::make_unique<Wrapland::Server::BlurManager>(server.display.get());
server.globals.contrast_manager
Expand Down Expand Up @@ -514,6 +517,15 @@ void TestWaylandRegistry::testBindIdleIhibitManagerUnstableV1()
QTest::qWait(100);
}

void TestWaylandRegistry::testBindWlrOutputManagerUnstableV1()
{
TEST_BIND(Wrapland::Client::Registry::Interface::WlrOutputManagerV1,
SIGNAL(wlrOutputManagerV1Announced(quint32, quint32)),
bindWlrOutputManagerV1,
zwlr_output_manager_v1_destroy)
QTest::qWait(100);
}

#undef TEST_BIND

void TestWaylandRegistry::testRemoval()
Expand Down
Loading

0 comments on commit 8b6a490

Please sign in to comment.