Clean up X11 client message functions

clang-tidy would warn about all parameters being the same, which is
true, but that's kind of the point here.
This commit is contained in:
Robbert van der Helm
2021-07-11 12:15:30 +02:00
parent e0ff16cd16
commit eac9f9433b
4 changed files with 29 additions and 25 deletions
+11 -8
View File
@@ -605,11 +605,12 @@ bool Editor::supports_ewmh_active_window() const {
return active_window_property_exists;
}
void Editor::send_xembed_message(const xcb_window_t& window,
const uint32_t message,
const uint32_t detail,
const uint32_t data1,
const uint32_t data2) const noexcept {
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
void Editor::send_xembed_message(xcb_window_t window,
uint32_t message,
uint32_t detail,
uint32_t data1,
uint32_t data2) const noexcept {
xcb_client_message_event_t event;
event.response_type = XCB_CLIENT_MESSAGE;
event.type = xcb_xembed_message;
@@ -762,9 +763,11 @@ boost::container::small_vector<xcb_window_t, 8> find_ancestor_windows(
return ancestor_windows;
}
bool is_child_window_or_same(xcb_connection_t& x11_connection,
xcb_window_t child,
xcb_window_t parent) {
bool is_child_window_or_same(
xcb_connection_t& x11_connection,
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
xcb_window_t child,
xcb_window_t parent) {
xcb_generic_error_t* error = nullptr;
xcb_query_tree_cookie_t query_cookie =
xcb_query_tree(&x11_connection, child);
+5 -5
View File
@@ -235,11 +235,11 @@ class Editor {
*
* https://specifications.freedesktop.org/xembed-spec/xembed-spec-latest.html#lifecycle
*/
void send_xembed_message(const xcb_window_t& window,
const uint32_t message,
const uint32_t detail,
const uint32_t data1,
const uint32_t data2) const noexcept;
void send_xembed_message(xcb_window_t window,
uint32_t message,
uint32_t detail,
uint32_t data1,
uint32_t data2) const noexcept;
/**
* Start the XEmbed procedure when `use_xembed` is enabled. This should be
+7 -6
View File
@@ -377,12 +377,13 @@ std::optional<xcb_window_t> WineXdndProxy::get_xdnd_proxy(
}
}
void WineXdndProxy::send_xdnd_message(const xcb_window_t& window,
const xcb_atom_t message_type,
const uint32_t data1,
const uint32_t data2,
const uint32_t data3,
const uint32_t data4) const noexcept {
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
void WineXdndProxy::send_xdnd_message(xcb_window_t window,
xcb_atom_t message_type,
uint32_t data1,
uint32_t data2,
uint32_t data3,
uint32_t data4) const noexcept {
// See https://www.freedesktop.org/wiki/Specifications/XDND/#clientmessages
xcb_client_message_event_t event;
event.response_type = XCB_CLIENT_MESSAGE;
+6 -6
View File
@@ -191,12 +191,12 @@ class WineXdndProxy {
*
* https://www.freedesktop.org/wiki/Specifications/XDND/#clientmessages
*/
void send_xdnd_message(const xcb_window_t& window,
const xcb_atom_t message_type,
const uint32_t data1,
const uint32_t data2,
const uint32_t data3,
const uint32_t data4) const noexcept;
void send_xdnd_message(xcb_window_t window,
xcb_atom_t message_type,
uint32_t data1,
uint32_t data2,
uint32_t data3,
uint32_t data4) const noexcept;
/**
* We need a dedicated X11 connection for our proxy because we can have