Skip to content

Commit

Permalink
feat(server): remove ability to add a socket fd
Browse files Browse the repository at this point in the history
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
  • Loading branch information
romangg committed Dec 6, 2023
1 parent 048a451 commit 15e61ef
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 20 deletions.
5 changes: 0 additions & 5 deletions server/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions server/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
11 changes: 0 additions & 11 deletions server/wayland/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions server/wayland/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 15e61ef

Please sign in to comment.