From eb698bb49c5f48d8bd541909dc7b06b51e02a4a6 Mon Sep 17 00:00:00 2001 From: Roman Gilg Date: Sun, 10 Sep 2023 17:17:30 +0200 Subject: [PATCH] refactor(server): remove wlr output configuration member It is unused. --- server/wlr_output_configuration_head_v1.cpp | 14 +++++--------- server/wlr_output_configuration_head_v1.h | 1 - server/wlr_output_configuration_head_v1_p.h | 3 --- server/wlr_output_configuration_v1.cpp | 4 ++-- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/server/wlr_output_configuration_head_v1.cpp b/server/wlr_output_configuration_head_v1.cpp index cf4236ca..5a0e0ce0 100644 --- a/server/wlr_output_configuration_head_v1.cpp +++ b/server/wlr_output_configuration_head_v1.cpp @@ -47,7 +47,6 @@ QSize estimate_logical_size(output_state const& state, double scale) wlr_output_configuration_head_v1::Private::Private(Client* client, uint32_t version, uint32_t id, - wlr_output_configuration_v1& configuration, wlr_output_head_v1_res& head, wlr_output_configuration_head_v1& q_ptr) : Wayland::Resource( @@ -59,7 +58,6 @@ wlr_output_configuration_head_v1::Private::Private(Client* client, &q_ptr) , state{head.d_ptr->head->output.d_ptr->published.state} , scale{estimate_scale(state)} - , configuration{configuration} , head{&head} { } @@ -146,13 +144,11 @@ void wlr_output_configuration_head_v1::Private::set_adaptive_sync_callback(wl_cl priv->state.adaptive_sync = wlState == ZWLR_OUTPUT_HEAD_V1_ADAPTIVE_SYNC_STATE_ENABLED; } -wlr_output_configuration_head_v1::wlr_output_configuration_head_v1( - Client* client, - uint32_t version, - uint32_t id, - wlr_output_configuration_v1& configuration, - wlr_output_head_v1_res& head) - : d_ptr{new Private(client, version, id, configuration, head, *this)} +wlr_output_configuration_head_v1::wlr_output_configuration_head_v1(Client* client, + uint32_t version, + uint32_t id, + wlr_output_head_v1_res& head) + : d_ptr{new Private(client, version, id, head, *this)} { } diff --git a/server/wlr_output_configuration_head_v1.h b/server/wlr_output_configuration_head_v1.h index 6655242d..5cc1bf63 100644 --- a/server/wlr_output_configuration_head_v1.h +++ b/server/wlr_output_configuration_head_v1.h @@ -35,7 +35,6 @@ class WRAPLANDSERVER_EXPORT wlr_output_configuration_head_v1 : public QObject wlr_output_configuration_head_v1(Client* client, uint32_t version, uint32_t id, - wlr_output_configuration_v1& configuration, wlr_output_head_v1_res& head); friend class wlr_output_configuration_v1_res; diff --git a/server/wlr_output_configuration_head_v1_p.h b/server/wlr_output_configuration_head_v1_p.h index abbf88c2..f227e403 100644 --- a/server/wlr_output_configuration_head_v1_p.h +++ b/server/wlr_output_configuration_head_v1_p.h @@ -23,14 +23,11 @@ class wlr_output_configuration_head_v1::Private Private(Client* client, uint32_t version, uint32_t id, - wlr_output_configuration_v1& configuration, wlr_output_head_v1_res& head, wlr_output_configuration_head_v1& q_ptr); output_state state; double scale; - - wlr_output_configuration_v1& configuration; wlr_output_head_v1_res* head; private: diff --git a/server/wlr_output_configuration_v1.cpp b/server/wlr_output_configuration_v1.cpp index e1660af1..8a51ab31 100644 --- a/server/wlr_output_configuration_v1.cpp +++ b/server/wlr_output_configuration_v1.cpp @@ -161,8 +161,8 @@ void wlr_output_configuration_v1_res::Private::enable_head_callback(wl_client* / return; } - priv->enabled_heads.push_back(new wlr_output_configuration_head_v1( - priv->client->handle, priv->version, id, *priv->front, *head)); + priv->enabled_heads.push_back( + new wlr_output_configuration_head_v1(priv->client->handle, priv->version, id, *head)); } void wlr_output_configuration_v1_res::Private::disable_head_callback(wl_client* /*wlClient*/,