From 15e61ef6ac3b039169bc1e0a5130033fc74c6c57 Mon Sep 17 00:00:00 2001 From: Roman Gilg Date: Wed, 6 Dec 2023 16:38:54 +0100 Subject: [PATCH] feat(server): remove ability to add a socket fd This is currently not used by any consumer. In theory it could be useful for implementing the new security context protocol. But once we implement this we may readd it or do it a different way. But in any case also creating the wl_display when adding a socket is a somewhat confusing API interface. So if any we should do it differently in the future. BREAKING CHANGE: Display::add_socket_fd removed --- server/display.cpp | 5 ----- server/display.h | 2 -- server/wayland/display.cpp | 11 ----------- server/wayland/display.h | 2 -- 4 files changed, 20 deletions(-) diff --git a/server/display.cpp b/server/display.cpp index 0ee60c2b..0d612fdc 100644 --- a/server/display.cpp +++ b/server/display.cpp @@ -123,11 +123,6 @@ std::string Display::socket_name() const return d_ptr->socket_name; } -void Display::add_socket_fd(int fd) -{ - d_ptr->add_socket_fd(fd); -} - void Display::start(StartMode mode) { d_ptr->start(mode == StartMode::ConnectToSocket); diff --git a/server/display.h b/server/display.h index 68d0ffad..8753f0cf 100644 --- a/server/display.h +++ b/server/display.h @@ -108,8 +108,6 @@ class WRAPLANDSERVER_EXPORT Display : public QObject wl_display* native() const; bool running() const; - void add_socket_fd(int fd); - void createShm(); void dispatch(); diff --git a/server/wayland/display.cpp b/server/wayland/display.cpp index 23dc1174..1af7208e 100644 --- a/server/wayland/display.cpp +++ b/server/wayland/display.cpp @@ -78,17 +78,6 @@ wl_display* Display::native() const return m_display; } -void Display::add_socket_fd(int fd) -{ - if (!m_display) { - m_display = wl_display_create(); - } - - if (wl_display_add_socket_fd(m_display, fd)) { - qCWarning(WRAPLAND_SERVER, "Failed to add fd %d.", fd); - } -} - bool Display::running() const { return m_running; diff --git a/server/wayland/display.h b/server/wayland/display.h index 0eb037d1..1a4bd5c4 100644 --- a/server/wayland/display.h +++ b/server/wayland/display.h @@ -49,8 +49,6 @@ class Display explicit Display(Server::Display* handle); virtual ~Display(); - void add_socket_fd(int fd); - void addGlobal(BasicNucleus* nucleus); void removeGlobal(BasicNucleus* nucleus);