summaryrefslogtreecommitdiff
path: root/gui-wm/wayfire/files/wayfire-0.11.0-oswitch-local-symbols.patch
blob: 393dd740922098c8483221d85345946607acc32e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- a/plugins/single_plugins/oswitch.cpp
+++ b/plugins/single_plugins/oswitch.cpp
@@ -14,6 +14,11 @@
 #include <wayfire/plugins/common/util.hpp>
 #include <limits>
 
+// Plugins are loaded RTLD_GLOBAL and old libraries may remain resident across
+// reloads. Keep implementation symbols local so a replacement cannot inherit
+// an earlier plugin's vtable or binding callbacks.
+namespace
+{
 class wayfire_oswitch : public wf::plugin_interface_t
 {
     wf::wl_idle_call idle_switch_output;
@@ -336,5 +341,6 @@
         idle_switch_output.disconnect();
     }
 };
+}
 
 DECLARE_WAYFIRE_PLUGIN(wayfire_oswitch);