-
-
Notifications
You must be signed in to change notification settings - Fork 716
Fix compilation with clang8 #1674 #1675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tray_client class contains a reference so copy assignment operator is implicitly deleted. the dtor unembed the window so copying the class could lead to bug so the copy ctor is also deleted.
Oh, so because |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Yeap, the move assignment operator is also implicitly deleted. Moreover there is no move ctor because there is a destructor declared. So this class is non-movable and non-copyable. |
tray_client class contains a reference so copy assignment operator is implicitly deleted. the dtor unembed the window so copying the class could lead to bug so the copy ctor is also deleted. Fixes #1674
Changelog Fixes: * `internal/xworkspaces`: * Crash when WM doesn't set `_NET_DESKTOP_NAMES` (#1576), see #1462 * Workspace removal not always detected (#1579), see #1491, #248 * `internal/i3`: Crash when `<label-state>` was not added to `format` (#1591), see #975 * `internal/fs`: Incorrect sizes on some machines (#1612, #1699), see #743 * `internal/network`: Buffer overflow with ipv6 addresses (#1514) * renderer: Show proper error when imagemagick is used to set the background (#1608), see #1582, #1585 * tray: * Wrong background for transparent trays when using `tray-offset-*` (#1571) * Build failure on clang8 (#1675), #1674 * Allow negative offset values for `tray-offset-*` (#1669), see #1666 * build: Link failure when configuring with `-DBUILD_SHARED_LIBS=ON` (#1647, polybar/xpp#15), see #1628 * controller: Crash when reloading via `SIGUSR1` too fast (#1678), #428
Changelog Fixes: * `internal/xworkspaces`: * Crash when WM doesn't set `_NET_DESKTOP_NAMES` (#1576), see #1462 * Workspace removal not always detected (#1579), see #1491, #248 * `internal/i3`: Crash when `<label-state>` was not added to `format` (#1591), see #975 * `internal/fs`: Incorrect sizes on some machines (#1612, #1699), see #743 * `internal/network`: Buffer overflow with ipv6 addresses (#1514) * renderer: Show proper error when imagemagick is used to set the background (#1608), see #1582, #1585 * tray: * Wrong background for transparent trays when using `tray-offset-*` (#1571) * Build failure on clang8 (#1675), #1674 * Allow negative offset values for `tray-offset-*` (#1669), see #1666 * build: Link failure when configuring with `-DBUILD_SHARED_LIBS=ON` (#1647, polybar/xpp#15), see #1628 * controller: Crash when reloading via `SIGUSR1` too fast (#1678), #428
Changelog Fixes: * `internal/xworkspaces`: * Crash when WM doesn't set `_NET_DESKTOP_NAMES` (polybar#1576), see polybar#1462 * Workspace removal not always detected (polybar#1579), see polybar#1491, polybar#248 * `internal/i3`: Crash when `<label-state>` was not added to `format` (polybar#1591), see polybar#975 * `internal/fs`: Incorrect sizes on some machines (polybar#1612, polybar#1699), see polybar#743 * `internal/network`: Buffer overflow with ipv6 addresses (polybar#1514) * renderer: Show proper error when imagemagick is used to set the background (polybar#1608), see polybar#1582, polybar#1585 * tray: * Wrong background for transparent trays when using `tray-offset-*` (polybar#1571) * Build failure on clang8 (polybar#1675), polybar#1674 * Allow negative offset values for `tray-offset-*` (polybar#1669), see polybar#1666 * build: Link failure when configuring with `-DBUILD_SHARED_LIBS=ON` (polybar#1647, polybar/xpp#15), see polybar#1628 * controller: Crash when reloading via `SIGUSR1` too fast (polybar#1678), polybar#428
Changelog Fixes: * `internal/xworkspaces`: * Crash when WM doesn't set `_NET_DESKTOP_NAMES` (polybar#1576), see polybar#1462 * Workspace removal not always detected (polybar#1579), see polybar#1491, polybar#248 * `internal/i3`: Crash when `<label-state>` was not added to `format` (polybar#1591), see polybar#975 * `internal/fs`: Incorrect sizes on some machines (polybar#1612, polybar#1699), see polybar#743 * `internal/network`: Buffer overflow with ipv6 addresses (polybar#1514) * renderer: Show proper error when imagemagick is used to set the background (polybar#1608), see polybar#1582, polybar#1585 * tray: * Wrong background for transparent trays when using `tray-offset-*` (polybar#1571) * Build failure on clang8 (polybar#1675), polybar#1674 * Allow negative offset values for `tray-offset-*` (polybar#1669), see polybar#1666 * build: Link failure when configuring with `-DBUILD_SHARED_LIBS=ON` (polybar#1647, polybar/xpp#15), see polybar#1628 * controller: Crash when reloading via `SIGUSR1` too fast (polybar#1678), polybar#428
Changelog Fixes: * `internal/xworkspaces`: * Crash when WM doesn't set `_NET_DESKTOP_NAMES` (polybar#1576), see polybar#1462 * Workspace removal not always detected (polybar#1579), see polybar#1491, polybar#248 * `internal/i3`: Crash when `<label-state>` was not added to `format` (polybar#1591), see polybar#975 * `internal/fs`: Incorrect sizes on some machines (polybar#1612, polybar#1699), see polybar#743 * `internal/network`: Buffer overflow with ipv6 addresses (polybar#1514) * renderer: Show proper error when imagemagick is used to set the background (polybar#1608), see polybar#1582, polybar#1585 * tray: * Wrong background for transparent trays when using `tray-offset-*` (polybar#1571) * Build failure on clang8 (polybar#1675), polybar#1674 * Allow negative offset values for `tray-offset-*` (polybar#1669), see polybar#1666 * build: Link failure when configuring with `-DBUILD_SHARED_LIBS=ON` (polybar#1647, polybar/xpp#15), see polybar#1628 * controller: Crash when reloading via `SIGUSR1` too fast (polybar#1678), polybar#428
Changelog Fixes: * `internal/xworkspaces`: * C 9135 rash when WM doesn't set `_NET_DESKTOP_NAMES` (polybar#1576), see polybar#1462 * Workspace removal not always detected (polybar#1579), see polybar#1491, polybar#248 * `internal/i3`: Crash when `<label-state>` was not added to `format` (polybar#1591), see polybar#975 * `internal/fs`: Incorrect sizes on some machines (polybar#1612, polybar#1699), see polybar#743 * `internal/network`: Buffer overflow with ipv6 addresses (polybar#1514) * renderer: Show proper error when imagemagick is used to set the background (polybar#1608), see polybar#1582, polybar#1585 * tray: * Wrong background for transparent trays when using `tray-offset-*` (polybar#1571) * Build failure on clang8 (polybar#1675), polybar#1674 * Allow negative offset values for `tray-offset-*` (polybar#1669), see polybar#1666 * build: Link failure when configuring with `-DBUILD_SHARED_LIBS=ON` (polybar#1647, polybar/xpp#15), see polybar#1628 * controller: Crash when reloading via `SIGUSR1` too fast (polybar#1678), polybar#428
This PR fixes #1674 by removing the copy ctor and assignment operator of
tray_client
.Copy assignment was marked as defaulted however as stated in the C++ standard:
Since a reference can't be reassigned, I just marked this operator as explicitly deleted.
The copy ctor was also defaulted and it is well-formed but the dtor unembed the window so copying that class may cause bugs, so I also marked it as explicitly deleted. Another solution if copying this class is needed is to do the "unembeding" in a custom deleter of
m_xembed
.